[Mailman-Users] Too many Received-SPF headers

Mark Sapiro mark at msapiro.net
Tue Dec 16 18:50:25 CET 2014

On 12/15/2014 02:13 PM, Ian wrote:
> There is an additional list with around 2500 subscribers. Messages sent to
> this list are being received with nearly 500 identical "Received-SPF: pass"
> lines. Besides seeming odd, it's particularly problematic as some domains
> are bouncing the emails because the header is too large.
> The SPF lines look like this
>> Received-SPF: pass (SERVER-HOSTNAME-HERE: localhost is always allowed.)
>> client-ip=; envelope-from=BOUNCE-LIST-ADDRESS-HERE;
> Where SERVER-HOSTNAME-HERE is our hostname and
> BOUNCE-LIST-ADDRESS-HERE is the list's bounce address. For what it's
> worth the server hostname and the domain of the list do not match.
> This issue seems to be tied to the number of subscribers. We made a
> new list with a few subscribers and messages looked fine. We added the
> 2500 subscribers to the list and we saw the plentiful Received-SPF:
> pass entries.

Based on your observations, I think what is happening is you have more
or less default Mailman settings, and your lists are sending to
'chunked' groups of up to 500 recipients per message. I.e. one SMTP MAIL
FROM transaction with up to 500 RCPT TO recipients, and your outgoing
MTA is adding a Received-SPF: header for each recipient.

This seems a bit strange for the MTA to do that, and may be a
configuration issue with the MTA, but you can deal with it in Mailman.
If I am correct on the cause, you could try putting


in mm_cfg.py where n is a small number like 5 or 10 and restarting
Mailman. The default for this setting is 500. It limits the number of
recipients per SMTP transaction.

Also, you can try enabling VERP for better bounce recognition by putting


in mm_cfg.py and restarting Mailman. VERP_DELIVERY_INTERVAL = 1 will
override SMTP_MAX_RCPTS, effectively setting it to 1. The VERP settings
will cause messages to be sent with a VERP like envelope from
listname-bounces+user=example.com at your_hostname where user at example.com
is the recipient.

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