diff --git a/docs/core/config/auth/databases/pam.md b/docs/core/config/auth/databases/pam.md index 27dbb0883..fd4233239 100644 --- a/docs/core/config/auth/databases/pam.md +++ b/docs/core/config/auth/databases/pam.md @@ -160,7 +160,7 @@ account required pam_unix.so For Solaris you will have to edit `/etc/pam.conf`. -Here is a working Solaris example (using [[setting,service_name,%L{service}]] +Here is a working Solaris example (using [[setting,service_name,%{service}]] instead of the default `dovecot` service): ``` diff --git a/docs/core/config/auth/proxies.md b/docs/core/config/auth/proxies.md index 886142c6e..9a2dbaa2d 100644 --- a/docs/core/config/auth/proxies.md +++ b/docs/core/config/auth/proxies.md @@ -275,7 +275,7 @@ See [[link,auth_master_users]] for more information how to configure this. ## OAuth2 Forwarding If you want to forward [[link,auth_oauth2]] tokens, return field -`proxy_mech=%m` as extra field. +`proxy_mech=%{mechanism}` as extra field. ## Examples diff --git a/docs/core/config/pop3.md b/docs/core/config/pop3.md index 3a1ec7359..f5f4d6be9 100644 --- a/docs/core/config/pop3.md +++ b/docs/core/config/pop3.md @@ -108,13 +108,13 @@ For new POP3 servers, the easiest way to set up UIDLs is to use IMAP's UIDVALIDITY and UID values. The default is: ``` -pop3_uidl_format = %08Xu%08Xv +pop3_uidl_format = %{uid | hex(8)}%{uidvalidity | hex(8)} ``` Another good default is to use the message's global UID: ``` -pop3_uidl_format = %g +pop3_uidl_format = %{guid} ``` 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.) ### MD5 UIDL format (mbox-only) ``` -pop3_uidl_format = %m +pop3_uidl_format = %{md5} ``` This works by getting the MD5 sum of a couple of message headers that uniquely @@ -162,7 +162,7 @@ calculation: * X-Delivery-ID: header -If you use [[link,lda]] or IMAP APPEND and [[setting,pop3_uidl_format,%m]] +If you use [[link,lda]] or IMAP APPEND and [[setting,pop3_uidl_format,%{md5}]] it always appends the X-Delivery-ID: header to saved mailbox. Any existing X-Delivery-ID: headers in the saved mails are dropped. diff --git a/docs/core/config/shared_mailboxes.md b/docs/core/config/shared_mailboxes.md index ef5204e1b..31678d62e 100644 --- a/docs/core/config/shared_mailboxes.md +++ b/docs/core/config/shared_mailboxes.md @@ -6,9 +6,6 @@ dovecotlinks: shared_mailboxes_listing: hash: shared-mailbox-listing text: shared mailbox listing - shared_mailboxes_percent: - hash: vs - text: \% vs. \%\% shared_mailboxes_permissions: hash: filesystem-permissions text: shared mailboxes filesystem permissions diff --git a/docs/core/config/statistics.md b/docs/core/config/statistics.md index 67578d5e7..a7618fb01 100644 --- a/docs/core/config/statistics.md +++ b/docs/core/config/statistics.md @@ -85,7 +85,11 @@ metric imap_command { metric login_domains { filter = event=auth_request_finished fields = user - group_by = discrete:%L{domain} + group_by user { + method discrete { + modifier = %{value | domain | lower} + } + } } ``` diff --git a/docs/core/config/users/virtual.md b/docs/core/config/users/virtual.md index a7ab42244..b81768012 100644 --- a/docs/core/config/users/virtual.md +++ b/docs/core/config/users/virtual.md @@ -224,12 +224,10 @@ mail_driver = maildir mail_path = /home/%{user | domain}/%{user | username}/Maildir passdb passwd-file { - auth_username_format = %Ln passwd_file_path = /home/%{user | domain}/etc/shadow } userdb passwd-file { - auth_username_format = %Ln passwd_file_path = /home/%{user | domain}/etc/passwd } ``` diff --git a/docs/core/design/auth_process.md b/docs/core/design/auth_process.md index ca2d3ccde..8f359ede6 100644 --- a/docs/core/design/auth_process.md +++ b/docs/core/design/auth_process.md @@ -305,7 +305,7 @@ when the passdb lookup validity depends only on the username. With more complex databases such as SQL and LDAP this is created dynamically based on the password query in the configuration file. If there are multiple variables, they should be separated so that their -contents don't get mixed, for example `%{user}%r%l`. +contents don't get mixed, for example `%{user}%{rmote_ip}%{local_ip}`. `auth_cache_parse_key()` can be used to easily create a cache key from a query string. diff --git a/docs/core/plugins/virtual.md b/docs/core/plugins/virtual.md index 8af25617a..6ebe4b706 100644 --- a/docs/core/plugins/virtual.md +++ b/docs/core/plugins/virtual.md @@ -196,19 +196,19 @@ namespace real { list = no hidden = yes } -``` -```[mysql.ext] # Note: none of the namespaces have inbox=yes. This is because for IMAP users # you want the inbox namespace to have 'inbox=yes', but for POP3 users you want # the virtual namespace to have 'inbox=yes'. This requires setting the # 'inbox=yes' in userdb extra fields. For example with MySQL you can do # this like: -ser_query = SELECT ..., \ - CASE '%s' WHEN 'pop3' THEN NULL ELSE 'yes' END AS 'namespace/inbox/inbox', \ - CASE '%s' WHEN 'pop3' THEN 'yes' ELSE NULL END AS 'namespace/virtual/inbox' \ - WHERE ... +userdb sql { + query = SELECT ..., \ + CASE '%{protocol}' WHEN 'pop3' THEN NULL ELSE 'yes' END AS 'namespace/inbox/inbox', \ + CASE '%{protocol}' WHEN 'pop3' THEN 'yes' ELSE NULL END AS 'namespace/virtual/inbox' \ + WHERE ... +} ``` ```[/etc/dovecot/virtual/INBOX/dovecot-virtual] @@ -229,7 +229,7 @@ Also to avoid accidental POP3 UIDL changes, you shouldn't base the UIDLs on IMAP UIDs. Instead use GUIDs (with Maildir the same as base filename): ``` -pop3_uidl_format = %g +pop3_uidl_format = %{guid} ``` ## Configuration Examples diff --git a/docs/core/settings/types.md b/docs/core/settings/types.md index 4bf65b3e8..a38d9eb24 100644 --- a/docs/core/settings/types.md +++ b/docs/core/settings/types.md @@ -65,10 +65,10 @@ Certain settings require specific variables and thus don't use the default [[variable]]. For example: ```[dovecot.conf] -imap_logout_format = in=%i out=%o +imap_logout_format = in=%{input} out=%{output} ``` -Here the `%i` and `%o` refer to variables specific to the +Here the `%{input}` and `%{output}` refer to variables specific to the [[setting,imap_logout_format]] setting. ## Unsigned Integer diff --git a/docs/howto/convert_password_schemes.md b/docs/howto/convert_password_schemes.md index 1bffe4480..d0b443908 100644 --- a/docs/howto/convert_password_schemes.md +++ b/docs/howto/convert_password_schemes.md @@ -36,9 +36,9 @@ https://kaworu.ch/blog/2016/04/20/strong-crypt-scheme-with-dovecot-postfixadmin- # default_pass_scheme = CRYPT # update your sql query so it will look at the new field - # AND add a %w field in the query so we have the plain password in our - # Enviroment ($PLAIN_PASS) - 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 \ + # AND add a %{password} field in the query so we have the plain password in + # our Enviroment ($PLAIN_PASS) + 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 \ FROM users \ WHERE id = '%{user}' @@ -48,7 +48,7 @@ https://kaworu.ch/blog/2016/04/20/strong-crypt-scheme-with-dovecot-postfixadmin- # driver = mysql # connect = host=127.0.0.1 user=mailauth password=secret dbname=postfixadmin # default_pass_scheme = SHA512-CRYPT - # 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 \ + # 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 \ # FROM mailbox \ # WHERE username = '%{user}' } @@ -273,7 +273,7 @@ passdb passwd-file { userdb passwd-file { passwd_file_path = /var/vmail/auth.d/%{user | domain}/passwd fields { - plain_pass = %w + plain_pass = %{password} } } ``` diff --git a/docs/howto/imapc_proxy.md b/docs/howto/imapc_proxy.md index c1863a194..07d7445fc 100644 --- a/docs/howto/imapc_proxy.md +++ b/docs/howto/imapc_proxy.md @@ -56,7 +56,7 @@ This is based on already having Dovecot already compiled and installed. args = host=10.1.2.3 fields { userdb_imapc_user = %{user} - userdb_imapc_password = %w + userdb_imapc_password = %{password} } } diff --git a/docs/howto/lmtp/exim.md b/docs/howto/lmtp/exim.md index b420d0f36..8fc81c7f3 100644 --- a/docs/howto/lmtp/exim.md +++ b/docs/howto/lmtp/exim.md @@ -118,7 +118,7 @@ this problem by extending the *protocol lmtp* section: ```[dovecot.conf] protocol lmtp { ... - # use %Ln to strip away the domain part + # strip away the domain part auth_username_format = %{user|lower} } ``` diff --git a/docs/howto/virtual/simple_install.md b/docs/howto/virtual/simple_install.md index 6eb472b3e..1fba54e1f 100644 --- a/docs/howto/virtual/simple_install.md +++ b/docs/howto/virtual/simple_install.md @@ -55,7 +55,7 @@ mail_driver = maildir mail_path = ~/Maildir # If you're using POP3, you'll need this: -pop3_uidl_format = %g +pop3_uidl_format = %{guid} # Authentication configuration: auth_verbose = yes