On Sun, Aug 24, 2025 at 02:44:35AM +0200, Steffen Nurpmeso wrote:
I just stumbled over the fact that mutt turns
From MAILER-DAEMON-nono-0 Wed Oct 2 01:50:07 1996
This is a body, but not a valid message
(multiply .. or so .. to create a mulit-member mbox)
into a "valid" message.
Sounds like your testing has found that Mutt accepts a zero-length
message header section, at least from an mbox file. I haven't read the
Mutt code that does that; I agree that's not valid RFC 822, and Mutt
probably shouldn't accept it.
Thing is that RFC 4155 is lala...
Correct. That RFC should be ignored.
but for example qmail-mbox from ~1996
[curl -I http://qmail.org./man/man5/mbox.html
That's good documentation, but incomplete. The syntax of mbox From_
lines varies more than that, and it doesn't mention the Berkeley mbox
variant or the mbox header Lines:.
More mbox documentation:
Library of Congress:
<https://www.loc.gov/preservation/digital/formats/fdd/fdd000383.shtml>
Jonathan de Boyne Pollard, 2004:
<https://web.archive.org/web/20161023162432/jdebp.eu/FGA/mail-mbox-formats.html>
Both of those are good, but neither documents the Berkeley variant or
the header Lines:.
Jamie Zawinski, 1996:
<https://www.jwz.org/doc/content-length.html>
Names and describes BSD (Berkeley) mbox, but doesn't mention that, in
that variant, message "From " lines are only escaped with '>' after
blank lines.
Here's something I wrote about mbox:
<http://www.panix.com/~kh/mailstorage/mbox_is_bad.html>
I have to rewrite "my thing"...
...
(I am about to add MIME boundary search mode instead of From_
search if we have a MIME message...
That might help some.
If your thing attempts to read all variants of mbox, it probably should
also pay attention to the mbox length headers Lines: and
Content-Length:. Don't trust them completely, though; sometimes they're wrong.