[Mailman-Developers] Debugging lost messages?

Mark Sapiro msapiro at value.net
Mon Oct 10 21:32:05 CEST 2005

Brad Knowles wrote:
>	Okay, I think I found the offending module.  Hold.py will syslog 
>to "vette", if the message is being held.  But Moderate.py will not 
>syslog anything -- it passes a held message to Hold.py, but handles 
>rejections and discards itself.
>	Moreover, Moderate.py uses two different methods of handling 
>rejections and discards -- subscribers are handled in-line, while 
>non-subscribers are handled through the do_reject() and do_discard() 
>subroutines.  And that's the only place the do_reject() and 
>do_discard() subroutines are used.

In a prior post, you indicate that IncomingRunner was detecting a
RejectMessage exception. You wrote:

>(Your modified) code in IncomingRunner.py currently looks like this:
>            except Errors.RejectMessage, e:
>                 mlist.BounceMessage(msg, msgdata, e)
>                 syslog('vette', 'Message bounced, listname: %s, msgid: %s',
>                        listname,
>                        msg.get('message-id', 'n/a'))
>                 return 0

and presumably you were seeing that log message. Thus, we know it is a
'reject' and not a 'discard'.

It looks like there are only 3 paths through Moderate.py that result in
a reject. These are:

Post is from a moderated member and the list's member_moderation_action
is reject.

Post is from a non-member in reject_these_nonmembers and not in accept
or hold _these_nonmembers.

Post is from a non-member not in *_these_nonmembers and
generic_nonmember_action is reject.

There are different values for the error message, e, that can
distinguish the first case from the second two, but if this isn't
enough, I would add some information to the logging statement above.

For example:

                 syslog('vette', 'Message bounced, listname: %s, \
msgid: %s Subject: %s, Sender: %s, Error: %s',
                        msg.get('message-id', 'n/a'),
                        msg.get('subject', 'no subject'),

Also, in all these cases mlist.BounceMessage(msg, msgdata, e) should be
attempting to send a reject message to the poster. There should at
least be something in the smtp* logs about this.

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