Linux Email Postfix – How to Rate Limit Outgoing Concurrent Connections

concurrencyemaillinuxpostfixrate-limiting

I need to limit postfix outgoing connections for specific mailservers, but it seems to me that posfix's limiting is based on domains? What if there is one mailserver for more domains? I tried to find out what "destination" means in postfix's tuning manual, but it seems that it is the recipient's domain instead of the mailserver (I may be wrong though)

Current situation: I have a mailserver mail.example.com with IP 1.2.3.4. This mailserver is hosting emails for company1.com and company2.com.

When I set:

smtp_destination_concurrency_limit = 1
default_destination_concurrency_limit = 1

Now, if I send two emails at once – to user@company1.com and user@company2.com, is postfix clever enough to get MX servers for both emails, see that the mail server is identical and limit the connections, or does postfix see 2 different domains and let it go together in two concurrent connections?

Best Answer

Yes postfix is clever enough to deliver the messages to the two domains user@domain1.com and user@domain2.com. Before postfix starts querying DNS entries to get MX records. Postfix first attempts to deliver the message internally. Seeing the current server holds for two domains emails will successfully be delivered to the account respectively.