[Mailman-Users] Home-grown filters

Stephen J. Turnbull stephen at xemacs.org
Fri Feb 25 06:37:24 CET 2005

>>>>> "David" == David Wilson <davidwwilson at comcast.net> writes:

    David> I know a Mailman user who is concerned about
    David> slow-connection subscribers, and for that reason wishes to
    David> strip attachments and truncate or refuse overlong messages.
    David> Does Mailman support inclusion of home-grown filters to
    David> modify incoming messages?

Yes.  Check out the various 'pipeline' variables.  You probably want
the GLOBAL_PIPELINE.  A pipeline is a list of Python functions to be
called on each message.  The functions have to have a specific
signature; such functions are called "Handlers" and the standard set
lives in the Mailman/Handlers subdirectory.  You'll need write access
to that directory to add the custom handlers.

I don't have the patch #s off hand, but there are patches to integrate
SpamAssassin and virus filters into the Mailman pipeline on the
SourceForge tracker; these would be good models for interfacing to
existing strippers such as MIMEdefang (there probably is a patch for
MIMEdefang, too, come to think of it).

In the case of stripping attachments and size restrictions, there is
already standard code to do this which can be enabled in the web
interface (the Content Filtering and General Options pages).
Configuration of content filtering is somewhat complex, though, due to
the wide variety of ways that files can be attached.

Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

More information about the Mailman-Users mailing list