LDAP Backend Configuration¶
The included dovecot-ldap-backend.conf.ext can be used as template for the /etc/dovecot/dovecot-ldap.conf.ext.
Its most important settings are:
hosts = ldap.example.com
dn = cn=admin,dc=example,dc=com
dnpass = secret
base = dc=example,dc=com
Configure how the LDAP server is reached.
auth_bind = yes
Use LDAP authentication binding for verifying users’ passwords.
blocking = yes
Use auth worker processes to perform LDAP lookups in order to use multiple concurrent LDAP connections. Otherwise only a single LDAP connection is used.
pass_attrs = \
=user=%{ldap:mailRoutingAddress}, \
=password=%{ldap:userPassword}, \
=userdb_quota_rule=*:storage=%{ldap:messageQuotaHard}k
Normalize the username to exactly the mailRoutingAddress field’s value regardless of how the pass_filter
found the user. The userdb_quota_rule
is used by userdb prefetch to return the userdb values. If other userdb fields are wanted, they must be placed to both user_attrs (without userdb_
prefix) and pass_attrs (with userdb_
prefix).
user_attrs = \
=user=%{ldap:mailRoutingAddress}, \
=quota_rule=*:storage=%{ldap:messageQuotaHard}
Returns userdb fields when prefetch userdb wasn’t used (LMTP & doveadm). The username is again normalized in case user_filter
found it via some other means.
pass_filter = (mailRoutingAddress=%u)
user_filter = (mailRoutingAddress=%u)
How to find the user for passdb lookup.
iterate_attrs = mailRoutingAddress=user
iterate_filter = (objectClass=smiMessageRecipient)
How to iterate through all the valid usernames.