On Sat, 3 Mar 2001, Timothy Luoma <elists(_at_)1stpc(_dot_)org> wrote:
I'm currently using two little scripts to rid myself of AOL and MS
Outlook users who send HTML email by default when there is no need for
HTML
I've been tracking this topic because I too wish to expunge extraneous
HTML alternatives from messages.
:0
* ^Content-Type: multipart/alternative
However, I believe that there is a problem with this pattern. You assume
that such messages only consist of the two alternative parts (plain text
and HTML). Some people send attachments as well as alternative parts! So
your pattern, which is implicitly constrained to the message header, would
skip those.
I think, note think, that the fix is to match the above within the body.
I greped such a message, which I saved for tasting my own recipe, to show
the mix of Content-type lines that do occur. And as can be seen from the
last part it would be dangerous to excise a none iso-8859-1 part.
Content-Type: multipart/mixed;
boundary="----_=_NextPart_000_01C09C59.56E451C0"
------_=_NextPart_000_01C09C59.56E451C0
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C09C59.56E451C0"
------_=_NextPart_001_01C09C59.56E451C0
Content-Type: text/plain;
charset="iso-8859-1"
------_=_NextPart_001_01C09C59.56E451C0
Content-Type: text/html;
charset="iso-8859-1"
------_=_NextPart_000_01C09C59.56E451C0
Content-Type: image/gif;
name="ATT72368.gif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="ATT72368.gif"
Content-ID: <079505322(_at_)21022001-363c>
I'm also a little suspicious of your sed directives to remove MIME-encoded
characters. Would it not be better to fed the retained part through
mimencode so all those quoted characters are converted?
Your recipe was helpful in getting me started, especially as I'd not
considered that there might be a difference between AOL-generated mail and
Microsoft-generated mail. I certainly need to add more beef to my recipe.
Regards, Trevor
British Sign Language is not inarticulate handwaving; it's a living language.
Support the campaign for formal recognition by the British government now!
--
<>< Re: deemed!
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail