Query Exchange with Postfix
This is a simple, but cool, recipe for querying Exchange from Postfix. This is used with a Windows 2003 Small Business Server, running (s)Exchange 2003.
We don't often use this, because of the obvious problem of being unable to receive mail when Exchange crashes or must be rebooted. It is nice though, and a straight forward solution.
bind_dn = cn=Spamfilter User,cn=Users,dc=MySBS,dc=org bind_pw = kill$pam scope = sub search_base = dc=MySBS,dc=org server_host = ldaps://Server.MySBS.org:636 start_tls = no version = 3 result_attribute = mail query_filter = (&(objectClass=user)(|(mail=%s)(proxyAddresses=SMTP:%s)))
firewall postfix # postmap -q kelly@MySBS.org ldap:/etc/postfix/exchange_map.cf kelly@MySBS.org firewall postfix # postmap -q fakeuser@MySBS.org ldap:/etc/postfix/exchange_map.cf firewall postfix # postmap -q firstname.lastname@example.org ldap:/etc/postfix/exchange_map.cf
..... relay_recipient_maps = ldap:/etc/postfix/exchange_map.cf .....
So, Kelly exists, but fakeuser, and Joshua are (mysteriously) absent.