I have server POSTFIX + DOVECOT with LDAP (ActiveDirectory) authorization.
/etc/postfix/ldap_virtual_mailbox_maps.cf
query_filter = (&(objectClass=person)(mail=%s))
result_filter = %s
result_attribute = mail
/etc/postfix/ldap_virtual_alias_maps.cf
query_filter = (&(objectClass=person)(othermailbox=%s))
result_attribute = othermailbox
/etc/dovecot/dovecot-ldap.conf.ext
pass_filter = (&(objectCategory=Person)(sAMAccountName=%n))
user_filter = (&(objectCategory=Person)(sAMAccountName=%n))
The email specified in the attribute "mail" works (users can send and receive messages). I specify an alias in the attribute "othermailbox" (for example - s15@domain.com).
# postmap -q s15@domain.com ldap:/etc/postfix/ldap_virtual_alias_maps.cf
s15@domain.com
When I send an email to this address (s15@domain.com) then get "Undelivered Mail Returned to Sender"
The mail system s15@domain.com: user unknown
What am I doing wrong ? I will be grateful for comments.