aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Queue/IncomingRunner.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2015-11-24 06:11:28 -0800
committerMark Sapiro <mark@msapiro.net>2015-11-24 06:11:28 -0800
commit756248e006212012519c9ad698b0704cc0d96c5d (patch)
tree134a4cd2c3404d5fe096cf2ecbb90a160d32ea5b /Mailman/Queue/IncomingRunner.py
parent8e017140ec920c6cb30191db2c092c4d75a9c7b1 (diff)
downloadmailman2-756248e006212012519c9ad698b0704cc0d96c5d.tar.gz
mailman2-756248e006212012519c9ad698b0704cc0d96c5d.tar.xz
mailman2-756248e006212012519c9ad698b0704cc0d96c5d.zip
Avoid skipping a handler which rejected or discarded a message
when message is subsequently shunted and unshunted.
Diffstat (limited to 'Mailman/Queue/IncomingRunner.py')
-rw-r--r--Mailman/Queue/IncomingRunner.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Mailman/Queue/IncomingRunner.py b/Mailman/Queue/IncomingRunner.py
index eab4d2c5..2c6c2815 100644
--- a/Mailman/Queue/IncomingRunner.py
+++ b/Mailman/Queue/IncomingRunner.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2014 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2015 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -157,6 +157,10 @@ class IncomingRunner(Runner):
os._exit(1)
except Errors.DiscardMessage:
# Throw the message away; we need do nothing else with it.
+ # We do need to push the current handler back in the pipeline
+ # just in case the syslog call throws an exception and the
+ # message is shunted.
+ pipeline.insert(0, handler)
syslog('vette', """Message discarded, msgid: %s'
list: %s,
handler: %s""",
@@ -169,6 +173,10 @@ class IncomingRunner(Runner):
return 0
except Errors.RejectMessage, e:
# Log this.
+ # We do need to push the current handler back in the pipeline
+ # just in case the syslog call or BounceMessage throws an
+ # exception and the message is shunted.
+ pipeline.insert(0, handler)
syslog('vette', """Message rejected, msgid: %s
list: %s,
handler: %s,