Expand dovecot recipients from ldap group

Maksim Rodin via dovecot <[email protected]> Wed, 13 May 2026 13:37:44 +0300
Newsgroups gmane.mail.imap.dovecot
Message-ID <k7vnnltpcdf2qdlwcxvz4dtxl7kvttietjyjzeydh4fqrx5mx5@nhfs3bawzbfg>
Hello,

I have set up dovecot (2.3.21) to get its recipients from Active
Directory.

I can successfully get recipients from Active Directory user objects
using their sAMAccountName:

# cat /etc/dovecot/local.conf
...
passdb users {
	driver = ldap
	args = /etc/dovecot/dovecot-ldap_domain.conf.ext
}
userdb users {
	driver = static
	args = uid=vmail gid=vmail
}
...

Here is the relevant part of the ldap config:
# cat /etc/dovecot/dovecot-ldap_domain.conf.ext
...
user_attrs = \
	=home=/vmail/%{ldap:sAMAccountName}, \
	=uid=vmail, \
	=gid=vmail
pass_filter = (&(objectCategory=person)(mail=%u))
user_filter = (&(objectCategory=person)(mail=%u))
...


I can also successfully get user aliases from Active Directory user objects
using their otherMailbox attribute:

# cat /etc/dovecot/local.conf
...
userdb aliases {
	driver = ldap
	args = /etc/dovecot/dovecot-ldap_domain_aliases.conf.ext
}
...

Here is the relevant part of the ldap config:
# cat /etc/dovecot/dovecot-ldap_domain_aliases.conf.ext:
...
user_attrs = \
=home=/vmail/%{ldap:sAMAccountName}, \
=uid=vmail, \
=gid=vmail
pass_filter = (&(objectCategory=person)(otherMailbox=%u))
user_filter = (&(objectCategory=person)(otherMailbox=%u))

Now I am struggling with the task of getting recipients from Active Directory group
objects to handle them as distribution groups.
Is there a way to expand an Active Directory group object to multiple
recipients?

I know all of this can be done with postfix ldap module, but I would like to handle all
the delivery tasks to dovecot LMTP.

-- 
Best regards
Maksim Roin
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]