On Thu, 27 Dec 2001, Matthew D. Fuller wrote:

> Mutt, I guess, outsmarts the mbox by reading Content-Length:, which you'd
> pretty much have to do I guess.  To me, it just seems like putting too
> much trust in the LDA, whatever that may be, but...  Then again, why not
> trust?  mbox is fragile as hell anyway, what's one more shaky assumption?
> ;)

Looking in my sent-mail folder from pine that had a message with unescaped
"From 66.28.28.22: Destination Host Unreachable", it did not have a
Content-Length header. Here is the headers for that message:

>From [EMAIL PROTECTED] Sat Nov 10 03:17:28 2001 -0500
Date: Sat, 10 Nov 2001 03:17:28 -0500 (EST)
From: Philip Mak <[EMAIL PROTECTED]>
X-Sender:  <[EMAIL PROTECTED]>
To:  <[EMAIL PROTECTED]>
cc: James Ventrillo <[EMAIL PROTECTED]>,
    Mike Little <[EMAIL PROTECTED]>
Subject: IP address problems on buildreferrals.com
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: O
X-Status:
X-Keywords:
X-UID: 47

I'm guessing that mutt/pine/etc. use some best effort heuristics to
determine when a "From " line is a message separator. For example:

- A message separator only occurs after a blank line.
- A message separator contains "From ", an envelope sender address (as
  defined in RFC822 appendix d "addrspec"), whitespace, and a timestamp
  (weekday month day time [timezone] year).

It seems that there is not a reliable mechanism for unescaping ">From"
lines; I've found out that if I send a message that says "From" to myself
(using pine with mbox), it will become ">From" in some cases. I'm guessing
this is one of those things that should have been standardized, but
everyone just did it ad hoc and now it's a mess.

"man mbox" on my system says:

       In order to avoid mis-interpretation of lines  in  message
       bodies  which  begin with the four characters "From", fol
       lowed by a space character, the character ">" is  commonly
       prepended in front of such lines.

It says "commonly prepended", which implies that it doesn't have to be. :(

So it would seem that for the mbox to Maildir conversion program that I'm
writing, the best thing that I can manage is to make it recognize a "From"
line as a message separator based on those two heuristics (preceding blank
line, and correct syntax)  above.

Reply via email to