On Wed, May 14, 2025 at 02:01:11PM +0100, Rory Campbell-Lange wrote:

I believe that mutt uses mboxcl2 format for writing new mailboxes. I'd be grateful to know if that is corrrect.

I think that's right, with a small addition: since version 1.9.5 (April 2018),
Mutt has also written Lines: along with Content-Length:.

I haven't read Mutt's code that writes mbox; I've only looked at its output, with a little testing.

For completeness: mboxcl2 means that Mutt adds the header Content-Length: and does *not* do ">From " escaping of message lines. And these days Mutt also throws in the header Lines:.

(The value of Content-Length: is the number of bytes in the body of the message; the value of Lines: is the number of lines in the body of the message. Mutt gets both those lengths right, by what I think they should be. (Not all software does.))

Both headers are non-standard -- they're not RFC 822, they were invented to work around mbox's deficiencies. Effectively those headers are part of mbox file format.

You probably know that Mutt can write new mailboxes in any of the four file formats that it knows. You can use Mutt to convert among those formats.

It would be helpful also to know how long that has been the case since I've got some 20 year old mutt mboxes I'm keen to process with a golang program.

I don't know, haven't used Mutt for that long.

Reply via email to