Reply to comment

Re: sender AND recipient based routing

By Viktor Dukhovni at 02/12/2018 - 14:37

Not within a single Postfix instance. With multiple instances (and much
complexity) you could use "sender A" select a different downstream instance,
where B is routed to the desired transport. This scales poorly, but if the
exceptions are few enough, and the need great, then you can do it.

Another option is to use a proxy filter, or milter to rewrite B to some
special recipient address B' when the sender is A, then route B' to a
custom nexthop, and use smtp_generic_maps to transform B' back to B
on output. This works in a single Postfix instance with a proxy filter
or milter.