diff options
Diffstat (limited to 'Mailman/Queue/IncomingRunner.py')
| -rw-r--r-- | Mailman/Queue/IncomingRunner.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Mailman/Queue/IncomingRunner.py b/Mailman/Queue/IncomingRunner.py index 2cb349be5..462daf066 100644 --- a/Mailman/Queue/IncomingRunner.py +++ b/Mailman/Queue/IncomingRunner.py @@ -98,7 +98,6 @@ class IncomingRunner(Runner): except LockFile.TimeOutError: # Oh well, try again later return 1 - # # Process the message through a handler pipeline. The handler # pipeline can actually come from one of three places: the message # metadata, the mlist, or the global pipeline. @@ -130,10 +129,9 @@ class IncomingRunner(Runner): handler = pipeline.pop(0) modname = 'Mailman.Handlers.' + handler mod = __import__(modname) - func = getattr(sys.modules[modname], 'process') try: pid = os.getpid() - func(mlist, msg, msgdata) + sys.modules[modname].process(mlist, msg, msgdata) # Failsafe -- a child may have leaked through. if pid <> os.getpid(): syslog('error', 'child process leaked thru: %s', modname) @@ -141,10 +139,13 @@ class IncomingRunner(Runner): except Errors.DiscardMessage: # Throw the message away; we need do nothing else with it. return 0 - except Errors.MessageHeld: + except Errors.HoldMessage: # Let the approval process take it from here. The message no # longer needs to be queued. return 0 + except Errors.RejectMessage, e: + mlist.BounceMessage(msg, msgdata, e) + return 0 except Exception, e: # Some other exception occurred, which we definitely did not # expect, so set this message up for requeuing. |
