Active Directory has a type of grouping called Distribution group used solely as an email distribution list. This page will show you how to use the distribution group as a mailing list for Postfix. But first, you need to upgrade Postfix to version 2.4 or higher. Download Postfix RPM Packages.
We will be using the following attributes
- mail – Email Address
- member – Distinguished Name of the group members
How to setup
server_host = your domain controller search_base = your search base version = 3 query_filter = (&(objectclass=group)(mail=%s)) leaf_result_attribute = mail special_result_attribute = member bind = yes bind_dn = user name bind_pw = password
leaf_result_attribute is available only in Postfix 2.4 and above which is why we really need to upgrade.
postmap -q email@example.com ldap:/etc/postfix/ldap-groups.cfReplace firstname.lastname@example.org with your own valid group email. You should see the email addresses of the members.
If you are querying a Windows 2003 Server and postmap does not seem to work, try enabling the Windows 2003 Active Directory anonymous ldap operations.
virtual_alias_maps = ldap:/etc/postfix/ldap-groups.cf
That’s it. You should now be able to send email to your distribution group.
Visit the forum to ask for help or to give a comment.