On Thu, Oct 12, 2023 at 02:02:55AM +0200, Daniel Ryšlink via Postfix-users wrote:
> It's generally very useful to set up a specific transport for "sensitive" > domains like gmail.com with specific policy (throttling outgoing message > rate, etc). > > However, since more and more hosted domains use mail services for their > domains, it would be useful to be able to select apropriate transport not > according to domain or recipient e-mail, but according to the IPs address of > the server specified by the MX record of the domain. > > Could it be achieved via Postfix configuration somehow? The transport table > format does not seem to support this. Sadly, no. Transport selection and scheduling happens in the queue manager, which does not know which MX hosts an SMTP delivery might later resolver to. And even if it were MX-aware, what to when: - Some MX host IP addresses are associated with one transport choice and some with another? - The actual MX hosts that are up and going to be used are not the highest priority ones? - The IP addresses that have not saturated their concurrency are not the ones the SMTP delivery agent ultimately chooses when delivery happens. - ... Adding Postfix support for IP-based concurrency limits across separate nexthop domains would require a radical redesign of the queue manager and/or SMTP delivery agents. So not likely any time soon. Once a particular IP address is selected, the delivery would have to go back into some sort of queue, freeing up the delivery agent that performed the MX and address lookups, and that secondary queue would have to implement concurrency limits by IP and pass the envelope back for actual delivery. Something along the lines a 2-stage SMTP delivery agent, with a handoff to a second-stage queue along the way. -- Viktor. _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org