How to Export Mac OS X Mail Messages to Mbox Files

Mail on doorstep
Seb Oliver/Getty Images

Your email is safe and searchable in Mac OS X Mail; it's accessible and anywhere on an IMAP server, and it can be basic and portable in a mbox file.

Mbox files keep emails in a basic and very robust format that is easily imported into many other email programs and services. Exporting from Mac OS X Mail is a not always straightforward manner, but easy nonetheless.

Export a Mac OS X Mail Folder to a Mbox File

To save a folder as a mbox file from Mac OS X Mail:

  • Open the folder in Mac OS X Mail.
    • Make sure the folder contains all and only messages you want to export to the mbox file.
  • Select Mailbox | Archive Mailbox… from the menu.
  • Go to your Desktop under Choose a destination for mailbox archives….
  • Click Choose.
  • Open the Terminal application.
  • Type "cd " (do not include the quotation marks but make sure there's a whitespace character following "cd").
  • Drag and drop the ".mbox" file from your Desktop to the Terminal window.
  • Hit Enter in the Terminal window.
  • Type 'cp mbox "../.mbx"'.
    • Do include the inner (double) but not the outer (single) quotation marks.
    • Replace '' with the exported Mac OS X Mail folder's name. If you have exported a folder named "Project Vayu", for instance, the line should read
      • cp mbox "../Project Vayu.mbx"
    • (You can use Tab to have Terminal complete the folder name.)
  • Press Enter.

On your Desktop, you now have a .mbx file of your folder in mbox format. You can delete the .mbox file archived from Mac OS X Mail if you like.

Export Select Mac OS X Mail Messages to an Mbox File

You can also export just some emails to a mbox file from Mac OS X Mail:

  • Highlight the messages you want to export in Mac OS X Mail.
  • Select File | Save As… from the menu.
  • Pick the desired folder and file name under Save As: and Where:.
  • Make sure Raw Message Source is selected under Format:.
  • Click Save.
  • Optionally, click the saved file and add ".mbx" to its name to make the format known.