Re: Limiting global number of outgoing connections

2019-01-07 Thread Lorenzo Milesi
Thanks everyone for the help (and for the fun). After “arguing” with support it ended up not even being 5 SYN/sec, but some random number decided by the firewall limiter, thus making any configuration tweak ineffective. I’ve agreed a different solution with the ISP, so now Postfix is happily d

Re: Limiting global number of outgoing connections

2019-01-04 Thread Viktor Dukhovni
> On Jan 4, 2019, at 7:23 AM, Wietse Venema wrote: > > For one delivery request, the Postfix SMTP client gets up to > five ($smtp_mx_address_limit) addresses from DNS, and burns through > those addresses in a split second as they fail with ECONNREFUSED. > Instantly, he has used up his entire 5 co

Re: Limiting global number of outgoing connections

2019-01-04 Thread Wietse Venema
Viktor Dukhovni: > Likely I am missing some key insight, please pardon any confusion... The ISP provides a budget of 5 connections/second, enforced at the firewall level. The OP's logging shows ECONNREFUSED when the Postfix scheduler rate limits to <1 delivery request per second. How can that be?

Re: Limiting global number of outgoing connections

2019-01-03 Thread Viktor Dukhovni
On Thu, Jan 03, 2019 at 07:04:53PM -0500, Wietse Venema wrote: > > If you're willing run your own franken-postfix, hard coded to run > > one queue per transport whenever the recipient limit > 1, you could > > test the below. I have no time to create a documented configurable > > (mis)feature alon

Re: Limiting global number of outgoing connections

2019-01-03 Thread Wietse Venema
Viktor Dukhovni: > On Thu, Jan 03, 2019 at 02:57:34PM -0500, Viktor Dukhovni wrote: > > > Postfix fragments the queue by (nexthop, recipient) rather > > than just the nexthop. You're looking for a feature that ignores > > both the nexthop and the recipient aggregates all nexthops into a > > singl

Re: Limiting global number of outgoing connections

2019-01-03 Thread Benny Pedersen
Viktor Dukhovni skrev den 2019-01-03 20:57: So for now my best advice is: https://dilbert.com/strip/1995-06-24 dilbert is funny solution on the vps have limited dns resolvers, not a postfix problem

Re: Limiting global number of outgoing connections

2019-01-03 Thread Viktor Dukhovni
On Thu, Jan 03, 2019 at 02:57:34PM -0500, Viktor Dukhovni wrote: > Postfix fragments the queue by (nexthop, recipient) rather > than just the nexthop. You're looking for a feature that ignores > both the nexthop and the recipient aggregates all nexthops into a > single unified transport-wide queu

Re: Limiting global number of outgoing connections

2019-01-03 Thread Viktor Dukhovni
> On Jan 3, 2019, at 5:23 AM, Lorenzo Milesi wrote: > > 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. Yo

Re: Limiting global number of outgoing connections

2019-01-03 Thread Wietse Venema
Lorenzo Milesi: > Jan 3 15:47:16 www postfix/smtp[7684]: connect to > mail.testowe24.pl[151.80.202.137]:25: Connection refused > Jan 3 15:47:16 www postfix/smtp[7684]: 8BC90602808: > to=, relay=none, delay=19636, > delays=19636/0.07/0.03/0, dsn=4.4.1, status=deferred (connect to > mail.testow

Re: Limiting global number of outgoing connections

2019-01-03 Thread Lorenzo Milesi
> Il giorno 3 gen 2019, alle ore 15:43, Benny Pedersen ha > scritto: > > and possible postconf -n ? > or does maillist now have crystall balls in 2019 ? :=) oups, agree :) Full config here: https://paste.ufficyo.com/?6ae007d1e40c394e#FMwhfAXbQOKOZeM4UEuB3dmthk2Sa6mCFQaxBd2+Tjk=

Re: Limiting global number of outgoing connections

2019-01-03 Thread Lorenzo Milesi
> You can easily verify in Postfix logs that smtp_destination_rate_delay > works. I must have done something wrong because it does not seem to behave correctly. I’ve added this config to main.cf: smtp_destination_concurrency_limit = 4 smtp_destination_rate_delay = 1s libero_destination_concurren

Re: Limiting global number of outgoing connections

2019-01-03 Thread Benny Pedersen
Lorenzo Milesi skrev den 2019-01-03 14:19: smtp_destination_rate_delay = 1 I tried this, removed the limit on the number of processes, restarted postfix and flushed the queue but I still got a lot of connections throttled (blocked) by ISP’s firewall. Shouldn’t I also add smtp_destination_concur

Re: Limiting global number of outgoing connections

2019-01-03 Thread Wietse Venema
Lorenzo Milesi: > > smtp_destination_rate_delay = 1 > > I tried this, removed the limit on the number of processes, restarted postfix > and flushed the queue but I still got a lot of connections throttled > (blocked) by ISP?s firewall. > Shouldn?t I also add > smtp_destination_concurrency_limit

Re: Limiting global number of outgoing connections

2019-01-03 Thread Lorenzo Milesi
> smtp_destination_rate_delay = 1 I tried this, removed the limit on the number of processes, restarted postfix and flushed the queue but I still got a lot of connections throttled (blocked) by ISP’s firewall. Shouldn’t I also add smtp_destination_concurrency_limit = 5 ?

Re: Limiting global number of outgoing connections

2019-01-03 Thread Wietse Venema
Lorenzo Milesi: > 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. No, you need to RATE-LIMIT, not volu

Re: Limiting global number of outgoing connections

2019-01-03 Thread John Fawcett
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 canno

Limiting global number of outgoing connections

2019-01-03 Thread Lorenzo Milesi
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