Postfix Rate Limiting


#1

So the other day I had to decomission an old mail server and replace it with a new one. But the new server had a cold IP, and I didnt have time to run IP warmup process. Soon there were 421 temporary blocked messages all over the log. So i had to limit the mailing rate. I put these in my postfix systems main.cf file, residing in /etc/postfix/main.cf

smtp_destination_concurrency_limit = 2

smtp_destination_rate_delay = 60s

The first line, smtp_destination_concurrency_limit = 2 makes sure that no more than two connections are made to the same recipient domain’s MX server. This is an extremely polite configuration, and if you are not sending unsolicited bulk email, will lead to great IP reputation.

The second line, smtp_destination_rate_delay = 60s will add a delay between subsequent delivery attempts to same domain.

You may also use:

default_destination_concurrency_limit = 2
default_destination_rate_delay = 60s

Since the default remote transport in a postfix system is almost always SMTP, both of the above configurations will work. But the later configurations are likely to slow down deliveries to LMTP or local mailbox(or virtual) deliveries.