Over a weekend myself and my CoWorker decided to create a mail system using ActiveDirectory as a backend database for authentication of usernames.
This allows us a single central database for users names/passwords.
Software Configuration:
to be continued...
We need to two entries to the exim config file (/etc/exim/exim.conf). The director entry (active_directory_user) takes a (local) email address after alias expansion (remember, order is important) and decides whether the mailbox exists and if so, what transport should be used to deliver the mail. The transport entry (local_delivery_cyrus) will use cyrdeliver to pass the resolved mail to the cyrus mailbox and will return an error if the mailbox doesn't exist.
driver = aliasfile search_type = ldapm query = "user=\"cn=admin,ou=Accounts,dc=domain,dc=co,dc=nz\" pass=\"Secret12\" \
ldap://adserver.domain.co.nz:389/dc=domain,dc=co,dc=nz?sAMAccountName?sub?(sAMAccountName=$local_part)"
expand transport = local_delivery_cyrus
See LDAPNotes for more information on LDAP Urls / Searches.
2 pages link to ActiveDirectoryMail: