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

Lost email due to compaction error!

I just received an error message in my Mail application that there was an error during compaction and that Mail would revert to the way it was before compaction started. Then all the messages in my inbox disappeared.

Please tell me there is a way to get these emails back. Many were important to my work.

Thanks.

Dual 2Ghz G5, Mac OS X (10.3.x)

Posted on Feb 3, 2008 4:26 PM

Reply
4 replies

Feb 13, 2008 5:42 AM in response to Diana_NC

Verify/repair the startup disk (not just permissions), as described in the following article:

The Repair functions of Disk Utility: what's it all about?

After having fixed all the filesystem issues, if any, and ensuring that there’s enough space available on the startup disk (a few GB, plus the space needed to make a copy of Inbox), try this:

1. Quit Mail if it’s running.

2. Assuming this is a POP account, in the Finder go to ~/Library/Mail/POP-username@mailserver/.

3. Locate INBOX.mbox and move it to the Desktop.

4. Open Mail. A new empty INBOX.mbox will automatically be created within the account folder, and this will allow you to continue using Mail normally while trying to solve the problem.

As you appear to have already found out, although INBOX.mbox looks like a file, it’s actually a special kind of folder (a package) that contains several files. You may ctrl-click on an .mbox and choose Show Package Contents from the contextual menu to see the files it contains. Of these files, mbox is the most important and is where all your messages are stored. In your case, that file is very small compared with the index (0.4 MB vs. 24.7 MB), which doesn’t sound very promising.

For completeness, let me say that an Incoming_Mail file might also be present in the mailbox, in which case it might contain messages that Mail couldn’t transfer to mbox. Incoming_Mail is also a standard mbox file like mbox proper, just named differently.

5. In Mail, do File > Import Mailboxes and follow the instructions to import the INBOX.mbox that’s on the Desktop. I’m not sure what the import options available in Mail 1.x are, but you should choose Other / Standard mbox or something like that, so that Mail looks at the mbox file only (and Incoming_Mail, if present) and ignores the other files in the package.

If Mail doesn’t let you select INBOX.mbox in step 5 because it’s a package instead of a plain folder, rename INBOX.mbox to just INBOX (i.e. remove the .mbox suffix) so that it becomes a normal folder, and try again. You cannot do this directly in the Finder because removing a suffix by normal means causes the Finder to hide the suffix instead of renaming the file. To remove the suffix from the name, you must do File > Get Info (⌘I) on the file and change the name there.

Do with the imported mail whatever you wish. You may move the messages anywhere you want and get rid of the imported mailboxes afterwards.

If all is well and you don’t miss anything, the files on the Desktop can be deleted, although you may want to keep them for a while, just in case.

Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder. That is, ~/Library is the Library folder within the user’s home folder, i.e. /Users/username/Library.

Feb 25, 2008 10:16 AM in response to David Gimeno Gost

David:
Same problem as Donna. I was trying to delete a bunch of messages when compaction failed and all messages were lost. Your fix was helpful but when I try to import from the inbox folder on the desktop, mail crashes. My mbox folder is 985.5 MB. What application can I use to open it and delete messages without going into mail? Any ideas? Desperately trying to fix this...
Thanks!

Feb 26, 2008 11:26 AM in response to Williwing

If the mbox file is too big for Mail to handle it, you’ll have to break it into smaller pieces. You can do that with an MBOX Breaker Script available at Allan Sampson’s website, or with Emailchemy. The former will ignore the Incoming_Mail file that I mentioned in my first post, but you may try importing that file directly if it’s not too big or just ignore it if all your messages are in mbox. Also, if you removed the .mbox suffix from the name of the mailbox, you may need to add it back again for the script to recognize it.

Lost email due to compaction error!

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