[Mailman-Users] How to filter just HTML, but not attachements?
brad at stop.mail-abuse.org
Fri Sep 8 03:13:50 CEST 2006
At 7:02 PM -0500 2006-09-07, Andy wrote:
> Is that possible to set up filters to remove all HTML from all messages, but
> to let through any attachements, like word documents, graphic files etc. send
> to lists.
> How to do that?
The problem is that the way you think of an e-mail message, and the
way that the computer sees that e-mail message, are two completely
and totally different things.
You see HTML e-mail and attachments as two separate objects. The
computer sees a wide variety of MIME bodypart types and encodings,
some of which may recursively include other MIME bodypart types using
So, you want to set up Mailman to convert HTML to plain text, and you
want to set up your system to strip the typical HTML non-plain
bodypart types, but not the other MIME bodypart types.
To really make this work right, you're going to want to get a very
large sample of as many different types of messages as could possibly
be posted to the list, and then carefully go through the complete
list of MIME bodypart types and make sure you know which ones fall
into which categories.
Problem is, there is far more weirdness out there than you can
possibly imagine, and far more seriously broken code out there than
you can possibly imagine, and you'll never be able to get even a
moderately complete list of the various different MIME bodypart types
in all their various different forms.
The other way to approach this problem is to go through what you can
relatively easily collect and set up a relatively simple
categorization of the MIME bodypart types in question.
Then, whenever someone has a problem that you've never heard of
before (like some attachment being stripped that shouldn't, or some
HTML being allowed through that shouldn't), you'll have to go through
the process of collecting sample messages and looking at the various
different MIME bodypart types in question, and then configuring
Mailman to handle those specific new types appropriately.
Some groups lie to you and try to make this look one-click easy, but
the reality is truly far stranger than you could ever imagine. It's
not one-click easy, and it never will be.
If you allow yourself to be tricked into thinking it's one-click
easy, there will come a day when you find out -- the hard way -- some
small part of just how weird this problem really is.
Brad Knowles, <brad at stop.mail-abuse.org>
"Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin (1706-1790), reply of the Pennsylvania
Assembly to the Governor, November 11, 1755
Founding Individual Sponsor of LOPSA. See <http://www.lopsa.org/>.
More information about the Mailman-Users