[Mailman-Users] Headers & footers on MIME/multipart messages
alex at phred.org
Thu Nov 9 23:11:58 CET 2000
From: "George Dinwiddie" <gdinwiddie at min.net>
> It seems to me that, as a minimum, it would be preferable to only
insert into the text/plain
> part of the message. Better, would be the ability to specify separate
headers & footers
> for text/html and text/plain portions. It could start getting
complicated, couldn't it.
> Unfortunately, multipart/alternative messages with text/plain and
text/html versions are
> becoming very common. I wouldn't mind if the text/html portion was
just stripped out and
> only the text/plain portion was sent out to the list. That would also
solve the problem
My solution is to strip all HTML and non-text attachments from email and
only allow the text through. I do this to the email before it gets to
My perl script for this is at http://www.phred.org/~alex/stripmime.pl .
My users (especially digest users) have been much much happier since I
added this. Very occasionally a list member will attempt to send a
photograph or other binary attachment and gets confused when they get a
report saying that it was stripped -- but such attachments are a lot
less frequent then HTML formatted email.
Another list member (sorry, I don't remember who) has a script with
similar functionality called demime. Internally they work very
differently (he uses the Perl MIME modules (which buffer to temp files
in disk, or the whole message into memory), while my script is
implemented as a line by line filter with very little buffering), but
they both get the job done.
Someday I'll learn Python and rewrite this as a Python module so that it
can be donated back to the Mailman project and come as a core part of
the mailing list system.
More information about the Mailman-Users