|
4 | 4 | # |
5 | 5 | # <doc/wiki/AuthDatabase.LDAP.txt> |
6 | 6 |
|
7 | | -passdb { |
8 | | - driver = ldap |
| 7 | +# This file is opened as root, so it should be owned by root and mode 0600. |
| 8 | +# |
| 9 | +ldap_uris = {{ dovecot_ldap_host }} |
| 10 | + |
| 11 | +# Distinguished Name - the username used to login to the LDAP server. |
| 12 | +# Leave it commented out to bind anonymously (useful with auth_bind=yes). |
| 13 | +ldap_auth_dn = {{ dovecot_ldap_user }} |
| 14 | + |
| 15 | +# Password for LDAP server, if dn is specified. |
| 16 | +ldap_auth_dn_password = {{ dovecot_ldap_password }} |
| 17 | + |
| 18 | +# TLS options, currently supported only with OpenLDAP: |
| 19 | +ldap_tls_ca_cert_file = {{ dovecot_ldap_tls_ca }} |
9 | 20 |
|
10 | | - # Path for LDAP configuration file, see example-config/dovecot-ldap.conf.ext |
11 | | - args = /etc/dovecot/dovecot-ldap.conf.ext |
12 | | -} |
13 | 21 |
|
14 | | -userdb { |
15 | | - driver = prefetch |
| 22 | +# LDAP protocol version to use. Likely 2 or 3. |
| 23 | +ldap_version = 3 |
| 24 | + |
| 25 | +# LDAP base. %variables can be used here. |
| 26 | +# For example: dc=mail, dc=example, dc=org |
| 27 | +ldap_base = cn=users,cn=accounts,dc=box,dc=pydis,dc=wtf |
| 28 | + |
| 29 | +# User attributes are given in LDAP-name=dovecot-internal-name list. The |
| 30 | +# internal names are: |
| 31 | +# uid - System UID |
| 32 | +# gid - System GID |
| 33 | +# home - Home directory |
| 34 | +# mail - Mail location |
| 35 | +# |
| 36 | +# There are also other special fields which can be returned, see |
| 37 | +# http://wiki2.dovecot.org/UserDatabase/ExtraFields |
| 38 | +ldap_user_attrs = uidNumber=uid, sieve=${home}/main.sieve, sieve_user_log=${home}/sieve.log |
| 39 | + |
| 40 | +passdb ldap { |
| 41 | + fields { |
| 42 | + uidNumber = %{ldap:uid} |
| 43 | + sieve = ${home}/main.sieve |
| 44 | + sieve_user_log = ${home}/sieve.log |
| 45 | + } |
| 46 | + bind = yes |
| 47 | + bind_userdn = uid=%{user},cn=users,cn=accounts,dc=box,dc=pydis,dc=wtf |
| 48 | + |
| 49 | + filter = (&(objectClass=posixAccount)(uid=%{user})) |
| 50 | + driver = ldap |
16 | 51 | } |
17 | 52 |
|
18 | | -userdb { |
| 53 | +userdb ldap { |
| 54 | + fields { |
| 55 | + uidNumber = %{ldap:uid} |
| 56 | + sieve = ${home}/main.sieve |
| 57 | + sieve_user_log = ${home}/sieve.log |
| 58 | + } |
| 59 | + filter = (&(objectClass=posixAccount)(uid=%{user})) |
19 | 60 | driver = ldap |
20 | | - args = /etc/dovecot/dovecot-ldap.conf.ext |
21 | 61 | } |
0 commit comments