The standard format for a mailbox file under Unix, i.e. the format of the file most MUAs (email clients) use to store emails.

In the mbox format, many emails are stored in one file. The emails, including headers, are concatenated, and a line starting with "From " marks the beginning of a new message, like this:

 *** snip ***
From bla  Mon Jul  2 13:38:20 2001
From: XXX 
To: yyy@yyy.com
Subject: Test1

Hi, a test message!

From bla  Mon Jul  2 13:38:26 2001
Date: Mon, 2 Jul 2001 13:38:26 +0200
*** snip ***
Here, the line
From bla Mon Jul 2 13:38:26 2001
indicates the beginning of the second message in the file.

This format is used by many MUAs under Unix/Linux, and it is also used by some email programs on other OSes, such as Netscape Communicator under Windows. That means moving emails between those programs is relatively painless.

There is a problem however: Obviously, emails containing a of text starting with "From " will confuse the system. There are several tricks in widespread use to avoid this, such as escaping 'From' or using Content-length headers, but all have their drawbacks.

Both the mbox format and the various hacks to handle 'From' lines in messages have never been formally standardized, so you may run into problems no matter how you handle emails.

All in all, mbox format is somewhat poorly designed, but since it's so far the only universal standard, it's best to abide by it. There are several other mailbox formats, such as the maildir format. Most are superior to mbox, but much less widespread :-(.

There is a very informative thread about problems with mbox at
http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/content-length.html (by Jamie Zawinski, btw)