On Thu, Apr 02, 2020 at 10:31:32AM +0200, [email protected] wrote:
> Thanks Wietse, it worked!
Do you have good reason to expect that this will never misroute
multi-recipient email? There's a difference between "it worked
once" (in a simple test-case) and "it is reliable enough for
production use".
> > You can override the transport map with a FILTER command.
> > However:
> > - This works only for mail received with SMTP.
> > - If a message has multiple recipients, the last FILTER command wins.
-------------------------------------------------------------------
> > /etc/postfix/main.cf:
> > smtpd_recipient_restrictions =
> > # must go before permit_mynetworks
> > check_recipient_mx_access hash:/etc/postfix/rcpt_mx_access
> > permit_mynetworks
> > reject_unauth_destination
> >
> > /etc/postfix/rcpt_mx_access
> > 123.456.123.456 FILTER smtp:[relayhost.com]
The selected relayhost has to be appropriate for processing all
recipients, not just the last one to match the FILTER rule.
--
Viktor.