procmail
[Top] [All Lists]

Re: mail separation - From and Content-Length

1997-08-29 07:05:21
Quoting Gjermund Sørseth (gjermund(_at_)nextel(_dot_)no):
The problem is the way procmail appends new messages to the mailbox. Any
line in the message body that starts with "From " is prepended with a ">"
character. This is... umm... well suffice it to say a tecnical solution
that I imagine not even Microsoft would consider. Imagine what happens
if someone sends me some encoded binary data where one of the lines by
a complete coincidence starts with "From ". 

Procmail does this because a some (many?) MUA's don't understand the
content length header and use the "From " as the sole means of
separating messages. If procmail _didn't_ escape them, those MUA's would
break. The solution is to add this to the top of your .procmailrc:

   :0 fh
   | formail -a "Content-Length:        0"

Procmail will then calculate the correct Content-Length. The extra space
before the 0 is necessary because procmail won't increase the length of
the header, so there needs to be enough available space to record the
size of any incoming message. 

-- 
Michael Stone, Sysadmin, ITRI     PGP: key 1024/76556F95 from mit keyserver,
mstone(_at_)itri(_dot_)loyola(_dot_)edu            finger, or email with 
"Subject: get pgp key" 

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