Hi,
I have inherited a postfix MDA that I'm just trying to understand and we
currently have a problem with the forwarding of emails using LDAP lookups.
Currently an email is forwarded if it matches the below map:
virtual_alias_maps = ldap:ldapforward
ldapforward_query_filter =
(&(|(mail=%s)(mailalternateaddress=%s))(mailforwardingaddress=*))
ldapforward_result_attribute = mailforwardingaddress
Now if we have the following 2 LDAP users:
mail=...@somedomain.com
mail=f...@somedomain.com
mailalternateaddress=catch...@somedomain.com
mailforwardingaddress=f...@elsewhere.com
The initial lookup doesnt match against bob as he has no mailforward,
but then the postfix catchall lookup matches against the 2nd address and
forwards the email that should of gone to bob.
Whats the solution for this setup? How do I stop LDAP filters matching
the catchall mailbox when a more specific one exists without a mailforward?
We will need to do similar things to this later with AV & anti-spam
where we will need to match against bob and only match against catchall
when there is no bob email account etc. I have been searching but havent
found solutions to this problem, I'm guessing we are doing it wrong if
others dont have this issue.
Thanks in advance.
Jim.