0

I have several VPSes to a provider which recently started throttling outgoing SMTP connections to prevent spam.

While this is not such a big issue, sometimes mails gets delayed for obvious reasons. Mainly mailing list delivery and multi recipient mails. For example if I send a mail to 8 recipients (the outgoing connection limit is 5/s) I get throttled with connection refused errors:

-Queue ID-  --Size-- ----Arrival Time---- -Sender/Recipient-------
CC7E3E2000C    50569 Fri Aug  3 10:37:10  [email protected]
(connect to YYY-com.mail.protection.outlook.com[213.199.154.138]:25: Connection refused)
                                     [email protected]
                                     [email protected]
                                     [email protected]
                                     [email protected]
                                     [email protected]
                                     [email protected]
                                     [email protected]
                                     [email protected]
                                     [email protected]

First, I thought Postfix would reuse the same MX connection for a domain... But if the connection is blocked it means it's trying to make more than 5 different connections.

I tried delivering also a mailing list and it's not that bad (given the limited number of recipients that I have).

Is it possible to adjust the configuration so the 5 connections/s limit is not reached?

2
  • What is your postfix version that you are using? postfix.org/CONNECTION_CACHE_README.html "With Postfix versions < 3.4, the Postfix shared connection cache cannot be used with TLS, because an open TLS connection can be reused only in the process that creates it. For this reason, the Postfix smtp client historically always closed the connection after completing an attempt to deliver mail over TLS."
    – HBruijn
    Aug 28, 2018 at 7:13
  • 3.1.0 on a server. The other is a Zimbra server with Postfix 3.1.1
    – Maxxer
    Aug 28, 2018 at 9:37

1 Answer 1

0

I thought Postfix would reuse the same MX connection for a domain.

There are some useful tips in the manual: http://www.postfix.org/CONNECTION_CACHE_README.html

But with more and more servers supporting TLS,
the setting smtp_tls_security_level often defaulting to use TLS if this is supported by the remote SMTP
and your Postfix version is too old too support the smtp_tls_connection_reuse option
it is not unexpected that for every message that gets delivered a new connection needs to be established even when it concerns multiple recipients in the same domain.

If you don't care about transport security: setting smtp_tls_security_level = none will allow better use of connection caching.

As far as I know there is no built-in rate limiting for postfix, although some hint at using using policyd for that

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .