[Mailman-Users] Content filtering

Mark Sapiro msapiro at value.net
Tue Nov 23 05:49:19 CET 2004

Hong Jiang Tian wrote:
>We have some mailing lists that need to remove all types of attachments
>(whatever plain text or non-plain text) from the messages. We don't allow
>users to post the emails with attachments on these mailing lists.
>I have looked at FAQ 1.8 and 4.13. I also searched the archive of the
>Mailman user mailing list. I found that I could remove the MIME with HTML,
>Word or some other content types. But I didn't find the answer to remove
>attachments of the plain text file. Do you or other people know how to
>resolve it?

It depends on how you want to resolve it.

If you want to strip all attachments including content-type text/plain
attachments while allowing the primary text/plain part to go to the
list, then the answer is no - you can't do that with content filtering
as it exists.

If you are willing to allow all text/plain parts, whether the primary
part or an attachment, you can do that and strip everything else.

If you are willing to reject any post that contains any kind of
attachment and accept only single part text/plain or only single part
text/plain and text/plain parts from multipart/alternative, you can do
that too.


To reject everything except single part text/plain set
filter_content   Yes
pass_mime_types  text/plain
filter_action    Reject

To also accept plain text parts from multipart/alternative, add
multipart/alternative to pass_mime_types above. I.e pass_mime_types

To accept most text/plain parts including attachments and text/plain
parts from forwarded messages, pass_mime_types becomes

There is no way to accept only the first text/plain part from a
multipart/mixed part that contains more than one text/plain part.

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-Users mailing list