Rebuild Your Mailbox in Mail
Mail can completely rebuild your mailbox, which can fix many of the most common problems with missing email.
This solution can take quite some time because all messages will be deleted from your Mac. Therefore, it’s wise to try the other methods first if your mailbox is particularly large.To rebuild a mailbox, proceed as follows.
- In Mail, select the desired Mailbox from the left-hand panel.
- From the Mailbox menu, choose Rebuild.

Rebuild your email account
The selected mailbox will be rebuilt and messages from the server re-downloaded. In most cases, this is likely to fix any issues that you may be encountering.
_________________________________________________________________________________________________
Problems With Message Headers
There are a few more solutions to fix possible Mail issues. It depends whether you’re having problems with headers (such as the To, From, Subject, and CC fields) or the message content (i.e. the message body), because Mail uses two different systems to search each item.
Mail uses several indexes known as the Envelope Index to search message headers, so such problems can normally be resolved by forcing Mail to completely rebuild the Envelope index, as follows:
Quit Mail.
In Finder go to the folder ~/Library/Mail/V2/MailData and delete the following files:
Envelope-Index
Envelope-Index-shm
Envelope-Index-wal

Delete the Envelope Index files in the Mail folder
Now restart Mailand you’ll see a message informing you that it has to import your messages. Mail is actually rebuilding the index, which should in most circumstances fix the issue.
_________________________________________________________________________________________________
Problems With Message Content
As already mentioned, message content is indexed and searched completely independently from headers. Mac OS X actually uses Spotlight to search for message content, so the most likely cause is an issue with the Spotlight index itself.
Follow each of the steps below until your issue is resolved.
Check Spotlight Privacy
If you’ve accidentally blocked Spotlight from indexing your ~Library/Mail folder, this could be the cause of the problem.
Check Spotlight’s permissions as follows:
Go to System Preferences.
Open Spotlight and check the Privacy tab.
If your Mail folder or subfolders appear in the list, just remove them with the little “-” button.
Allow some time for Spotlight to index that folder and then try to search your mail again.

Check the Spotlight Privacy settings to see if the Mail folders are present
_________________________________________________________________________________________________
Check Mail Settings
For server-based accounts (such as iCloud and IMAP mailboxes), it’s important that all your messages and attachments are downloaded from your mail server so that Spotlight can index them.
To check this:
Open Mail’s preferences and select the Accounts tab.
Select the chosen email account from the left-hand side pane and then Advanced.
In the top section, make sure that All messages and their attachments is selected in the offline viewing pop-up menu.

Make sure that messages and attachments are set to download for offline viewing
_________________________________________________________________________________________________
Re-index Mail
It’s possible to completely re-index mail forcibly as follows.
Open Terminal from the Applications -> Utilities folder.
Type this command followed by return: mdimport -r /System/Library/Spotlight/Mail.mdimporter
This will force Spotlight to re-index all your emails, but other indexes will be left untouched.
_________________________________________________________________________________________________
Reset The Entire Spotlight Index
If none of the above methods seem to work, you could reset the entire Spotlight index but it will probably take a long time – up to several hours depending on how much data you have on the disk.
Open Terminal from the Applications -> Utilities folder or from Spotlight.
Type in this command followed by return: sudo mdutil – E
When prompted, enter your system password (because only admin users are allowed to use this command).
_________________________________________________________________________________________________
Resynchronise Your Accounts
It’s also possible to resynchronise your email accounts. This process is very simple but can also take some quite some time:
Select the mailbox in Mail’s left-hand side panel.
Right-click and choose Synchronize from the pop-up menu.
When the process has completed (you can check progress in the Mail Activity area) try your search again.

Synchronise your email accounts
