On this page
Postfix: Limit Outgoing Mail Throttling
Software version | 2.10 |
Operating System | Debian 7 |
Website | Postfix Website |
Introduction
When you have a huge amount of mail to deliver, you can’t release the queue at once and let the server maximize the outgoing mail throughput! The result will be: you’ll get blacklisted from a lot of MX servers.
That’s why you should take care of it and do traffic shaping
Usage
You can add those lines in your Postfix configuration1:
|
|
- default_destination_concurrency_limit: This means that postfix will up to two concurrent connections per receiving domains. The default value is 20.
- default_destination_rate_delay: Postfix will add a delay between each message to the same receiving domain. It overrides the previous rule and in this example, it will send one email after another with a delay of 1 second. If you want to disable this rule, either delete it or set to 0.
- default_extra_recipient_limit: Limit the number of recipients of each message. If a message had 20 recipients on the same domain, postfix will break it out to two different email messages instead of one.
Then restart your Postfix.
Limit by domain
You can limit per domain if you want like this:
|
|
Then add domains with the wished policy:
|
|
Edit master configuration to inform postfix of those config. Add those lines:
|
|
Postmap and reload:
|
|
You’re done :-)
Resources
Last updated 06 Aug 2015, 00:10 CEST.