[Mailman-Users] Attachment handling

Mark Sapiro mark at msapiro.net
Tue Jan 10 06:25:08 CET 2012

Syafril Hermansyah wrote:
>I have read the archive
>> i wan to know if there is a way to "detach" the attachment, place the
>> file on a public web server and provide a link into the message to
>> download the file from the webserver.
>In the list's web admin interface Non-digest options Section, set
>scrub_nondigest to Yes.
>just need to confirm, if I set list restriction to 1024 KB (for example)
>will MailMan scrub the attachment (and making attachment linking, URL
>link) if the posting exceed 1024 KB?

No, not without changes. At least not if the held message is not
approved. The default processing pipeline includes the following
handlers in the following order

Moderate - list membership tests, member moderation and non-member
Hold     - miscellaneous holds including too big
MimeDel  - content filtering
Scrubber - scrubbing and storing aside of attachments for lists with
           scrub_nondigest = yes.

The pipeline can be reordered. For example, one can put

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

in mm_cfg.py to move MimeDel before Hold. The reason one might want to
do this is so a 'too big' hold is based on a content filtered message.

In the same way, one could put Scrubber ahead of hold so that 'too big'
is based in the scrubbed message, but this is not a good idea.
Scrubber should never be ahead of MimeDel because if it is, various
parts will be scrubbed and stored aside even if they would have been
removed completely by content filtering.

Even if the order were Moderate, MimeDel, Scrubber, Hold, there would
be problems because attachments would be scrubbed and stored aside
before the message was potentially held for a miscellaneous hold. Then
if the message were rejected or discarded, there would be orphaned
stored attachments.

If what you want is for max_message_size to apply to the message as
received before scrubbing, then that is what you will get without
making changes to the pipeline.

If, however, what you want is for max_message_size to apply to the
scrubbed message, you would need to reorder the pipeline, and this is
problematic for the reasons given above.

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