1

Topic: Active Directory integration in Dovecot

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.8.8
- Deployed with downloadable installer
- Linux/BSD distribution name and version: Debian13
- Store mail accounts: LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I installed iredmail 1.8.8 with OpenLDAP on Debian13 and configured the integration with ActiveDirectory according to the official instructions

The connection between Dovecot and AD via LDAP is not working. The diagnostics show that Dovecot is using the configuration from the dovecot.conf file and is not taking into account the connection parameters in the dovecot-ldap.conf file.

Example of an error:

# telnet localhost 143
Trying ::1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LOGIN-REFERRALS ID ENABLE IDLE SASL-IR LITERAL+ STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
. login mailuser@staff.local ********
. NO [AUTHENTICATIONFAILED] Authentication failed.
==========================================

dovecot-ldap.conf:

hosts           = pc01.staff.local:389
ldap_version    = 3
auth_bind       = yes
dn              = cn=intmail2-ldap,dc=staff,dc=local
dnpass          = ************
base            = ou=chelgu,dc=staff,dc=local
scope           = subtree
deref           = never
debug_level     = 0

# Below two are required by command 'doveadm mailbox ...'
iterate_attrs   = userPrincipalName=user
iterate_filter  = (&(userPrincipalName=*)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))

user_filter     = (&(userPrincipalName=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
pass_filter     = (&(userPrincipalName=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
pass_attrs      = userPassword=password
default_pass_scheme = CRYPT
user_attrs      = mail=master_user,mail=user,=home=/var/vmail/vmail1/%Ld/%Ln/,=mail=maildir:~/Maildir/
============================================

The output of doveconf -n shows the default LDAP connection parameters from the dovecot.conf file.

***
ldap_auth_dn = cn=vmail,dc=staff,dc=local
ldap_auth_dn_password = # hidden, use -P to show it
ldap_base = o=domains,dc=staff,dc=local
ldap_uris = ldap://127.0.0.1:389
***

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.