Dovecot-LMTP and LDAP: passdb doesn't support credential lookups

Sven Hartge sven at svenhartge.de
Wed Mar 30 20:00:58 UTC 2016


Niols <niols at niols.fr> wrote:

> Here is my /etc/dovecot/conf.d/auth-ldap.conf.ext. I use the static
> driver for userdb, and the LDAP driver for passdb.

>     passdb {
>       driver = ldap
>       args = /etc/dovecot/dovecot-ldap.conf.ext
>     }

>     userdb {
>       driver = static
>       args = uid=mail gid=mail home=/var/mail/%u
>     }

My config:

passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}

userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  default_fields = uid=virtmail gid=virtmail home=/srv/mail/%2NLn/%2.256NLn/%Ln/ quota_rule2=Trash:ignore
  driver = ldap
}

I also use ldap for the userdb, because I need to lookup the quota from
LDAP. 

> Here is my /etc/dovecot/dovecot-ldap.conf.ext file.

>     hosts = localhost
>     ldap_version = 3
>     dn = cn=dovecot,ou=services,dc=niols,dc=fr
>     dnpass = a-random-password

>     auth_bind = yes
>     base = ou=people,dc=niols,dc=fr

>     pass_filter = (&(objectClass=inetOrgPerson)(mail=%u))

Here is my ldap.conf.ext, there is some elaborate filtering going on,
but you should get the idea:

hosts = ldap.somedomain.de
dn = cn=mailsystem,ou=systemuser,dc=somedomain,dc=de
dnpass = verySecurePassword
tls = yes
auth_bind = yes
ldap_version = 3
base = dc=somedomain,dc=de
deref = always
scope = subtree
user_attrs = =quota_rule=*:bytes=%{ldap:gifb-mailquota}
user_filter = (&(objectClass=gifb-mailperson)(ou=SomeLocation)(uid=%Ln)(!(objectClass=gifb-role)))
pass_attrs = uid=user,userPassword=password
pass_filter = (&(objectClass=gifb-mailperson)(ou=SomeLocation)(gifb-status=1)(uid=%n)(!(objectClass=gifb-role)))
iterate_attrs = uid=user
iterate_filter = (&(objectClass=gifb-mailperson)(ou=SomeLocation))

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.



More information about the dovecot mailing list