Differences between revisions 1 and 2
Revision 1 as of 2009-01-15 12:14:14
Size: 1816
Editor: msapiro
Revision 2 as of 2009-01-15 12:14:15
Size: 1815
Editor: msapiro
Comment: Migrated to Confluence 4.0
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma page-filename DOC/versions/14352688 #pragma page-filename DOC/versions/7602227

Mailman processes incoming messages through a pipeline of handlers which each do parts of the message processing. The default pipeline for all lists is defined in Defaults.py as the GLOBAL_PIPELINE list. It is possible to specify a different pipeline for a specific list by giving that list a 'pipeline' attribute. See 4.67. How do I implement a custom handler in Mailman? for information on doing this.

For purposes of this question, we note that within GLOBAL_PIPELINE we have the following handlers in this order:

 'Moderate'   process member moderation and non member actions
 'Hold'       process miscellaneous holds including max_message_size
 'MimeDel'    process content filtering
 'Scrubber'   scrub non text/plain parts to the archive if scrub_nondigest

If we just want to apply content filtering before checking max_message size (and the other miscellaneous holds) we can move MimeDel before Hold by putting the following in mm_cfg.py

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

If we also want to scrub non text/plain parts before checking the miscellaneous holds, we can move Hold after Scrubber by putting the following in mm_cfg.py

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

Note that Scrubber must never come before MimeDel or parts that might have been removed by content filtering will instead be scrubbed to the archive if scrub_nondigest is Yes.

Also note that moving Scrubber before Hold will allow attachments of any size to be scrubbed to the archive before applying max_message_size. Whether or not this is desirable is an individual decision.

MailmanWiki: DOC/4.82 How do I filter or scrub content before checking if a message is "too big"? (last edited 2020-05-19 16:21:30 by msapiro)