procmail
[Top] [All Lists]

Re: Modifying message body via procmail

1997-10-28 17:35:15
Walter Dnes asked,

|   Thank you very much.  One question just occurred to me.  Will
| a message with 1 (or more) attachment(s) be handled properly ?

If the entire message is MIME-encoded in order to carry an attachment,
probably not.  Procmail will see the entire body as one piece and not
care how (nor even whether) MIME-compliant MUAs will divide it for
presentation.  If you want to add something at the beginning of the first
part of a multipart message, you'll need to insert it after the first
part's own inner headers.

That is highly non-trivial.  We have to look for a boundary marker, all
inner headers (including continuation lines) of the first part, and then
a blank line that starts the first part's body.  Then we have to make
sure it isn't done to any subsequent part.  I don't know nearly enough
about MIME to write bullet-proof sed code for that.

<Prev in Thread] Current Thread [Next in Thread>