> On Dec 27, 2017, at 8:42 PM, l carr <[email protected]> wrote:
>
> The domains are not defined under mydestination, they are defined under
> virtual_alias_domains. So it sounds like the fallback_transport may not
> work for us. Is there any other way to accomplish that same scenario?
Just change move the domains from virtual_alias_domains to relay_domains:
main.cf:
indexed = ${default_database_type}:${config_directory}/
parent_domain_matches_subdomains = smtpd_access_maps
relay_domains = ldap-complete.example
relay_transport = relay:[legacy-server.example]
virtual_alias_domains = ldap-incomplete.example
virtual_alias_maps = ldap:${config_directory}/ldap-valias.cf
# If you have no list of valid recipients, as a last resort
# accept all relay recipients
#
relay_recipient_maps = static:all
# Otherwise deploy some suitable table that lists all valid
# recipients.
#
# relay_recipient_maps = ...
This works because virtual alias domains always rewrite into some
underlying domain for delivery, which works already. So any remaining
recipients that don't get rewritten can be handled via relay_transport
after changing the problem domains to relay_domains. After all the
problem recipients are resolved, move them back to the virtual alias
domains list.
You might end up with a bit of a backscatter problem if you can't
enumerate valid recipients. Don't let this fester.
--
Viktor.