UserPreferences

ApplicationNotes/IspManPostfixRelay


1. ISPMan Postfix Relaying

I found that although ISPMan generates /etc/postfix/relay_domains, it was not always updated, so I thought I'd explore Postfix's LDAP mapping capabilities more and create an LDAP map for it. (Yes, I know about ispman.postfix.makemaps.) The following is the result.

/etc/postfix/main.cf:

relay_domains = /etc/postfix/relay_domains $mydestination ldap:ldaprelay

ldaprelay_server_host = localhost
ldaprelay_server_port = 389
ldaprelay_bind_dn = dc=example,dc=com
ldaprelay_bind = no
ldaprelay_timeout = 5
ldaprelay_search_base = dc=example,dc=com
ldaprelay_query_filter = (&(ispmanDomain=%s)(ispmanDomainService=mail))
ldaprelay_result_attribute = ispmanDomain
ldaprelay_lookup_wildcards = no