Apple Mail – rebuild mailboxes

Force rebuild of ALL mailboxes by deleting the “Envelope Index” files.

1. Quit Mail

2. In finder: COMMAND+SHIFT+G (to open the “Go To Folder” box), paste following, and press ENTER (or click GO)

1
 
~/Library/Mail/V2/MailData

3. Delete all the files STARTING with “ENVELOPE INDEX” in this folder.
Mail-Envelope-Index-files-to-delete-for-reindex

4. Restart Mail – Mail with throw up an “import” message, this is correct, let it do its thing and all will be ok. Could take some time – eg on SSD with 35Gb of mail, this took about 13 mins for me.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Command line for the above:

rm -rfv ~/Library/Mail/V2/MailData/Envelop*

Alternative:

sqlite3 ~/Library/Mail/V2/MailData/Envelope\ Index vacuum