https://github.com/lldap/lldap logo
Dave A68 - Hi all - I am struggling to get my d...
# troubleshooting
d
Hi all - I am struggling to get my docker mailserver to authenticate against lldap. Below is an excerpt from the docker mailserver logs and my compose.yaml file. Any help hugely appreciated!!! environment: # Core LDAP Configuration - ACCOUNT_PROVISIONER=LDAP - LDAP_SERVER_HOST=ldap://lldap:3890 - LDAP_SEARCH_BASE=ou=people,dc=recognition-circular,dc=org - LDAP_BIND_DN=cn=admin,ou=people,dc=recognition-circular,dc=org - LDAP_BIND_PW=Rec0gnition123 - LDAP_QUERY_FILTER_USER=(&(mail=%s)(mailEnabled=TRUE)) - LDAP_QUERY_FILTER_GROUP=(&(mailGroupMember=%s)(mailEnabled=TRUE)) - LDAP_QUERY_FILTER_ALIAS=(|(&(mailAlias=%s)(objectClass=PostfixBookMailForward))(&(mailAlias=%s)(objectClass=PostfixBookMailAccount)(mailEnabled=TRUE))) - LDAP_QUERY_FILTER_DOMAIN=(|(&(mail=*@%s)(objectClass=PostfixBookMailAccount)(mailEnabled=TRUE))(&(mailGroupMember=*@%s)(objectClass=PostfixBookMailAccount)(mailEnabled=TRUE))(&(mailalias=*@%s)(objectClass=PostfixBookMailForward))) # Dovecot-Specific LDAP Mapping - DOVECOT_USER_FILTER=(&(objectClass=inetOrgPerson)(|(uid=%u)(mail=%u))) - DOVECOT_USER_ATTRS=uid=5000,gid=5000,home=/var/mail/%Ln,mail=maildir:~/Maildir - DOVECOT_PASS_FILTER=(&(objectClass=inetOrgPerson)(|(uid=%u)(mail=%u))(userPassword={SHA1}%w)) - DOVECOT_AUTH_BIND=yes # SASL Configuration - ENABLE_SASLAUTHD=1 - SASLAUTHD_MECHANISMS=ldap - SASLAUTHD_LDAP_SERVER=ldap://lldap:3890 - SASLAUTHD_LDAP_BIND_DN=cn=admin,ou=people,dc=recognition-circular,dc=org - SASLAUTHD_LDAP_PASSWORD=Rec0gnition123 - SASLAUTHD_LDAP_SEARCH_BASE=ou=people,dc=recognition-circular,dc=org - SASLAUTHD_LDAP_FILTER=(&(objectClass=PostfixBookMailAccount)(mail=%U))
a
message has been deleted
n
mailEnabled is a custom attribute you created?
Your alias and domain queries won't work (because they can't, you can't put that info in LLDAP)
d
Thanks! I took those filters from the Docker Mailserver Examples - having commented those lines out of my config seems to have helps, but still have issues... 2025-04-21T14:41:20.451748+02:00 mail dovecot: auth: ldap(xxx@recognition-circular.org,89.241.29.42,): unknown user (SHA1 of given password: 172710) 2025-04-21T14:41:22.499605+02:00 mail dovecot: imap-login: Disconnected: Aborted login by logging out (auth failed, 1 attempts in 2 secs): user=, method=PLAIN, rip=89.241.29.42, lip=172.21.0.2, TLS, session=
n
Could you turn on verbose logging in LLDAP and post your logs?
d
yes - but will need to do it a bit later - thanks again
I have got it working now - I readjusted a few variables in my mailserver docker compose following the example on the page https://github.com/lldap/lldap/blob/main/example_configs/mailserver.md. Thanks for your help!