mbox is a file format used for holding e-mail messages. In this format, the messages are concatenated with a From line added to the beginning of each, and a blank line is added before each From line except the first. The From line begins with the five characters "From ", and may continue with other text.
If the string "From " occurs at the beginning of any line in the body, it must be modified to prevent it being taken as a message boundary. This is typically done by prepending a greater-than sign.
Because more than one message is stored in a single file, some form of file locking is needed to avoid corruption if a mail delivery program tries to deliver a new message at the same time as a mail reader is modifying the file.
From firstname.lastname@example.org Sat Aug 03 2002 Received: from ... by ... with ESMTP; Subject: Nonsense From:
>From ancient times, people have been writing letters. From email@example.com Sun Aug 04 2002 Received: from ... by ... with SMTP Subject: Iggeret To:
Ha iggeret hazot niktava blashon ivrit.