Skip to content

Commit 8f786c8

Browse files
committed
global: Convert %short variables to %{long} variables
1 parent 13ae792 commit 8f786c8

File tree

13 files changed

+29
-30
lines changed

13 files changed

+29
-30
lines changed

docs/core/config/auth/databases/pam.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ account required pam_unix.so
160160

161161
For Solaris you will have to edit `/etc/pam.conf`.
162162

163-
Here is a working Solaris example (using [[setting,service_name,%L{service}]]
163+
Here is a working Solaris example (using [[setting,service_name,%{service}]]
164164
instead of the default `dovecot` service):
165165

166166
```

docs/core/config/auth/proxies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ See [[link,auth_master_users]] for more information how to configure this.
275275
## OAuth2 Forwarding
276276

277277
If you want to forward [[link,auth_oauth2]] tokens, return field
278-
`proxy_mech=%m` as extra field.
278+
`proxy_mech=%{mechanism}` as extra field.
279279

280280
## Examples
281281

docs/core/config/pop3.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ For new POP3 servers, the easiest way to set up UIDLs is to use IMAP's
108108
UIDVALIDITY and UID values. The default is:
109109

110110
```
111-
pop3_uidl_format = %08Xu%08Xv
111+
pop3_uidl_format = %{uid | hex(8)}%{uidvalidity | hex(8)}
112112
```
113113

114114
Another good default is to use the message's global UID:
115115

116116
```
117-
pop3_uidl_format = %g
117+
pop3_uidl_format = %{guid}
118118
```
119119

120120
However, note that GUIDs may not be unique, as the GUID does not change when a
@@ -124,7 +124,7 @@ done using IMAP, Sieve, or doveadm.)
124124
### MD5 UIDL format (mbox-only)
125125

126126
```
127-
pop3_uidl_format = %m
127+
pop3_uidl_format = %{md5}
128128
```
129129

130130
This works by getting the MD5 sum of a couple of message headers that uniquely
@@ -162,7 +162,7 @@ calculation:
162162

163163
* X-Delivery-ID: header
164164

165-
If you use [[link,lda]] or IMAP APPEND and [[setting,pop3_uidl_format,%m]]
165+
If you use [[link,lda]] or IMAP APPEND and [[setting,pop3_uidl_format,%{md5}]]
166166
it always appends the X-Delivery-ID: header to saved mailbox. Any existing
167167
X-Delivery-ID: headers in the saved mails are dropped.
168168

docs/core/config/shared_mailboxes.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ dovecotlinks:
66
shared_mailboxes_listing:
77
hash: shared-mailbox-listing
88
text: shared mailbox listing
9-
shared_mailboxes_percent:
10-
hash: vs
11-
text: \% vs. \%\%
129
shared_mailboxes_permissions:
1310
hash: filesystem-permissions
1411
text: shared mailboxes filesystem permissions

docs/core/config/statistics.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ metric imap_command {
8585
metric login_domains {
8686
filter = event=auth_request_finished
8787
fields = user
88-
group_by = discrete:%L{domain}
88+
group_by user {
89+
method discrete {
90+
modifier = %{value | domain | lower}
91+
}
92+
}
8993
}
9094
```
9195

docs/core/config/users/virtual.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,10 @@ mail_driver = maildir
224224
mail_path = /home/%{user | domain}/%{user | username}/Maildir
225225
226226
passdb passwd-file {
227-
auth_username_format = %Ln
228227
passwd_file_path = /home/%{user | domain}/etc/shadow
229228
}
230229
231230
userdb passwd-file {
232-
auth_username_format = %Ln
233231
passwd_file_path = /home/%{user | domain}/etc/passwd
234232
}
235233
```

docs/core/design/auth_process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ when the passdb lookup validity depends only on the username. With
305305
more complex databases such as SQL and LDAP this is created
306306
dynamically based on the password query in the configuration file. If
307307
there are multiple variables, they should be separated so that their
308-
contents don't get mixed, for example `%{user}<TAB>%r<TAB>%l`.
308+
contents don't get mixed, for example `%{user}<TAB>%{rmote_ip}<TAB>%{local_ip}`.
309309
`auth_cache_parse_key()` can be used to easily create a cache key
310310
from a query string.
311311

docs/core/plugins/virtual.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,19 @@ namespace real {
196196
list = no
197197
hidden = yes
198198
}
199-
```
200199
201-
```[mysql.ext]
202200
# Note: none of the namespaces have inbox=yes. This is because for IMAP users
203201
# you want the inbox namespace to have 'inbox=yes', but for POP3 users you want
204202
# the virtual namespace to have 'inbox=yes'. This requires setting the
205203
# 'inbox=yes' in userdb extra fields. For example with MySQL you can do
206204
# this like:
207205
208-
ser_query = SELECT ..., \
209-
CASE '%s' WHEN 'pop3' THEN NULL ELSE 'yes' END AS 'namespace/inbox/inbox', \
210-
CASE '%s' WHEN 'pop3' THEN 'yes' ELSE NULL END AS 'namespace/virtual/inbox' \
211-
WHERE ...
206+
userdb sql {
207+
query = SELECT ..., \
208+
CASE '%{protocol}' WHEN 'pop3' THEN NULL ELSE 'yes' END AS 'namespace/inbox/inbox', \
209+
CASE '%{protocol}' WHEN 'pop3' THEN 'yes' ELSE NULL END AS 'namespace/virtual/inbox' \
210+
WHERE ...
211+
}
212212
```
213213

214214
```[/etc/dovecot/virtual/INBOX/dovecot-virtual]
@@ -229,7 +229,7 @@ Also to avoid accidental POP3 UIDL changes, you shouldn't base the UIDLs on
229229
IMAP UIDs. Instead use GUIDs (with Maildir the same as base filename):
230230

231231
```
232-
pop3_uidl_format = %g
232+
pop3_uidl_format = %{guid}
233233
```
234234

235235
## Configuration Examples

docs/core/settings/types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ Certain settings require specific variables and thus don't use the default
6565
[[variable]]. For example:
6666

6767
```[dovecot.conf]
68-
imap_logout_format = in=%i out=%o
68+
imap_logout_format = in=%{input} out=%{output}
6969
```
7070

71-
Here the `%i` and `%o` refer to variables specific to the
71+
Here the `%{input}` and `%{output}` refer to variables specific to the
7272
[[setting,imap_logout_format]] setting.
7373

7474
## Unsigned Integer

docs/howto/convert_password_schemes.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ https://kaworu.ch/blog/2016/04/20/strong-crypt-scheme-with-dovecot-postfixadmin-
3636
# default_pass_scheme = CRYPT
3737
3838
# update your sql query so it will look at the new field
39-
# AND add a %w field in the query so we have the plain password in our
40-
# Enviroment ($PLAIN_PASS)
41-
query = SELECT id as user, newpassword as password, home as userdb_home, uid as userdb_uid, gid as userdb_gid, '%w' as userdb_plain_pass \
39+
# AND add a %{password} field in the query so we have the plain password in
40+
# our Enviroment ($PLAIN_PASS)
41+
query = SELECT id as user, newpassword as password, home as userdb_home, uid as userdb_uid, gid as userdb_gid, '%{password}' as userdb_plain_pass \
4242
FROM users \
4343
WHERE id = '%{user}'
4444
@@ -48,7 +48,7 @@ https://kaworu.ch/blog/2016/04/20/strong-crypt-scheme-with-dovecot-postfixadmin-
4848
# driver = mysql
4949
# connect = host=127.0.0.1 user=mailauth password=secret dbname=postfixadmin
5050
# default_pass_scheme = SHA512-CRYPT
51-
# query = SELECT username AS user, password, CONCAT('/var/mail/vdomains/', maildir) as userdb_home, 'vmail' as userdb_uid, 'vmail' as userdb_gid, '%w' as userdb_plain_pass \
51+
# query = SELECT username AS user, password, CONCAT('/var/mail/vdomains/', maildir) as userdb_home, 'vmail' as userdb_uid, 'vmail' as userdb_gid, '%{password}' as userdb_plain_pass \
5252
# FROM mailbox \
5353
# WHERE username = '%{user}'
5454
}
@@ -273,7 +273,7 @@ passdb passwd-file {
273273
userdb passwd-file {
274274
passwd_file_path = /var/vmail/auth.d/%{user | domain}/passwd
275275
fields {
276-
plain_pass = %w
276+
plain_pass = %{password}
277277
}
278278
}
279279
```

0 commit comments

Comments
 (0)