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

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

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 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: > > 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 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 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 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 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 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 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 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 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: Address rewriting not working

2019-01-03 Thread Celejar
On Wed, 2 Jan 2019 19:58:18 -0500 Viktor Dukhovni wrote: > > On Jan 2, 2019, at 7:12 PM, Celejar wrote: > > > > I'm configuring Postfix to relay mail via a smarthost, and I need to > > rewrite the sender address in order for the smarthost to accept the > > mail (and not reject it as 'relaying')

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