Results 1 to 1 of 1
Dear all,
I'm posting this helpful info here, because I would have saved time if I didn't have to find it out by myself.
Say you have aliases for Sendmail ...
- 09-21-2010 #1Just Joined!
- Join Date
- Sep 2010
- Location
- Luxembourg
- Posts
- 4
Use existing Sendmail LDAP aliases from Postfix
Dear all,
I'm posting this helpful info here, because I would have saved time if I didn't have to find it out by myself.
Say you have aliases for Sendmail in your LDAP (OpenLDAP in my case), and you want to migrate your servers from Sendmail to Postfix because Sendmail was already obsolete when Julius Cesar was born, and in not very friendly to configure, and puts stupid messages in maillog, etc...
The problem is that Postfix is not able to read them, by default Postfix will look for a maildrop entry in the LDAP.
So here is the solution :
a file /etc/postfix/ldap-aliases.cf containing this :
# Config of sendmail aliases fetch from LDAP
#
server_host = ldapserver.yourdomain.tld
search_base = dc=yourdomain, dc=tld
query_filter = sendmailMTAKey=%s
result_attribute = sendmailMTAAliasValue
It is then added to the main.cf like this :
alias_maps = hash:/etc/postfix/aliases, ldap:/etc/postfix/ldap-aliases.cf
And additionnally if you need canonical rewrite of senders address, you can also add this too:
# Rewrite sender's address according to ldap alias if it exists
sender_canonical_maps = ldap:/etc/postfix/ldap-aliases.cf
Hope this helps
Cheers,
M.E.


Reply With Quote