On Sat, 2014-10-25 at 08:36 -0700, Mark Sapiro wrote:
> In Mailman/Queue/IncomingRunner.py, in the _dopipeline() method look at
> the code for the except Errors.DiscardMessage: clause
>  and the except Errors.RejectMessage, e: clause. Augment the syslog
> message in except Errors.DiscardMessage: similarly to that in except
> Errors.RejectMessage, e:, except there is no 'e' in the discard case so
> you can't include the 'reason:' part.

Thanks, Mark!  This will at least tell me where my posts are getting
nuked.

Does this look correct?

--- IncomingRunner.py.orig      2014-10-25 10:53:02.000000000 -0500
+++ IncomingRunner.py   2014-10-25 11:03:40.000000000 -0500
@@ -157,8 +157,11 @@
                     os._exit(1)
             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'))
+                syslog('vette', """Message discarded, msgid: %s
+         list: %s,
+         handler: %s""",
+                      msg.get('message-id', 'n/a'),
+                      mlist.real_name, handler)
                 return 0
             except Errors.HoldMessage:
                 # Let the approval process take it from here.  The message no

A test list posts correctly, so no stupid syntax or indentation errors
(which shouldn't be a problem anyway since the added code is all inside
a function call argument list)

I'm a great fan of intelligent logging!  This would be a good mod for a
future version of MM 2.

-- 
Lindsay Haisley       | "Everything works if you let it"
FMP Computer Services |
512-259-1190          |          --- The Roadie
http://www.fmp.com    |

------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to