Discussion:
[Mailman-Users] Too many recipients
Rodrigo Abrantes Antunes
2012-10-22 15:46:43 UTC
Permalink
Hi, when I try to send an e-mail to my list (only one recipient, the list
itself), I get these:

In mailman's smtp logs:
Oct 22 13:26:17 2012 (22940) <xxxxxxx> smtp to contas for 828 recips,
completed in 1.705 seconds

In mailman's post logs:
Oct 22 13:26:17 2012 (22940) post to contas from ***@xxxx, size=3620,
message-id=<xxxxxxx>, 450 failures

In mailman's smtp-failure logs:
Oct 22 13:26:17 2012 (22940) delivery to ***@xxxxx failed with code 452:
4.5.3 Error: too many recipients

In my mm_cfg.py I have this:
DEFAULT_MAX_NUM_RECIPIENTS = 0

Any ideas?
Rodrigo Abrantes Antunes
2012-10-23 16:19:18 UTC
Permalink
Post by Rodrigo Abrantes Antunes
Hi, when I try to send an e-mail to my list (only one recipient, the
Oct 22 13:26:17 2012 (22940) <xxxxxxx> smtp to contas for 828
recips, completed in 1.705 seconds
size=3620, message-id=<xxxxxxx>, 450 failures
code 452: 4.5.3 Error: too many recipients
DEFAULT_MAX_NUM_RECIPIENTS = 0
Any ideas?
Searching google I found that this error isn't related to the number of
users in the list, it occurs because the total number of addresses in the
To: and Cc: headers of the post equals or exceeds max_num_recipients. But
in documentation is said that if this option is set to 0 it has no limit.
And my post have only one recipient in To:, the list itself. So what may
be causing this?
Kalbfleisch, Gary
2012-10-23 17:19:44 UTC
Permalink
Am I understanding correctly that the list itself is a member of the list? Sounds like an email loop to me. What are you trying to do?


-- Gary Kalbfleisch
-- Director of Technology Support Services
-- Shoreline Community College
-- (206) 546-5813
-- (206) 546-6943 Fax
-----Original Message-----
From: Mailman-Users [mailto:mailman-users-
Antunes
Sent: Tuesday, October 23, 2012 9:19 AM
Subject: Re: [Mailman-Users] Too many recipients
Post by Rodrigo Abrantes Antunes
Hi, when I try to send an e-mail to my list (only one recipient, the
Oct 22 13:26:17 2012 (22940) <xxxxxxx> smtp to contas for 828
recips, completed in 1.705 seconds
size=3620, message-id=<xxxxxxx>, 450 failures
452: 4.5.3 Error: too many recipients
DEFAULT_MAX_NUM_RECIPIENTS = 0
Any ideas?
Searching google I found that this error isn't related to the number of users in
the list, it occurs because the total number of addresses in the
To: and Cc: headers of the post equals or exceeds max_num_recipients. But
in documentation is said that if this option is set to 0 it has no limit.
And my post have only one recipient in To:, the list itself. So what may be
causing this?
------------------------------------------------------
http://mail.python.org/mailman/listinfo/mailman-users
http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-
archive.com/mailman-users%40python.org/
Unsubscribe: http://mail.python.org/mailman/options/mailman-
users/garyk%40shoreline.edu
Lindsay Haisley
2012-10-23 17:28:00 UTC
Permalink
Post by Rodrigo Abrantes Antunes
Hi, when I try to send an e-mail to my list (only one recipient, the list
Aren't you creating a loop here? Why are you putting the list itself on
the list as its only recipient? This appears to me to be an invitation
for an endless loop.
--
Lindsay Haisley | "Real programmers use butterflies"
FMP Computer Services |
512-259-1190 | - xkcd
http://www.fmp.com |
Rodrigo Abrantes Antunes
2012-10-23 20:10:56 UTC
Permalink
Post by Rodrigo Abrantes Antunes
Hi, when I try to send an e-mail to my list (only one recipient, the list
Aren't you creating a loop here?  Why are you putting the list itself on
the list as its only recipient?  This appears to me to be an invitation
for an endless loop.
--
Lindsay Haisley       | "Real programmers use butterflies"
FMP Computer Services |
512-259-1190          |       - xkcd
http://www.fmp.com    |
------------------------------------------------------
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
http://mail.python.org/mailman/options/mailman-users/rodrigoantunes%40pelotas.ifsul.edu.br
The list's e-mail obviously isn't a list member, what I said is that when
you want to send and email to the list you put the list's email in the
recipient.
Stephen J. Turnbull
2012-10-24 03:21:28 UTC
Permalink
Post by Rodrigo Abrantes Antunes
Searching google I found that this error isn't related to the number of
users in the list, it occurs because the total number of addresses in the
To: and Cc: headers of the post equals or exceeds
max_num_recipients.
The operational issues have already been addressed well in other
posts. However the above statement is incorrect, and needs
clarification.

The items visible in your personal mail client (MUA) in the To:, Cc:,
and Bcc: fields are usually called "addresses" or "addressees". These
are different from "recipients", which are the addresses that the
host-to-host mail program (MTA) sends to. Mailman "explodes" the
list's *address* into a large number of *recipients*, and asks the MTA
to deliver to that whole list of recipients, or to chunks of it as
Mark explains elsewhere. You will in general never see the list of
recipients of a post unless you look at the MTA's logs.

By the way, there's nothing wrong with your understanding of plain
English, in which "address" and "recipient" are pretty much the same.
However, in technical discussion these words are often distinguished
as above.
Post by Rodrigo Abrantes Antunes
But in documentation is said that if this option is set to 0 it has
no limit.
The limit you are running into here is not in Mailman, it is in the
MTA. Mailman cannot tell the MTA what to do; it can only restrict
itself to a small enough number that the MTA will cooperate with it.
Lindsay Haisley
2012-10-23 17:33:07 UTC
Permalink
Post by Rodrigo Abrantes Antunes
Any ideas?
The behavior of Mailman with respect to the number of recipients
specified in any single SMTP transaction is controlled by
SMTP_MAX_RCPTS, which should be less than the max number of recipients
allowed by the SMTP server for any single transaction. If your setting
up this loop to stress-test your installation, set SMTP_MAX_RCPTS in
mm_cfg.py to a small enough number to pass muster with the contas SMTP
server.
--
Lindsay Haisley | "Humor will get you through times of no humor
FMP Computer Services | better than no humor will get you through
512-259-1190 | times of humor."
http://www.fmp.com | - Butch Hancock
Rodrigo Abrantes Antunes
2012-10-23 20:21:16 UTC
Permalink
Post by Lindsay Haisley
Post by Rodrigo Abrantes Antunes
Any ideas?
The behavior of Mailman with respect to the number of recipients
specified in any single SMTP transaction is controlled by
SMTP_MAX_RCPTS, which should be less than the max number of recipients
allowed by the SMTP server for any single transaction.  If your setting
up this loop to stress-test your installation, set SMTP_MAX_RCPTS in
mm_cfg.py to a small enough number to pass muster with the contas SMTP
server.
--
Lindsay Haisley       |  "Humor will get you through times of no humor
FMP Computer Services |      better than no humor will get you through
512-259-1190          |         times of humor."
http://www.fmp.com    |            - Butch Hancock
------------------------------------------------------
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
http://mail.python.org/mailman/options/mailman-users/rodrigoantunes%40pelotas.ifsul.edu.br
I didn't set any loop, the list's e-mail obviously isn't a list member,
what I said is that when you want to send and email to the list you put
the list's email in the "To:" field and that's the only recipient when I'm
sending e-mail, I'm not putting more recipients in "to:" field wich could
burst the limit of max_num_recipients if this limit was set.

I've set SMTP_MAX_RCPTS to 250 in mailman and smtpd_recipient_limit to 300
in postfix and I'm still getting these errors.
Mark Sapiro
2012-10-23 20:45:47 UTC
Permalink
Post by Rodrigo Abrantes Antunes
I've set SMTP_MAX_RCPTS to 250 in mailman and smtpd_recipient_limit to 300
in postfix and I'm still getting these errors.
Did you restart Mailman after setting

SMTP_MAX_RCPTS = 250

in mm_cfg.py?
--
Mark Sapiro <***@msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
Lindsay Haisley
2012-10-23 22:11:28 UTC
Permalink
Post by Mark Sapiro
Post by Rodrigo Abrantes Antunes
I've set SMTP_MAX_RCPTS to 250 in mailman and smtpd_recipient_limit to 300
in postfix and I'm still getting these errors.
Did you restart Mailman
IMHO, a restart of postfix would probably be in order, too. I know that
many settings in my mail server, courier MTA, require a restart of the
server after changing them in order for them to take effect.

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?

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?

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
error?

Inquiring minds want to know. I don't know postfix, and because all my
outgoing lists have VERP personalization enabled, this problem never
comes up here.
--
Lindsay Haisley | "We have met the enemy and he is us."
FMP Computer Services |
512-259-1190 | -- Pogo
http://www.fmp.com |
Ralf Hildebrandt
2012-10-23 22:13:22 UTC
Permalink
Post by Lindsay Haisley
IMHO, a restart of postfix would probably be in order, too. I know that
many settings in my mail server, courier MTA, require a restart of the
server after changing them in order for them to take effect.
postfix reload
suffices.
--
Ralf Hildebrandt Charite Universitätsmedizin Berlin
***@charite.de Campus Benjamin Franklin
http://www.charite.de Hindenburgdamm 30, 12203 Berlin
Geschäftsbereich IT, Abt. Netzwerk fon: +49-30-450.570.155
Lindsay Haisley
2012-10-23 21:49:09 UTC
Permalink
Post by Rodrigo Abrantes Antunes
I didn't set any loop, the list's e-mail obviously isn't a list member,
what I said is that when you want to send and email to the list you put
the list's email in the "To:" field and that's the only recipient when I'm
sending e-mail, I'm not putting more recipients in "to:" field wich could
burst the limit of max_num_recipients if this limit was set.
OK, I'm sorry. I misunderstood.
Post by Rodrigo Abrantes Antunes
I've set SMTP_MAX_RCPTS to 250 in mailman and smtpd_recipient_limit to 300
in postfix and I'm still getting these errors.
Did you restart Mailman and postfix? What do the Mailman log files show
with regard to the number of recipients (smtp log) and the number of
failures (post log) _after_ your changes and a restart of both postfix
and Mailman? What's the total number of subscribers on the list (i.e.
how many "rcpt to" addresses did Mailman _attempt_ to submit for
posting)?

Do your mail system logs shed any light on anything? My mail logs are
always my first stop when trying to debug a mail problem.
--
Lindsay Haisley | "Fighting against human creativity is like
FMP Computer Services | trying to eradicate dandelions"
512-259-1190 |
http://www.fmp.com | -- Pamela Jones
Mark Sapiro
2012-10-23 17:44:14 UTC
Permalink
Post by Rodrigo Abrantes Antunes
Hi, when I try to send an e-mail to my list (only one recipient, the list
Oct 22 13:26:17 2012 (22940) <xxxxxxx> smtp to contas for 828 recips,
completed in 1.705 seconds
message-id=<xxxxxxx>, 450 failures
4.5.3 Error: too many recipients
DEFAULT_MAX_NUM_RECIPIENTS = 0
The above setting has nothing to do with this. The message in your
smtp-failure log comes from your MTA because Mailman is sending
messages with a number of recipients (SMTP RCPT TO) greater than your
MTA will accept.

In mm_cfg.py, set SMTP_MAX_RCPTS to a number less than the MTA's
recipient limit, and restart Mailman.
--
Mark Sapiro <***@msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro
2012-10-23 23:11:53 UTC
Permalink
Post by Lindsay Haisley
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.
Post by Lindsay Haisley
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.
Post by Lindsay Haisley
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
error?
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 <***@msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro
2012-10-23 23:31:55 UTC
Permalink
Post by Mark Sapiro
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.
It's not really an important part of the answer, but the above
paragraph should have said:


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 are separated
by top level domain such that all .com addresses are in their (set of)
chunk(s); all .net and .org addresses are in a separate set; all .edu,
.us and .ca addresses are in a third set, and the rest are in yet
another set.
--
Mark Sapiro <***@msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
Rodrigo Abrantes Antunes
2012-10-25 15:20:52 UTC
Permalink
Post by Rodrigo Abrantes Antunes
Searching google I found that this error isn't related to the number of
users in the list, it occurs because the total number of addresses in the
To: and Cc: headers of the post equals or exceeds
max_num_recipients.
The operational issues have already been addressed well in other
posts.  However the above statement is incorrect, and needs
clarification.
The items visible in your personal mail client (MUA) in the To:, Cc:,
and Bcc: fields are usually called "addresses" or "addressees".  These
are different from "recipients", which are the addresses that the
host-to-host mail program (MTA) sends to.  Mailman "explodes" the
list's *address* into a large number of *recipients*, and asks the MTA
to deliver to that whole list of recipients, or to chunks of it as
Mark explains elsewhere.  You will in general never see the list of
recipients of a post unless you look at the MTA's logs.
By the way, there's nothing wrong with your understanding of plain
English, in which "address" and "recipient" are pretty much the same.
However, in technical discussion these words are often distinguished
as above.
But in documentation is said that if this option is set to 0 it has
no limit.
The limit you are running into here is not in Mailman, it is in the
MTA.  Mailman cannot tell the MTA what to do; it can only
restrictitself to a small enough number that the MTA will cooperate
with it.
Ok, I was still getting the errors because in my hurry I put
SMTP_MAX_RCPS instead of SMTP_MAX_RCPTS. I corrected this and restarted
both mailman and postfix, now I don't get any errors in smtp-failure and
in post I get this (with no failures):

Oct 24 12:29:30 2012 (6788) post to contas from ***@xxx.xxx, size=2458,
message-id=<***@xxx.xx.xx>, success

In my mail.log I see this for one of the members of the list in the
exact moment I posted to the list:

Oct 24 12:29:30 xxx postfix/smtp[9530]: 722F2292F8: to=<***@xx.xx>,
relay=127.0.0.1[127.0.0.1]:10023, conn_use=10, delay=0.5,
delays=0.15/0.23/0/0.13, dsn=2.0.0, status=sent (250 2.0.0 Ok,
id=10090-06-10, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as
DD12C292F6)
Oct 24 12:31:25 xxx cyrus/lmtp[11051]: duplicate_mark:
<***@xxxx.xxx> .xxx+@.sieve.   1351089085 0
Oct 24 12:31:25 xxx postfix/pipe[9565]: DD12C292F6: to=<***@xx.xx>,
relay=cyrus, delay=115, delays=0.03/89/0/25, dsn=2.0.0, status=sent
(delivered via cyrus service)

But the message never appears in the user's mailbox. Other messages
sent by users appears normallly in mailbox.
Some users receive the messages sent by mailman, for these users i see
this in mail.log:

Oct 25 08:15:30 srv-mail-pel postfix/smtp[5459]: B4E2429275:
to=<***@xx.xx>, relay=127.0.0.1[127.0.0.1]:10023, conn_use=2, delay=0.49,
delays=0.19/0.01/0/0.29, dsn=2.0.0, status=sent (250 2.0.0 Ok,
id=04730-12-2, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as
1BEFD292E1)
Oct 25 08:19:29 srv-mail-pel cyrus/lmtp[13727]: duplicate_check:
<***@xx.xx.xx>
user.rodrigoantunes  0
Oct 25 08:19:29 srv-mail-pel cyrus/lmtp[13727]: duplicate_check:
<***@xx.xx.xx>
user.rodrigoantunes  0
Oct 25 08:19:29 srv-mail-pel cyrus/lmtp[13727]: duplicate_mark:
<***@xx.xx.xx>
user.rodrigoantunes  1351160369 14881517650057856560
Oct 25 08:19:29 srv-mail-pel cyrus/lmtp[13727]: Delivered:
<***@xx.xx.xx> to mailbox:
user.rodrigoantunes
Oct 25 08:19:29 srv-mail-pel cyrus/lmtp[13727]: duplicate_mark:
<***@xx.xx.xx>
.rodrigoantunes+@.sieve. 1351160369 0
Oct 25 08:19:29 srv-mail-pel postfix/pipe[5469]: 1BEFD292E1:
to=<***@xx.xx.xx>, relay=cyrus, delay=239, delays=0.1/215/0/24,
dsn=2.0.0, status=sent (delivered via cyrus service)

I'm totally confused why this is happening...

 
Mark Sapiro
2012-10-25 17:58:27 UTC
Permalink
Post by Rodrigo Abrantes Antunes
Ok, I was still getting the errors because in my hurry I put
SMTP_MAX_RCPS instead of SMTP_MAX_RCPTS. I corrected this and restarted
both mailman and postfix, now I don't get any errors in smtp-failure and
So that's a successful post. There should also be an entry in Mailman's
smtp log indicating the total number of recipients sent to.
Post by Rodrigo Abrantes Antunes
In my mail.log I see this for one of the members of the list in the
relay=127.0.0.1[127.0.0.1]:10023, conn_use=10, delay=0.5,
delays=0.15/0.23/0/0.13, dsn=2.0.0, status=sent (250 2.0.0 Ok,
id=10090-06-10, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as
DD12C292F6)
relay=cyrus, delay=115, delays=0.03/89/0/25, dsn=2.0.0, status=sent
(delivered via cyrus service)
But the message never appears in the user's mailbox. Other messages
sent by users appears normallly in mailbox.
This message was delivered from Mailman to Postfix and then delivered by
Postfix to Cyrus, possibly because this was to a local user and Cyrus is
acting as the LDA, or possibly for some other reason, but in any case,
if the mail wasn't delivered to the user, this is a question for Cyrus.
--
Mark Sapiro <***@msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
Continue reading on narkive:
Loading...