Currently Being Moderated

kmosx2: Mailbox Reduction & Cleanup Procedure

Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information below at your own discretion.


b Problem:
My Mail program is sluggish or displays "writing to disc" excessively OR I have observed that the size of a mailbox has ballooned beyond what I would expect to be needed to accommodate the messages it contains.

b Discussion:
A key observation is to check the size indicated in the Mail application for the particular mailbox (this will be next to the number of messages reported for the mailbox) as compared to the size of that mailbox shown by Get Info in the Finder (any mailbox will be found in the Mail folder at Home/Library/Mail in either the relevant account folder or the Mailboxes folder). It must be noted that you must first have chosen Show Status Bar, and then Size as a Column to display in your mailbox before the overall size will be reported in the heading.

If the size of the mailbox file (the file name will end in .mbox) greatly exceeds the size reported within the Mail display heading, then in the Finder, use the Show Package Contents command that is available if you control-click on a .mbox file. Using this command, you will find several files within, one of which will be named "mbox" that will match the size reported in Mail. The other primary file, as measured by size will be named mbox.SKindex. It will account for the majority of the remaining file size as reported in the Finder, and in some cases may be larger than the file named mbox. The other files will be named Info.plist, mbox.SKindex.isValid, and tableofcontents. Other variants may be observed, but are likely corruptions.

Ballooning of size is confirmed to occur when messages are transfered to, and retained in, user created mailboxes because the origin mailbox's overall size is never reduced, even though the message is gone from the mbox file -- it is accounted for in the file mbox.SKindex. The status of mailboxes acquired by importing is likely impacted, but not yet defined.

b Recommendation:
For security make a copy of the Mail folder at Home/Library in the Finder, after quitting the Mail application. Place this copy on your Desktop or in another folder. Also, if you are going to target an Inbox, it is recommended to uncheck the box to check for new mail in Mail Preferences/Accounts/Edit/Advanced to prevent legitimate new messages from being received when you relaunch Mail later.

Find the mailbox file you wish to target (for example, INBOX.mbox) and control-click over it, and choose Show Package Contents. Highlight and delete the files named mbox.SKindex, mbox.SKindex.isValid and tableofcontents (the file named info.plist can be deleted also, as it only contains the preferences for how you view the mailbox).

When you relaunch Mail, all the messages in the mailbox will be marked as unread, and Mail will use a great deal of time to read through the mailbox and rebuild the files you have deleted, but the new mbox.SKindex will be significantly smaller, which should result in greater efficacy in many Mail operations. If you click on Edit and choose Select All, then all messages will be highlighted, and if you then click on Message, you can choose to Mark all as Read. Then click on one message and the highlighting disappears. At this point you should be back to normal. Change the setting in Advanced to again check for new mail, use Rebuild Mailbox for good measure, and test performance.

b Related:
see the FAQ entitled "Rebuild Mailbox".

Do you want to provide feedback on this User Contributed Tip or contribute your own? If you have achieved Level 2 status, visit the User Tips Library Contributions forum for more information.

Replies

Delete User Tip

Are you sure you want to delete this user tip?