[Mailman-Users] yet another message filtering question

Mark Sapiro mark at msapiro.net
Wed Dec 31 18:34:39 CET 2008

Brad Knowles wrote:

>on 12/30/08 10:03 PM, Alex said:
>> Now to the first part - the key word was 'all' - is there a wildcard for 
>> <content filtering> - <Remove message attachments that have a matching 
>> filename extension> field that will cover all and any attachment 
>> filename extension?
>Unfortunately, no.
>You can try using the other field, where you specify the attachment 
>types you will allow.  All others will be stripped.
>> Or what would be the best way to remove all attachments in Mailman 
>> without installing any more software - i'm surprised i got this far as 
>> it is and don't want to push my luck.
>You could also do attachment stripping inside your MTA, or in another 
>program that gets called by your MTA before it calls Mailman.  There are 
>programs with names like "demime" and "stripmime" which might be helpful 

To give a little more detail, Mailman's content filtering is based
primarily on MIME Content-Type:.

You can filter based on file name extension, but that filter only
affects MIME parts that have a filename or name parameter in the
Content-Disposition: header or a name parameter in the Content-Type:
header. Many MIME parts will not have a name/filename so they can't be
filtered based on extension.

The concept of attachment is not well defined in MIME. There is a
Content-Disposition: header that can specify inline or attachment, but
Mailman doesn't look at it.

You can set pass_mime_types in content filtering to just text/plain,
and this will filter out everything but text/plain parts. It will
still pass text/plain "attachments" however.

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