It is very straight forward configuring LDAP support into Postfix. There
are three steps:
1) compile LDAP support into Postfix
2) edit /etc/postfix/main.cf
3) add the relevent routing & alias data to your LDAP server.
2. edit /etc/postfix/main.cf to point to your LDAP server for it's alias maps:
alias_maps tells Postfix to look in /etc/aliases first, and then
query the LDAP server as specified by the ldapsource lines.
ldapsource_server_host specifies the LDAP server
ldapsource_search_base specifies where in the LDAP heirarchy to search
ldapsource_query_filter is not required, but is recommended to
prevent programs from being specified as an alias - which has dire security
consequenses.
3. A typical /etc/alias entry looks like this:
which tells Postfix to accept mail addressed to "eric_harrison" but deliver it to the mailbox of "eharrison". The same concepts can be added into the LDAP directory with the attributes mailacceptinggeneralid and maildrop
If you'd like more details, take a look at the documentation shipped with Postfix: LDAP_README
Feedback & additional documentation would be more than welcome!
Eric Harrison