2020-11-15 15:56:09 UTC
I have set up a default smart host/relay host for all external mail as follows:
relayhost = [184.108.40.206]:587
However, I want mail for recipients with specific MX (n.b. *google.com) to be sent directly, bypassing the relayhost, so I did:
/google\.com$/ FILTER smtp:
/googlemail\.com$/i FILTER smtp:
This is working as expected for a single recipient. However, if mail is addressed to multiple recipients (using To:/Cc:/Bcc:) and some of the specified recipients satisfy the mxtransport rule and some do not, Postfix sends mail to ALL recipients directly, ignoring the default relayhost definition.
For example, if I send email to ***@gmail.com, Postfix correctly sets the filter and sends mail directly without using smarthost. However, if I send mail to multiple recipients: ***@outlook.com, ***@gmail.com, it would skip smarthost and send mail directly to both recipients, if FILTER rule had been applied to both.
Is it possible to have different transport per recipient when multiple recipients are specified?