How to fix Apple Mail by rebuilding and reindexing the Mailbox

April 25, 2014 6:25 AM EDT

If your Apple Mail doesn't seem to be searchable and/or has become so slow it seems to hang your Mac -- or even displays incorrect email content, then it's time you attacked  the problem: it's time to rebuild and reindex your Mailbox.

How to fix Apple Mail by rebuilding and reindexing the Mailbox

Aaargh!!!

This isn't a trivial problem:

Mac users depend on Apple Mail for day-to-day email use, but as those messages come in and go out your Mailboxes will become bloated. When they do, Mail's performance will suffer and you'll find that even something as simple as downloading new messages takes an age.

Before we begin

  • Delete messages inside your Deleted Items and Spam folders
  • Delete messages you no longer need
  • Update to the latest version of Mail

Now you've done that, we may be able to improve things using these two tips:

How to fix Apple MailStep 1: Rebuild

Rebuilding a Mailbox in Mail sound daunting but it really isn't. Launch Mail, select one of your mailboxes and click on the Mailbox menu. At the bottom of the pane choose the Rebuild option. If you have a large mailbox, you can expect the process to take a few hours.

You must repeat this step for each one of your Mailboxes.

While the process takes place, you may experience system performance lag, as it can consume a lot of system resources and memory.

Another caveat, if you use IMAP or Exchange with any of the accounts, the process will redownload every message from the server, so you'll use a lot of bandwidth.

Now that you've completed these steps, work with Mail a little longer. If you are still having issues, or Mail fails to launch, you should try a manual reindex.

Step 2: Reindex

Manual reindexing of Mail messages is the only way to go if the  application has become so unresponsive it barely works at all, search is not functioning correctly or the app won't launch.

Mail will automatically attempt to reindex your messages if it detects problems with the mailboxes, but sometimes a manual reindex is the best option. If you are still having problems with Mail after following step one, try manual reindexing.

Quit Mail if it’s open.

How to fix Apple Mail

To get to your home Library folder, hold down the Option key, then in the Finder choose Go > Library.

In ~/Library/Mail/V2/MailData, delete any file that begins with “Envelope Index,” such as Envelope Index or Envelope Index-shm. (Before you actually delete the files, it makes sense to copy them to a folder on your desktop.)

Launch Mail and the app will build new Envelope Index files -- this can take a long time if there are numerous messages to go through.

If everything seems to be working correctly, you can now delete the copies of the "Envelope Index" files from your desktop.

In most cases, these two tips should solve most Mail problems -- I hope they help resolve yours. 

Mavericks Tips and Tricks

Google+? If you use social media and happen to be a Google+ user, why not join AppleHolic's Kool Aid Corner community and join the conversation as we pursue the spirit of the New Model Apple?

Got a story? Drop me a line via Twitter or in comments below and let me know. I'd like it if you chose to follow me on Twitter so I can let you know when fresh items are published here first on Computerworld.