[Mailman-Users] Privacy Filter Unusual Behavior

Mark Sapiro mark at msapiro.net
Fri Jan 5 16:03:28 EST 2018


On 01/05/2018 11:56 AM, Chris PUCHALSKI wrote:
> Here is the entire end of the IncomingRunner.py file as it stands now:
> 
>             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
>                 # Log this.
>                 syslog('vette', """Message rejected, msgid: %s
>         list: %s, handler: %s, reason: %s""",
>                        msg.get('message-id', 'n/a'),
>                        mlist.real_name, handler, e.notice())
>                 mlist.BounceMessage(msg, msgdata, e)
>             except:
>                 # Push this pipeline module back on the stack, then re-raise
>                 # the exception.
>                 pipeline.insert(0, handler)
>                 raise
>         # We've successfully completed handling of this message
>         return 0
> 
> Is that the "return 0" you speak of or does it need to appear higher rather than the end of the file?


It should be OK. The upstream code has return 0 following

mlist.BounceMessage(msg, msgdata, e)

but without that, control will fall through the try: to the return 0
after the

# We've successfully completed handling of this message

comment so it should be the same.

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