@@ -83,7 +83,7 @@ $ ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f doveauth_access.ldif
8383The two important settings in password lookups are:
8484
8585- [[ setting,ldap_filter]] specifies the LDAP filter how user is found from the
86- LDAP. You can use all the normal [[ variable]] like ` %u ` in the filter.
86+ LDAP. You can use all the normal [[ variable]] like ` %{user} ` in the filter.
8787
8888- [[ setting,passdb_fields]] specifies a list of attributes that are returned and
8989 how to produce the returned value.
@@ -133,7 +133,7 @@ to the same case as it's in the LDAP database. You can do this by
133133returning "user" field in [[ setting,passdb_fields]] setting, as shown in the above example.
134134
135135If you can't normalize the username in LDAP, you can alternatively
136- lowercase the username via [[ setting,auth_username_format,%Lu ]] .
136+ lowercase the username via [[ setting,auth_username_format,%{user | lower} ]] .
137137
138138#### Use Worker
139139
@@ -160,7 +160,7 @@ A typical configuration would look like:
160160 passdb ldap {
161161 bind = no
162162 default_password_scheme = MD5
163- ldap_filter = (&(objectClass=posixAccount)(uid=%u ))
163+ ldap_filter = (&(objectClass=posixAccount)(uid=%{user} ))
164164 fields {
165165 user = %{ldap:uid}
166166 password = %{ldap:userPassword}
@@ -201,7 +201,7 @@ Example:
201201``` [dovecot.conf]
202202 passdb ldap {
203203 bind = yes
204- ldap_filter = (&(objectClass=posixAccount)(uid=%u ))
204+ ldap_filter = (&(objectClass=posixAccount)(uid=%{user} ))
205205 fields {
206206 user = %{ldap:uid}
207207 }
@@ -224,14 +224,14 @@ so the prefetch optimization doesn't help.
224224If you're using DN template, [[ setting,passdb_fields]] and [[ setting,ldap_filter]] settings
225225are completely ignored. That means you can't make passdb return any
226226[[ link,passdb_extra_fields]] . You should also set
227- [[ setting,auth_username_format,%Lu ]] in ` dovecot.conf ` to normalize the
227+ [[ setting,auth_username_format,%{user | lower} ]] in ` dovecot.conf ` to normalize the
228228username by lowercasing it.
229229
230230::: code-group
231231``` [dovecot.conf]
232232 passdb ldap {
233233 bind = yes
234- bind_userdn = cn=%u ,ou=people,o=org
234+ bind_userdn = cn=%{user} ,ou=people,o=org
235235 }
236236```
237237:::
@@ -355,7 +355,7 @@ The most important settings are:
355355
356356::: code-group
357357``` [dovecot.conf]
358- passdb_ldap_bind_userdn = %u
358+ passdb_ldap_bind_userdn = %{user}
359359 passdb_ldap_bind = yes
360360```
361361:::
@@ -403,15 +403,15 @@ distinct values inside each [[setting,passdb]] / [[setting,userdb]] section):
403403
404404::: code-group
405405``` [dovecot.conf]
406- ldap_filter = (mailRoutingAddress=%u )
406+ ldap_filter = (mailRoutingAddress=%{user} )
407407```
408408:::
409409
410410- How to iterate through all the valid usernames:
411411
412412::: code-group
413413``` [dovecot.conf]
414- ldap_filter = (mailRoutingAddress=%u )
414+ ldap_filter = (mailRoutingAddress=%{user} )
415415 ldap_iterate_filter = (objectClass=messageStoreRecipient)
416416 iterate_fields {
417417 user = %{ldap:mailRoutingAddress}
@@ -434,7 +434,7 @@ The following variables can be used inside the [[setting,passdb]] / [[setting,us
434434| ` %{ldap_multi:attrName:::default} ` | [[ added,ldap_multi_added]] How to specify a column ` ":" ` as separator, default explicitly defined. |
435435| ` %{ldap_multi:attrName:,} ` | [[ added,ldap_multi_added]] How to specify a comma ` "," ` as separator, default is ` "" ` . |
436436| ` %{ldap_multi:attrName:,:default} ` | [[ added,ldap_multi_added]] How to specify a comma ` "," ` as separator, default explicitly defined. |
437- | ` %{ldap_dn } ` | Retrieves the Distinguished Name of the entry. |
437+ | ` %{ldap:dn } ` | Retrieves the Distinguished Name of the entry. |
438438
439439### Multiple Queries via userdbs
440440
@@ -463,7 +463,7 @@ userdb ldap2 {
463463
464464### Variables and Domains
465465
466- User names and domains may be distinguished using the Variables ` %n ` and ` %d ` .
466+ User names and domains may be distinguished using the Variables ` %{username} ` and ` %{domain} ` .
467467They split the previous username at the ` @ ` character.
468468
469469The previous username is:
@@ -477,19 +477,19 @@ The previous username is:
477477 If the (LDAP) password database has:
478478 ```
479479 fields {
480- user = %n
480+ user = %{username}
481481 }
482482 ```
483483 then the domain part of the login name will be stripped by the password database.
484484
485- - The userdb will not see any domain part, i.e. ` %n ` and ` %u ` are the same
485+ - The userdb will not see any domain part, i.e. ` %{username} ` and ` %{user} ` are the same
486486 thing for the userdb. The userdb may set a new username, too, using:
487487 ```
488488 fields {
489489 user = ...
490490 }
491491 ```
492- This will be used for Logging ` %u ` and ` %d `
492+ This will be used for Logging ` %{user} ` and ` %{domain} `
493493 variables in other parts of the configuration (e.g. quota file names).
494494
495495::: code-group
@@ -540,7 +540,7 @@ them globally with [[setting,mail_uid]] and [[setting,mail_gid]] settings instea
540540returning them from LDAP.
541541
542542```
543- ldap_filter = (&(objectClass=posixAccount)(uid=%u ))
543+ ldap_filter = (&(objectClass=posixAccount)(uid=%{user} ))
544544ldap_iterate_filter = (objectClass=posixAccount)
545545fields {
546546 home = %{ldap:homeDirectory}
@@ -580,12 +580,12 @@ fields {
580580```
581581
582582You can add static fields that aren't looked up from LDAP. For example
583- create a "mail_path" field with value ` /var/vmail/%d/%n /Maildir ` :
583+ create a "mail_path" field with value ` /var/vmail/%{domain}/%{username} /Maildir ` :
584584
585585```
586586fields {
587587 quota_storage_size = %{ldap:quotaBytes}B
588- mail_path = /var/vmail/%d/%n /Maildir
588+ mail_path = /var/vmail/%{domain}/%{username} /Maildir
589589}
590590```
591591
@@ -596,17 +596,17 @@ userDomain attribute doesn't exist, example.com is used instead.
596596### Variables and Domains
597597
598598User names and domains may be distinguished using the [[ variable]]
599- ` %n ` and ` %d ` . They split the * previous username* at the "@" character. The
599+ ` %{username} ` and ` %{domain} ` . They split the * previous username* at the "@" character. The
600600* previous username* is:
601601
602602- For LMTP, it will be ` user@hostname ` , where hostname depends on e.g.
603603 the Postfix configuration.
604604
605605- For IMAP, it will be whatever the password database has designated as
606606 the username. If the (LDAP) password database [[ setting,passdb_fields ]]
607- contains ` user=%n ` , then the domain part of the login name will be stripped by
607+ contains ` user=%{username} ` , then the domain part of the login name will be stripped by
608608 the password database. The userdb will not see any domain part, i.e.
609- %n and %u are the same thing for the userdb.
609+ %{username} and %{user} are the same thing for the userdb.
610610
611611The userdb may set a new username, too, using
612612```
@@ -619,5 +619,5 @@ This will be used for:
619619
620620- Logging
621621
622- - ` %u ` and ` %d ` variables in other parts of the configuration (e.g. quota
622+ - ` %{user} ` and ` %{domain} ` variables in other parts of the configuration (e.g. quota
623623 file names)
0 commit comments