On Mon, Mar 27, 2023 at 11:21:15AM +0000, Gino Ferguson via Postfix-users wrote:

> How can one set up outbound rate limiting for a certain mail service
> provider? 

Postfix rate limiting is implemented in the queue manager, which does
not (and cannot without a major redesign) know the MX hosts associated
with a given domain, so unavoidably rate limits are per nexthop domain.

> Can postfix 'recognise' that recipientdomainA, recipientdomainB and
> recipientdomainC are hosted at the same mail service provider
> (bigmxprovider.com) so this limiting must be applied automatically? 

No.  This is essentially impossible to do in a single-process queue
manager.

* The queue manager would have to be split into a multi-process
  front end responsible for address resolution and construction of
  message envelopes, and the actual single-process scheduler,
  maintaining the active queue.

* This is further complication by multiple and partially overlapping
  MX records, which may mean that it is not clear which server's
  connection quota is actually used when it comes time to deliver
  the message.

* Therefore, there would perhaps need to be a 2-stage active queue,
  with the second stage handling per-server rate limits, but even
  then it is not clear exactly how to signal back to the primary
  queue that certain destinations are blocked until some deliveries
  complete and rate delays expire.

This remains a non-trivial unsolved problem.

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to