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 <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9