[Mailman-Users] Delivery to SMTP server very slow

Mark Sapiro mark at msapiro.net
Sat Feb 20 21:17:56 CET 2010

On 2/20/2010 10:27 AM, Stefan Foerster wrote:
> Yes. From debuglevel(1) logs:
> Feb 20 19:03:15 2010 qrunner(7551): send:   'rcpt TO:<recipient1 at example.com>\r\n' 
> Feb 20 19:03:15 2010 qrunner(7551): reply:   '250 2.1.5 Ok\r\n' 
> Feb 20 19:03:15 2010 qrunner(7551): reply: retcode (250); Msg: 2.1.5 Ok 
> Feb 20 19:03:17 2010 qrunner(7551): send:   'rcpt TO:<recipient2 at example.com>\r\n' 
> Feb 20 19:03:17 2010 qrunner(7551): reply:   '250 2.1.5 Ok\r\n' 
> Feb 20 19:03:17 2010 qrunner(7551): reply: retcode (250); Msg: 2.1.5 Ok 

So, in the above we see greater than 1 second between

reply: retcode (250); Msg: 2.1.5 Ok

and the next

send:   'rcpt TO:<recipient2 at example.com>\r\n'

but virtually nothing occurs between those two events. We are in the
sendmail method in a for loop over the recipient list. The first of
those two messages is written at the end of getreply() which returns to
rcpt() which returns to the for loop which checks the status and calls
rcpt() again with the next recipient. rcpt() calls putcmd() which calls
send() which writes the second message before doing anything else. There
are no system calls of any kind (other than writing the messages
themselves, but the delay exists without logging) in between those two

> If you want me to, I can gather detailed timing data with tcpdump
> and/or wireshark.

Presumably it will just show the delay between the response to one RCPT
TO and the sending of the next RCPT TO. The delay in the above log
narrows it even further.

And none of this is list specific, yet it only affects one list.

You could try strace or ?? on the OutgoingRunner, but I don't know what
that might show beyond what we already know.

Does this delay occur uniformly over the entire list, or only within
some group of recipients?

You could try running OutgoingRunner with Python's trace module
<http://docs.python.org/library/trace.html#command-line-usage>, e.g.

python -m trace [trace opts] bin/qrunner --runner=OutgoingRunner:0:1

To do this, you'd probably want to stop OutgoingRunner(s), post to the
list and then stop Mailman so you have only the one message to this list
in the out/ queue, and then run the trace as above, but I would only do
this as a last ditch effort, because I'm not sure it would be helpful.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list