We are migrating from a postfix/dovecot installation to zimbra open source and need to enforce senders security.
Actually our postfix is configured to restrict authenticated senders to use only authorized emails addresses from Active Directory field "userPrincipalName, mail and othermailbox". This is the configuration on main.cf
smtpd_sender_login_maps = ldap:/etc/postfix/ldap_sender_map.conf
and here is the listing of /etc/postfix/ldap_sender_map.conf
result_format = %s
result_attribute = userPrincipalName othermailbox mail
server_host = xxx.xxx.xxx.xxx
domain = domain.org.ma
version = 3
bind = yes
bind_dn = domain\adrbook
bind_pw = password
query_filter = (&(objectclass=person)(|(userPrincipalName=%s)(oth ermailbox=%s)(mail=%s)))
search_base = dc=domain,dc=org,dc=ma
We found this wiki article to achieve the same think with zimbra
Enforcing a match between the FROM address and the sasl username - Zimbra :: Wiki
The problem is that we need the ldap connexion to retrieve the information from Active Directory not from the local Ldap and these specifics field "userPrincipalName, mail and othermailbox"
Please can you help us to get the right Ldap query in order to make it work with Zimbra.
Thank you for your help.