MBox mail format

Created on 2023-02-28T01:22:35-06:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

All e-mails in the mailbox are stored as:

Message bodies run until the delimeter is encountered.

From MAILER-DAEMON Fri Jul  8 12:08:34 2011
From: Author 
To: Recipient 
Subject: Sample message 1

This is the body.
>From (should be escaped).
There are 3 lines.

From MAILER-DAEMON Fri Jul  8 12:08:34 2011
From: Author 
To: Recipient 
Subject: Sample message 2

This is the second body.

Delimeter

Unhelpfully the delimeter is "From " at the beginning of the line and including one space. If mail contains this at the start of a line you have problems.

mboxo: "From " is escaped by replacing it with ">From " during encoding and decoding ">From " back. Note that if the message contained ">From " it will not be escaped, but is unescaped on decoding, leading to an unfaithful reproduction of the message.

mboxrd: "From " and all prefixed >'s are themselves prefixed with another > during encoding. The extra arrow is removed on decoding. This ensures faithful reproduction of messages.