[Mailman-Users] Too many recipients

Mark Sapiro mark at msapiro.net
Wed Oct 24 01:11:53 CEST 2012

Lindsay Haisley wrote:
>Mark, Brad, etc.  I have a question here.  Rodrigo says that in his
>Mailman smtp log, a SMTP transaction to contas for 828 recipients was
>"completed in 1.705 seconds"
>Mailman also reports a _temporary_ failure of 450 addresses. Because
>this is a 4xx class error, can one assume that after accepting
>smtpd_recipient_limit "rcpt to" addresses, postfix started rejecting
>each new address with a 452 (4.5.3) error, and that Mailman continued to
>attempt to send recipients in spite of this? - after which Mailman sent,
>and postfix accepted, the body of the message?

First of all, it is not clear how many recipients were sent in this
SMTP transaction.

The 828 recipients was the entire list, but the list is chunked into
pieces of *at most* SMTP_MAX_RCPTS (default 500) and each chunk is
sent as a separate SMTP transaction. Further, the chunks ar separated
by top level domain such that all .com addresses are in their (set of)
chunks; all .net and .org addresses are in a separate set; all .edu,
.us and .ca addresses, and the rest are in yet another set.

That notwithstanding, the actual SMTP transaction is handled by
Python's smtplib module. The fact that there were no smtp-failure log
messages that indicate an exception from smtplib (these would be log
messages like 'All recipients refused: %s, msgid: %s', 'SMTP session
failure: %s, %s, msgid: %s' or 'Low level smtp error: %s, msgid: %s')
indicates that smtplib detected that at least one recipient was
accepted and returned a dictionary, with one entry for each recipient
that was refused. Each entry contains a tuple of the SMTP error code
and the accompanying error message sent by the server. These are
reported as indicated in the OP.

Mailman then records any permanent failures as bounces and if there are
temporary failures as here, updates the recipient list for the message
to contain only the temp failed addresses and queues it in the retry
queue to be retried.

Thus, if the MTA is accepting say 50 recipients out of 500, the 500
will eventually all be delivered after about 10 times the retry
interval which defaults to 15 minutes.

>This is the only scenario that makes any sense in light of the reported
>temporary failure.  Is Mailman smart enough to pick up the thread on
>this and re-send to those addresses which were refused?

See above.

>The only other possible scenario is that the SMTP server bounced the
>entire message after transmission of the message body was complete,
>based on an excessive number of recipients.  In this case, wouldn't it
>make more sense for the mail server to return a 5xx (permanent) class

That didn't happen here. If it had, the smtplib process would have
thrown a smtplib.SMTPResponseException and this would have been logged
with a 'SMTP session failure: %s, %s, msgid: %s' message.

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