[Mailman-Users] problem tracking down discard reason

Mark Sapiro msapiro at value.net
Wed Dec 20 01:15:07 CET 2006


Ron Brogden wrote:

>Hello.  I have a list admin who is attempting to legitimately post to a 
>Mailman list (version 2.1.9) but Mailman is discarding the message:
>
>Dec 18 12:42:42 2006 (168) Message discarded, msgid: 
><00f101c722e4$ce2ad570$3200a8c0 at SKIPPER>
<snip>
>Is there any option anyone is 
>aware of to make logging of discards more verbose?  


No. For a list of possible sources of the discard, see
<http://mail.python.org/pipermail/mailman-users/2006-February/049331.html>


>Looking in the code, the discard error appears to get logged here:
>
>Mailman/Queue/IncomingRunner.py (line 163)
>
>except Errors.DiscardMessage:
>                # Throw the message away; we need do nothing else with it.
>                syslog('vette', 'Message discarded, msgid: %s',
>                       msg.get('message-id', 'n/a'))
>                return 0
>
>Is there any attribute that I can use with the msg.get method (or any other 
>method for that matter) to add in a note as to why the message was actually 
>discarded?


The Handlers that raise DiscardMessage don't provide a reason, and
there's not much help in the message or metadata.

The easiest thing for you to do would be to add the Handler to the
message. Then, it would be fairly simple to narrow things down
although it still isn't definitive as both header_filter_rules and
mm_cfg.KNOWN_SPAMMERS are processed by SpamDetect and Moderate can
discard a message from a moderated member with
member_moderation_action of discard, or a non-member in
discard_these_nonmembers or a non-member with generic_nonmember_action
of discard, but at least this will narrow it down.

In the above code in IncommingRunner, change

                syslog('vette', 'Message discarded, msgid: %s',
                       msg.get('message-id', 'n/a'))

to

                syslog('vette', 'Message discarded by %s, msgid: %s',
                       handler, msg.get('message-id', 'n/a'))

-- 
Mark Sapiro <msapiro at value.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