sendmail timeouts hints

Use this forum to suggest new features, language support, documentation, etc. for OpenEMM's roadmap

Moderator: moderator

Posts: 4
Joined: Mon Sep 19, 2011 9:37 am sendmail timeouts hints

Post by jalmasi » Mon Sep 19, 2011 10:13 am


after (almost) successful sending a batch of 150k mails, here's the hint:

$sm -q1m -NNEVER -OQueueDirectory=$BASE/var/spool/QUEUE -OPidFile=$run/ -OTimeout.connect=5s -OTimeout.queuereturn=1d -OMinQueueAge=5m

and the explanation:

5 sec connect timeout is quite important to avoid about 3 min default system wait (depends on tcp_syn_retries) which that happens if destination host remains silent. Queue processing time of 1 min is quite low and sendmail will never pass by an unresponsive host if you leave it as is. Increasing to i.e. q15m doesn't solve the issue - 5 unresponsive hosts and your mail processing stops anyway. 5 seconds is quite enough for a sane host to respond to connection. It may seem low, but if not responding withing 5 secs, even if not dead, the hosts is overloaded so better don't push it further.

Queue return of one day is there so we don't retry sending 5 days before giving up. One day is reasonable time for any broken mail server to get back up, and also reasonable time to allow you to deliver all your mails. However, watch for "452 Too many recipients received this hour" and such responses - 1d may be too short if you get a lot of these.

Minimum queue age relates to queued message age: once message delivery fails, sendmail will not retry sending for this time. This allows to skip failed messages, but to retry after a while, which is handy for "too many recipients" style responses. Set too low (or using default 0), your mail queue may hang, depending on other timeouts. 5 min age seems optimal with 1m queue processing time.

I'd love to have that in default
Please let me know how it works for you.

Site Admin
Posts: 2512
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany

Re: sendmail timeouts hints

Post by maschoff » Sun Oct 30, 2011 1:16 pm

To pursue a more aggressive delivery strategy your values are fine, except maybe for the 1 day timeout, because this could increase the number of undeliverable softbounces significantly.

If you want to make your parameters permanent without changing OpenEMM you could enter them in file in directory /etc/mail.

The OpenEMM Install Guide has a section on Sendmail queue configuration and we will include your suggestions for the next release.
OpenEMM Maintainer

Posts: 4
Joined: Mon Sep 19, 2011 9:37 am

Re: sendmail timeouts hints

Post by jalmasi » Thu Nov 03, 2011 10:54 am

Right, one or four days timeout is arbitrary parameter; one needs to decide on maximum time to deliver the batch.
As for and, note that does not run make on /etc/mail dir. Usually /etc/init.d/sendmail script does that. This simple difference may lead to confusion.

Post Reply