> On Feb 12, 2018, at 12:10 PM, flymike <m...@thosehallidays.org> wrote: > > I have a requirement to deliver via 'X' when sender = 'A' /and/ recipient = > 'B', else deliver via configured defaults. > I see how I could use sender_dependent_default_transport_maps to set nexthop > to 'X' when sender = 'A' but I still need to deal with the additional > condition that recipient = 'B'. > It's like I need multiple transport tables, dependent upon sender. > Is there any way to fulfill this requirement within the postfix framework?
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. -- Viktor.