Centos – Postfix Stagger/Rate Limit Outbound Mail

centosemailpostfix

We have a server that sends our weekly newsletter to subscribers, To prevent people like Hotmail or Yahoo from blocking us due to sending too many simultaneous emails to them, Is there a way we can stagger email, or rate-limit outbound emails from postfix?

Keep in mind, I dont want the mailserver to stop queueing mail or accepting new messages, Simply defer delivery if there are more then 3-4 messages per destination domain/ipaddress, or something similar.

Note: I dont want a Sender Throttle, as described in a similar question, here.
I'm looking more for a recipient throttle but haven't had any luck finding out how to do so with PolicyD or Anvil services, and was wondering if anyone else has accomplished such a task.

Best Answer

You could use the deadbeats trick:

main.cf:

transport_maps = hash:/etc/postfix/transport
deadbeats_destination_concurrency_limit = 50

master.cf:

deadbeats unix - - n - - smtp -o smtp_connect_timeout=5 -o smtp_helo_timeout=5 smtp_connect_timeout=2

transport.cf:

hotmail.com             deadbeats:
yahoo.com               deadbeats:
earthlink.net           deadbeats:
freemail.com.au         deadbeats:
Related Topic