The default email client in OS X is Apple's Mail program, which offers the ability to connect to popular services like Gmail, Yahoo Mail, and Outlook.com, in addition to custom IMAP and POP accounts.
When you configure Mail with one or more of these services, the program will display the number of unread messages in the Mail icon in the OS X Dock, indicating you have new messages in one or more accounts.
While this indicator should give you the number of unread messages available, sometimes it may show an incorrect count. This is because Mail relies on an index database in its mailboxes, which should be updated accordingly when new messages are downloaded from your mail servers, but sometimes are not.
If your mailbox indexes are damaged, then you might experience Mail showing you available messages even though all messages are marked as read, or similar instance of mismatch between unread mail and the count in the index.
To fix this issue, you simply need to have Mail rebuild its index, which it can do from the available messages in your various inboxes. This can be done by following these steps:
- Select your Mailboxes (hold the Shift or Command keys to select more than one)
- Choose Rebuild from the bottom of the Mailbox menu
When you do this, Mail will take a few minutes to read through you various messages and create a new index, which should now properly reflect the unread message count in your mailboxes.
Questions? Comments? Have a fix? Be sure to check us out on Twitter.