[Mailman-Developers] Probe messages should not sent Precedenceheader

Mark Sapiro mark at msapiro.net
Sat Feb 18 02:45:07 CET 2012

Aamir Khan wrote:
>As suggested by Barry, I am working on this new bug,
>As i browsed though the code of mailman, i found that
>is the script which runs to send the messages to all the email addresses
>disabled may be because of over bouncing, by user himself, by admin, etc..
>So, i just have to find out the way, so that bouncing mail won't set the
>precedence header.
>Am i on correct path ?

I think you are at the start of a twisted path. I'm sorry, but I'm
still not completely up to speed with mm3, but here's what I can tell
you from 2.1.

In 2.1, cron/disabled which I think is analogous to bin/disabled.py
sends warnings, but it is not the only thing which does. Warnings are
actually sent by the list method sendNextNotification() which is
defined in 2.1 in Mailman/Bouncer.py. The sendNextNotification()
method in turn uses the UserNotification() class defined in
Mailman/Message.py to actually create and send the message.

The UserNotification.send() method will add a "Precedence: bulk" header
to any message which doesn't have any Precedence: header. Thus, there
are two possible approaches. One approach is to add a noprecedence
argument to the send() method with default = False, and in the method
itself skip adding the Precedence: bulk header if noprecedence is
true, and add a noprecedence=True argument to the call to the send()
method in sendNextNotification().

A second approach would be to add a Precedence: normal or first-class
header to the message object before calling send(), but since the use
of Precedence: is discouraged and there is no standard definition of
its values (RFC 2076), I think and argument to supress the header
entirely is preferable. I'll make that fix for 2.1.

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-Developers mailing list