[Mailman-Developers] Where to insert additional Attachment-filtersin the code?

Mark Sapiro msapiro at value.net
Thu Jun 7 04:03:46 CEST 2007


Andreas Kahl wrote:
>
>I have installed Mailman on a Debian for my club for organisational
>discussions. Some Members don't like attachments, some do.
>
>One solution could be a filter copying attachments to a location on my
>Webserver and sending a link + password over the list.
>Another could be a filter for several members where they can adjust
>personally to receive attachments or not.
>
>I am not familiar with your code, could you tell me in which .py-File
>the size of attachments is checked.


The size of attachments is not checked. The size of the entire message
is checked in Mailman/Handlers/Hold.py.


>Do you have any further
>recommendations to me when trying to implement such a module? Are
>there already similar modules?


Mailman/Handlers/MimeDel.py is the handler that processes the Content
filtering options.

You could expand the user's options to include a flag for whether or
not to apply content filtering for this user, but implementing this
would be tricky in the current Mailman architecture as it would
require the list to effectively be personalized and then the content
filtering to be applied for each recipient at delivery time instead of
generally in the pipeline of incoming handlers.

You could just set Non-digest options->scrub_nondigest to Yes which
will cause all non-plain text attachments to be removed and replaced
by links. I the list's archive is private, the user's will need their
list password to access these attachments. It seems this might do what
you want with no code changes at all.

-- 
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Developers mailing list