[Mailman-Users] max_message_size & scrubbing

Mark Sapiro mark at msapiro.net
Thu Jan 15 19:15:38 CET 2009


Rich Winkel wrote:

>On Wed, Jan 14, 2009 at 10:33:56PM -0800, Mark Sapiro wrote:
>> If you have set the list's scrub_nondigest setting to Yes and you want
>> the message scrubbed before checking for too big (and other
>> miscellaneous holds), see the post at
>> <http://mail.python.org/pipermail/mailman-users/2008-December/064541.html>
>> except the handler you want to move in the pipeline is 'Scrubber'
>> instead of (or in addition to) 'MimeDel'.
>
>So should it should look like:
>GLOBAL_PIPELINE.remove('MimeDel')
>GLOBAL_PIPELINE.remove('Scrubber')
>GLOBAL_PIPELINE.insert(GLOBAL_PIPELINE.index('Hold'), 'Scrubber')
>GLOBAL_PIPELINE.insert(GLOBAL_PIPELINE.index('Hold'), 'MimeDel')
>if MimeDel is to be called before Scrubber?


No. The result of the above will be 'Scrubber', 'MimeDel', 'Hold' in
that order. There are many ways to do this, but looking at the above,
it removes 'MimeDel' and 'Scrubber' and then inserts 'Scrubber'
immediately before 'Hold' and finally inserts 'MimeDel' immediately
before 'Hold' which is after Scrubber (and definitely wrong -
'MimeDel' should always be before 'Scrubber').

You could fix the above by reversing the order of the inserts or by
changing the second insert to

GLOBAL_PIPELINE.insert(GLOBAL_PIPELINE.index('Scrubber'), 'MimeDel')

Or, a shorter way to do the same thing is to move 'Hold' after
'Scrubber' with

GLOBAL_PIPELINE.remove('Hold')
GLOBAL_PIPELINE.insert(GLOBAL_PIPELINE.index('Scrubber') + 1, 'Hold')

I have just added a FAQ on this at <http://wiki.list.org/x/MwB0>.

-- 
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