OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Increasing retry time for a single domain

From: Ace Suares (listssuares.an)
Date: Mon Dec 11 2006 - 08:27:23 CST


Hi,
I have a similar problems.

I run mailman and postfix on a server. SInce a couple of weeks, lots of
mailservers drop connections, or tell me that there are too many
connections from my IP.

I am a bit confused. Some hosts use greylisting, but other hosts seem to
throttle the connection rate coming from a certain IP, and yet others
seem overloaded.

All in all, mail deliveries from the mailman server have become... ehh...
unpredictable.

On a list of 1260, it might well be that 80% gets the mail now, but the
rest will get the mail anywhere between now and max_queue_lifetime (which
I set to 12h)

Here are some examples from the logfile:

Postfix log summaries for Dec  5

Grand Totals
------------
messages

    765   received
   5605   delivered
     15   forwarded
     70   deferred  (224  deferrals)
     59   bounced
     14   rejected (0%)
      0   reject warnings
      0   held
      0   discarded (0%)

message deferral detail
-----------------------
  smtp (total: 224)
        83   4.7.1 Greylisting in action, please come back later (in re...
        18   SMTP command timeout - closing connection (in reply to MAIL
FR...
        14   timeout exceeded (in reply to MAIL FROM command
         7   conversation with mail-mx-01.tiscali.nl[195.241.79.131]
timed ...
         6   Connection timed out
         6   Message temporarily deferred - [170] (in reply to end of D...
         5   conversation with spambuster2.protagonist.nl[82.150.140.5]
tim...
         5   Greylisting in action, please try later  (in reply to RCPT
TO ...
         5   lost connection with vanderhaagen.org[85.128.164.184] while
se...

{snipped some more lines of logfile}

These are also quite common:

server refused to talk to me: 421 4.7.0 mx1.mail.omroep.nl error: too many
connections from x.x.x.x   (total: 22)
        22   mx1.mail.omroep.nl
  server refused to talk to me: 421 4.7.0 mx2.mail.omroep.nl error: too
many connections from x.x.x.x  (total: 25)
        25   mx2.mail.omroep.nl
  server refused to talk to me: 421 4.7.0 mx3.mail.omroep.nl error: too
many connections from x.x.x.x   (total: 7)
         7   mx3.mail.omroep.nl

I tweaked postfix parameters, but it might well have had the adverse
effect, I am afraid. Some parameters that I tweaked:

queue_run_delay = 1h

smtp_destination_concurrency_limit = 1
smtp_destination_recipient_limit = 1

maximal_backoff_time = 8h
minimal_backoff_time = 2h

bounce_queue_lifetime = 12h
maximal_queue_lifetime = 12h

The idea was that I would lower the concurrency_limit because we have at
least one server that refuses to accept moren then 10 rcpt to: per mail.

Lowering the other concurrency_limit, I had hoped to stop these 'too many
connections from this IP' deferrals, obviously to no avail.

By running the queue LESS often, I hoped that at any given moment there
would be less connections to the offending hosts.

Last but not least, I lowered the queue)lifetime, to get rid of all those
waiting messages. (In turn, that automatically unsubscribes a lot of
members from the mailman lists, so eventually the servers that keep on
deferring mail that we send them, will force their members off all lists.
I don't know yet if that is a good thing).

Many greetings,

Ace Suares

On Thursday 07 December 2006 21:49, Wietse Venema wrote:
> Simon:
> > On 12/8/06, Wietse Venema <wietseporcupine.org> wrote:
> > > Simon:
> > > > On 12/8/06, Wietse Venema <wietseporcupine.org> wrote:
> > > > > Simon:
> > > > > > Hi There,
> > > > > >
> > > > > > We are having issues sending thru to 1 ISPs mail servers,
> > > > > > they are overloaded and are dropping/refusing connections. I
> > > > > > have discussed the issue with there NOC team who are putting
> > > > > > things in place to fix...but not quick enough.
> > > > > >
> > > > > > They have asked me to increase the retry time... but i don't
> > > > > > want to do that for every domain...
> > > > > >
> > > > > > Is this achievable?
> > > > >
> > > > > No, but you can make fewer connections at the same time.
> > > > >
> > > > > http://deb.riseup.net/mail/postfix/dedicated-transport/
> > > >
> > > > Thanks for the reply!
> > > >
> > > > This is quite a large ISP, so slowing down connections to them
> > > > (20,000,000 emails a day incoming) is not going to help them
> > > > much...
> > >
> > > I never said anything about SLOWING DOWN connections.
> > >
> > > I said making FEWER connections AT THE SAME TIME.
> >
> > OK.. Cool. Sorry - i must be thinking in the wrong direction, i want
> > to make more connections more often... sorry (duh!) can you explain
> > how making fewer connections will solve my issue? Thanks!!!
>
> When the ISP is overloaded (see above) and dropping connections,
> it's a bad idea to make many connections at the same time,
> or sending long sustained bursts of email.
>
> What does help if Postfix spaces out its connections over time,
> while avoiding lots of simultaneous connections, and while avoiding
> long bursts of mail.
>
> By default Postfix scans the queue every 1000 seconds
> (queue_run_delay). if you set this shorter, like 5 minutes, then
> Postfix's bursts of email will be reduced in length. Unlike many
> parameters, changing queue_run_delay requires "postfix reload".
>
> Wietse