On Fri, May 16, 2025 at 08:37:01AM +0000, dvalin--- via Mutt-users wrote: > On 16.05.25 01:31, Kurt Hackenberg wrote: > > > If you think this is a mess, you're right. People have tried to fix > > it, but it can't really be fixed. The only good solution is to not use > > mbox, and store mail in other ways instead. > > I've yet to see anything to fix, having used mbox format exclusively > since the 1980s, with mutt since the late 90s. It just effortlessly > works with complete reliability - never a hiccup.
I use mbox extensively where I have shell logins, and maildir for imap/pop type access. As long as you control the environment, or know about it anyway, you can call it reliable. Just to wade into the bikeshedding.. I've participated in the mbox (well, not wars, but experience) for a good long time also. Kurt's comments and references were pretty agreeable to me. One of the main points, though, is that there are varying interpretations and you need them to agree in your mbox environment. One case in point: the bit about only quoting "From_" lines if preceded by a blank line. That's one heuristic (if I dare to use the word) that was pretty randomly followed in the past. It mostly is now, but has not always been. I have patched code sets to follow this. (I think some versions of procmail were among them.) I've also seen, and probably even perpetrated, quoting that only happened if the line parsed in a way matching valid From_ syntax in its environment. Possibly only in usenet news, but it's hard to remember. Anyway, the part about consistency wrt mbox format is important. There was one time when I let an imap server loose on a server that was populated with mbox files. The imap server initialized everything in sight (and in site) by adding Content-Length header fields to all the mbox files. Unfortunately it didn't quite agree with the mbox format in use, and it left empty messages here and there throughout the mboxes. There was no harm done, just some extra null messages. (OK there was some "harm" done-- the server changed the mtimes on all the mboxes, and I lost the metadata about how old each mbox was as a result. This mtime adjustment was rather shameful, I thought.) -mm- PS: just to babble on, here's part of the body of a message that I use in one of the test scripts for my mail delivery agent. The test files are used in testing different formats (mbox and maildir). I've left-padded all the lines here with spaces so they won't get quoted. I hope. -------------------- mda TEST NOTES: Here we test proper escaping of "From " lines. When doing these escapes, any "From " line at the beginning of a line following a blank line should be preceded by a ">" . We also include some partial "From" substrings to make sure the recognition doesn't swallow any characters in a partially matched string. This "From " quoting should ONLY be done when writing to an mbox file. From each according to their ability (the above should be escaped) From here to eternity (the above should not) From the earth to the moon (the above should be escaped) Fromx this line begins "Fromx" and should not be escaped Fro this line begins "Fro " and should not be escaped Fr this line begins "Fr " and should not be escaped F this line begins "F " and should not be escaped Now we continue with the spam. END OF mda test comments --------------------