Been try to find a similar setup like this but cannot find it or simply don't know exactly what to search for.
Scenario: we just took over abc.com email operations, but there is still another server that handles a few accounts for that domain as well. MX now points to us, but if we don't have the user with that domain here, we still want to try delivering the mail to the old server, and it can bounce the mail if the recipient doesn't exist.
Steps would be:
Email comes in, check if the domain is something we handle otherwise reject.
Check if the email address exists in LDAP, if it does, send email to a specified mail server.
If it doesn't exist in LDAP, check secondary file for domain specific server to send that mail to.
If it doesn't exist in LDAP and the domain is not specified in the secondary file, bounce it.
I am using mydestination for domain checking and alias_maps for ldap lookup, both work.
Is this possible with Postfix?
If it doesn't exist in LDAP and the domain is not specified in the secondary file, bounce it.
)is not necessary as it is done in 1st step itself. And yes it is doable in postfix