On Wed, Dec 26, 2001 at 09:22:33PM -0500 I heard the voice of
David T-G, and lo! it spake thus:
>
> Thus, it should be sufficient to match on any ^From_ line as long as
> you're working with an mbox file (which you can confirm by checking the
> very first line of the file, which should tell you one way or another
> regardless of whether or not the mbox file has one or more messages in
> it) and then also ignore any ^>From_ that you might find, and not worry
> about ^From_ if you're not in an mbox file.
Note that this can (also) break.
I was just testing some mbox-parsing code the other day, and I needed a
quick mbox of reasonable size to test it against. Hey, how about
~/mail/sent?
But it's got bare "^From " lines in mid-message where they 'naturally'
appeared. So, either you need a bit more smarts than just "^From ", or
mutt doesn't write 'sent' as a true mbox.
The 'mbox' manpage from qmail says:
---
MESSAGE FORMAT
A message encoded in mbox format begins with a From_ line,
continues with a series of non-From_ lines, and ends with a
blank line. A From_ line means any line that begins with
the characters F, r, o, m, space:
[...]
---
Which seems to imply the POV that "^From " should be a sufficient pattern
(in which case, watch out for your sent box!)
Mutt seems to use a bit more smarts. See "is_from()" in from.c for
details.
--
Matthew Fuller (MF4839) | [EMAIL PROTECTED]
Unix Systems Administrator | [EMAIL PROTECTED]
Specializing in FreeBSD | http://www.over-yonder.net/
"The only reason I'm burning my candle at both ends, is because I
haven't figured out how to light the middle yet"