On 03/01/2019 11:23, Lorenzo Milesi wrote: > Hi. > > I need to limit the maximum number of outgoing SMTP connections done by > Postfix for delivering messages. > Our VPS provider is limiting to 5 conns/s, so I need Postfix not to open more > than 5 connections to remote SMTP servers. > > I cannot use config param *destination_concurrency_limit because they’re > related to a single recipient domain. So I was pointed to master.cf, where I > could limit the maximum number of “smtp” processes. > > So I changed the smtp (or what I think it is) line as follows: > > smtp unix - - y - 5 smtp > > Is this the correct approach? I’m asking because it didn’t fully work. I > delivered a newsletter today and I still got blocked by ISP. > > Thanks > maxxer
You're right that you can't use *destination_concurrency_limit to limit overall outgoing connection rate, but neither will limiting the number of processes to 5 in master.cf work. You have a maximum of 5 processes but nothing which stops each of them opening connections as fast as they can. There are policy servers available for rate limiting, but I think they also will not help since you want to slow things down, not reject when over the limit. The only thing I can suggest is to slow down the input rate of email. This kind of outgoing email connection rate limiting seems incompatible with the use you're making of the VPS service, unless you've got small lists. Whereas in theory a single connection could deliver multiple emails and emails with multiple recipients, you are not going to be able to easily control how email is queued and delivered so you will probably have to go as slow as 5 recipients per second. John