Re: Bug in 2.0b2

From: Daniel Stenberg <>
Date: Sun, 9 Aug 1998 10:59:00 +0200 (MET DST)
Message-ID: <>

On Fri, 7 Aug 1998, Craig A Summerhill wrote:

> I found a bug on the 2.0b2 code. While scanning a mailbox, the program
> is failing to pick up the beginning of a new message unless the sendmail
> parsing line is preceeded by a null line. In other words, your new version
> of Hypermail is checking for the string:
> <any text>end-of-line
> end-of-line
> From_
> to signal a new message is beginning in the mailbox.

Yes, since the define way to separate mails in a mailbox is exactly that. To explain it shorter, what marks the beginning of a mail (except the very first one) is a string matching "\nFrom " (case sensitive). Mail programs need to escape that string someone if it occurs in a regular mail body somehow.

> I'm not sure what the old version was doing to parse messages, but it was
> definately different than this.

Oh yes. It required nothing but a line that started with "from " (case insensitive) which made it split all mails that happened to have a line starting like that in the mail body!!

> I do not know what the standard practice is on this parsing unix mbox
> format, but I do know that both ELM and Pine correctly parse the
> mailboxes in question. And, as I said, Hypermail 1.02 used to.

It may not be the best method in use right now, but I sure know that the 1.02 one was even worse for lots of test cases I made.

Of course all input in how to do this the best possible way is welcome!

> I'd suggest you put a different check in place in the code to check for
> the start of a new message. The third (day of week), fourth (month of
> year), etc. positions in the line are consistent. You might want to put
> in a check to make sure there is a date in the line instead.
> From <email address> Mon Jan 1 12:44:29 1996

I don't think there's any (good) standard that requires the From line to look like that.

             Daniel Stenberg -
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on Sun 09 Aug 1998 11:01:55 AM GMT

This archive was generated by hypermail 2.2.0 : Thu 22 Feb 2007 07:33:49 PM GMT GMT