We're using virtual_alias_domains to tell postfix we handle the domain and virtual_alias_maps to rewrite the address we want to forward to.
But in some cases, the rewritten address has the same domain, but we don't handle it (and we're not the mx for that domain, the mail gets forwarded to us in the first place via a hardcoded method that doesn't do mx lookups).
So basically I want postfix to accept the mail for the domain example.com do a virtual_alias_maps lookup, which returns (for example) [email protected] and then forward the mail to the real mx for example.com.
I've tried a bunch of things, but it seems as long as example.com is in our virtual_alias_domains list (which it has to be or postfix won't accept the mail in the first place) I can't get it to try and send the email out via the real mx.
Any suggestions?
One possible approach, which does work, is to create "Transport Mappings" for those domains to forward off to either:
The first approach is basically "hardwiring" based on a point-in-time MX configuration for the actual destination domain (which may change over time).
The second approach will facilitate the "regular" SMTP delivery via live DNS lookups, but will require an additional SMTP host/relay partner.