Qmail And Its 30 seconds SMTP delay

July 31, 2005 – 23:44 | LAMP

On this new server I’ve got, Horde is configured to use the qmail smtp demon on localhost to send emails. Qmail is pre-configured by Plesk. I ran into this mysterious delay every time when I tried to send an email from Horde. When I opened up each test message source from the receiving end, the headers would show exactly a 30 seconds delay for the “localhost hop”. That smelled like some kind of timeout to me… and a bit digging into qmail’s documentation proved it - qmail’s tcp-env would time out after 30 seconds when trying to get the TCPREMOTEINFO data from the remote host. And tcp-env is exactly what xinetd uses to drive qmail-smtpd everytime there is an smtp connection comes in.

So in case you are running into the same problem, here’s the solution - go to /etc/xinet.d, open up smtp_psa, and add a “-R” to the beginning of server_args. Then “ps -e | grep xinetd” to get the pid of xinetd, and “kill -USR2 <the pid>” to put the config change into effect.

Trackback from your site, or follow the comments in RSS.
  1. 2 Responses to “Qmail And Its 30 seconds SMTP delay”

  2. you rock (solution worked perfectly) — thank you!

    By Brian on Jul 17, 2006

  3. Try this:

    http://www.mail-archive.com/toaster@shupp.org/msg03996.html

    By lclolcl on Jan 23, 2007

Post a Comment