Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Exporting Mail in mbox format?

I'd like to export all of my mailboxes in mbox format. How can I do this?

With Mail for OS X 10.3, I could simply drag the "On My Mac" icon to a Finder window and it would create folders corresponding to my mailbox hierarchy and an mbox file for each folder. This was fantastic! (Particularly given that I have hundreds of folders of mail!) Now, in Mail 2.0.5 (the latest version of 10.4.3) this wonderful feature is gone.

When I drag the "On My Mac" icon, not only does it fail to export messages in sub-folders of "On My Mac" (which means all of my messages), but the results are not in my beloved mbox file format! Instead I get a horrible folder-whose-name-ends-in-.mbox that contains, among other things, a file for each of my thousands of messages. (I understand that this is the data stored in normal mbox files, but try replacing an mbox file with a folder-whose-name-ends-in-.mbox on an imap server! The two formats are not interchangeable!) I can only imagine that this is some ugly hack designed to let spotlight (which is a FILE search tool) search for e-mail messages (which are normally stored with MANY messages in each file).

What's infinitely worse is that when I go to Library/Mail/Mailboxes, I see my mail, but my precious mbox files have been replaced with this same awful "mbox folder" format. Can anyone tell me how to get my mail out of Mail in the industry-standard mbox FILE format?

Mac OS X (10.4.3)

Posted on Dec 14, 2005 10:57 AM

Reply
Question marked as Best reply

Posted on Dec 14, 2005 11:31 AM

There was a change to the mbox filing structure used with Tiger Mail.

At the Finder level, each mailbox is stored as an xxxxxx.mbox folder and all messages contained in the mailbox are located within the Messages folder for the mailbox - within the xxxxxx.mbox folder. Each message contained in the mailbox is stored as a separate file in .emix format within the Message folder and this is primarily for Spotlight search capabilities. This also significantly reduces the "overstuffed" mailbox issues that occured with the mbox filing structure used with previous Mail.app versions. The recommended size limit for Jaguar/Panther mailboxes is 1 GB and for Tiger Mail, 2 GB.

You can download a collection of AppleScripts called Mail Scripts at the following link.

http://homepage.mac.com/aamann/Mail_Scripts.html

The script to use is Archive Messages (Mail) which moves messages from the selected mailbox(es) to an archive mailbox or export them to standard mbox, plain or rich text files for backup purposes or import into other applications. You can select to move all messages or only messages sent within or certain period as well filter messages based on their read and flagged status.
15 replies
Question marked as Best reply

Dec 14, 2005 11:31 AM in response to Mike G.

There was a change to the mbox filing structure used with Tiger Mail.

At the Finder level, each mailbox is stored as an xxxxxx.mbox folder and all messages contained in the mailbox are located within the Messages folder for the mailbox - within the xxxxxx.mbox folder. Each message contained in the mailbox is stored as a separate file in .emix format within the Message folder and this is primarily for Spotlight search capabilities. This also significantly reduces the "overstuffed" mailbox issues that occured with the mbox filing structure used with previous Mail.app versions. The recommended size limit for Jaguar/Panther mailboxes is 1 GB and for Tiger Mail, 2 GB.

You can download a collection of AppleScripts called Mail Scripts at the following link.

http://homepage.mac.com/aamann/Mail_Scripts.html

The script to use is Archive Messages (Mail) which moves messages from the selected mailbox(es) to an archive mailbox or export them to standard mbox, plain or rich text files for backup purposes or import into other applications. You can select to move all messages or only messages sent within or certain period as well filter messages based on their read and flagged status.

Dec 15, 2005 12:40 PM in response to Allan Sampson

Unfortunately, the rest of the world hasn't heard of this "change to the mbox filing structure," so it might be more accurate to say that "as of Tiger, Apple has stopped using the standard mbox format and has started using some bizarre nonstandard format with a similar-sounding name."

Isn't there any way to export a mailbox stored "on my mac" in Mail to a format readable by some other e-mail client? Sorry if I sound a bit frustrated, but even Microsoft will let you do this!!!

(I looked at the scripts you recommend, but I'm a little hesitant using something that says "don't blame me if it deletes all of your mail" and warns that scripts which take a long time to run may generate operating system errors.)

Dec 15, 2005 1:57 PM in response to Mike G.

I'm not sure about another way but try a Google search to see what turns up.

Sorry if I sound a bit frustrated, but even
Microsoft will let you do this!!!


Windows Outlook or Outlook Express provides for exporting messages in mbox format?

Or are you referring to a Windows compatible email client not provided by Microsoft since there is a difference?

I use Windows Outlook at work and the only option I can find for exporting message/mailboxes includes a Personal Folder File (.pst) which is a proprietary Microslop format.

All email clients that utilize the mbox format don't use the identical format since there are many variations. Unlike the Internet protocols used for the exchange of email, the format used for the storage of email has been entirely left to the developer of an email client. Like other prominent e-mail clients, mbox has never been formally defined through the RFC standardization mechanism, using its own format and requiring conversion software to transfer e-mail between other e-mail clients.

The new mailbox format used with Tiger Mail is not easily converted to one of the existing/older mbox formats at the present time but I'm certain someone is working on ways to make it work if not already available.

The .emix format used to store each message contained in a mailbox as a separate file is a proprietary Apple format which was designed primary for Spotlight search capabilities. The database structure used by Entourage and the mbox filing structure used by other OS X compatible email clients are not compatible with Spotlight but I read Microsoft was working on making the Entourage database Spotlight compatible and not sure if this will happen with other OS X compatible email clients that use the mbox filing structure.

Dec 16, 2005 12:13 AM in response to Mike G.

Mike,

nice to see that some people actually read the disclaimer:-)

I have not heard of anybody actually losing mail messages by using my scripts and the error messages you potentially might be getting are harmless to your system - they simply will prevent the script from terminating properly (and, the latest version seems not to exhibit this any more). If you use the "Export" function of the "Archive Messages" script, all your original mail messages will be left intact so (they will be accessed for reading only) so you might have to do something else to actually lose your mail...

Andreas User uploaded file

Dec 25, 2005 2:15 PM in response to Mike G.

Hi Mike,

I've never seen Mail.app export simple mbox files. Way back to its NeXTSTEP predecessor, Mail.app always exported .mbox folders, which were treated as bundles in systems before mac OS 10.4 and therefore looked like files. Those .mbox bundles used to contain a file called "mbox" which indeed was a plain mbox file of the mailbox contents and that could be imported into other mail applications.

If you indeed have managed to trick Mail.app (1.3) into exporting the whole mailbox hierarchy as plain mbox files, I'd love to know about it...

Jan 13, 2006 10:21 PM in response to Mike G.

I've just had some bad experiences with older versions of Eudora which filter out attachments and put them in a separate "attachments" folder


I know all about that - if you still have those Eudora mailboxes around and want to import them into Mail or Thunderbird with the attachments re-attached to the messages, you probably should take a look at Eudora Mailbox Cleaner available from my homepage...

Andreas User uploaded file

Jan 24, 2006 9:35 PM in response to Mike G.

Andreas,

I have tried several times to use your "Archive Messages" script (v. 2.7.8) to solve my problem, but it always returns the same error message.

First the details: I have a fairly large number of "mailboxes" (i.e. folders, both IMAP and local) -- about 150. Many of these are fairly deeply nested -- as much as 4 or 5 layers of subdirectories. I open "Archive Messages" then choose "Select All" and press "Export." My "Selection Criteria" is blank, my "Export Format" setting is "mbox files," and my "Output Structure" is "Keep Mailbox Hierarchy."

I set the file name and location (nothing complicated), and then press OK. It chugs for a while (~20 minutes) and then gives me a popup that says "Finder got an error: The operation could not be completed because there is already an item with that name. (-108)" Then it freezes and has to be restarted.

One random thing I've noticed: no matter how big I make A.M.'s window, it still truncates some of the mailbox names, so much so that some of the more-deeply-nested mailboxes appear the same... might this be related to the problem?

Thanks for your help!

Exporting Mail in mbox format?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.