How to Rebuild and Reindex Apple Mailbox

Phong Tran updated July 7, 2015 at 4:57 PM



Many problems in Apple Mail can be solved by rebuilding its index database. Some issues that can be addressed by rebuilding the mailbox are the following:

  • Unread messages do not appear inside an inbox although the number of unread messages is visible.
  • Searching in Mail does not yield any results or it is very slow
  • A "smart mailbox" does not find messages that it should be finding.
  • Messages come back after being deleted.

There are two types of rebuilds for Apple Mailbox: quick rebuild and complete rebuild (reindex)

Quick Rebuild

  1. Select the Mailbox you are having an issue with
  2. Go to the Mailbox menu at the top
  3. Choose Rebuild



  4. If any problems continue to persist after a quick rebuild, then proceed with a complete rebuild

Complete Rebuild (Reindex)

  1. Quit Mail if it is open
  2. Navigate to Finder > Go > Go to Folder and type in "~/Library/Mail/V2/MailData"
  3. Find all files that start with "Envelope Index" (e.g., Envelope Index, Envelope Index-shm, Envelope Index-wal) and move them to the Desktop.
  4. Relaunch Mail.
  5. Mail will create new Envelope Index files. This process may take a while depending on how many messages Mail is reindexing.
  6. If everything seems to be working correctly, delete the Envelope Index files from your Desktop.


If you need further assistance, please contact IGPP Help Desk.