procmail
[Top] [All Lists]

RE: attaching a line to the end of an email message

2001-03-07 17:11:53
On Wed, 7 Mar 2001, Timothy J. Luoma <tjlists(_at_)bigfoot(_dot_)com> wrote:

:0
* ^Content-Type: multipart/alternative

However, I believe that there is a problem with this pattern. ...

I think, note think, that the fix is to match the above within the body.

I actually was not looking (initially) to deal with anything other
than people who use AOL or MS Outlook (Express) who send HTML
formatted email which should have been plain text....

I wish they'd learn that it should be plain text. So far I've not seen a
good example of the use of HTML mail. I double checked my set of test
message to find that there are differences between Microsoft's Outlook and
Outlook Express. (Yet more consistency!)

So I wasn't looking to deal with attachments.

(It is important to remember that in my narrow scope I am looking to
forward _a copy_ of the text of the message to a cell phone. An
un-altered version of the email goes to my INBOX.)

I missed this requirement as it wasn't in the message I commented upon.

So my pattern matching looked for the header line and then (if found)
looks for either AOL or MS Outlook signals.

Looking at that set of test messages again I see that there are several
and slightly different formats generated by AOL software. :-( Another case
of a single supplier not being consistent with themselves.

Now, it may be entirely possible to expand this to deal with
attachments and whatnot, but that wasn't the original intent, so our
goals may not have been the same.

That's my goal. Strip out the alternative HTML parts leaving only the
plain text one behind. And leave only those attachments not required by
the HTML. I know this is frought with danger; there are some real manky
mailers out there; including some that send HTML in an "alternative" part
but with no matching plain text part!

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?

Probably... but I've only seen a few of them, and I was already
calling 'sed' so it was less of an impact to add another pattern
there.

Okay another difference between our goals. Those I exchange email with
write in languages other than English so I see many more of these than you
do.

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.

Yeah the boundary was different.  Heaven forbid that anything wrt MIME be too
standardized.

:-)

If I were in charge of it, it would have been done much differently to
allow for easier parsing.  I think they allowed for too much
flexibility in how things are sent.

One of the joys of working on standards. :-)

ps -- I'd like to see what you come up with, and will be happy to share my
revisions as well.

With the push-start your example has given me I can crack on with my
variant.

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