You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Phantom messages in Mail

I have two similar problems in Mail within Mavericks - essential a message count (of unread messages) is showing in the side bar when there aren't any in practice. This is currently happening for the following:


1. the 'Flagged' folder under 'Mailboxes' in the side bar. This shows 22 flagged messages - one red and 21 green. The green count is sort of correct (it shows that they are unread when in reality they have all been read and show as read when I click on the folder). However, when I click on the red flag folder, it says 1 unread when in reality there are no messages in that folder (either read or unread).


I've searched in Mail - status: Message is Flagged and it only brings up the green flags.


Any idea how I might get rid of this rouge label of 1 unread message? If I can also get rid of the 21 'unread' green flags that'd be a bonus too.


2. I have a smart mailbox which has the criterion to show unread emails (as emails generally go directly into their respective folders so this way I can see unread emails all in one place). Currently, this shows 4 in the sidebar. However, I have no unread emails (either in this smart mailbox or in any other mailbox in Mail).


I've tried rebuilding various mailboxes, I've restarted Mail and the computer. I've removed messages from the server.


Any thoughts?


Edward

Posted on Oct 24, 2013 10:40 AM

Reply
49 replies

Apr 5, 2017 12:31 AM in response to JRibbit

Interesting and Déjà vu. 5 days ago this started happening on my Macbook Pro running El Capitan 10.11.6. I hope that they have another fix that "Improves the accuracy of unread counts in Mail" 😉. I tried rebuild, reboots, etc. My count is accurate for the mail folder, but my smartbox for new mail shows 23 emails. 😟

Apr 5, 2017 1:23 AM in response to _TC10_

Fixed the problem. Looking back, the rebuild actually did reduce my count on phantom mail in the "New Mail" smartbox by 10. These 10 were in the pop mail folder that I had rebuilt. The rest were in a "On My Mac" "Other mail" folder. There wer to the same account but were located on my "On My Mac" "Other Mail" folder. This folder is for mail that I receive from people that are not in my contacts list so I separate the "new and junk" from the mail I get from friends.


So, I had an idea and created another "On My Mac" folder called "fix mail". I took the items that were showing as not read (but were) in my "New Mail" smart mailbox and dragged them into "fix mail". The new mail counter dropped from 23 to 0. I then dragged them back into "Other mail" folder and deleted the "fix mail" folder. My rationale, and some of the experts may agree is that the items, though from my pop mail account, were not rebuilt as they were "On My Mac". When I moved them, the index was updated with the proper status.


It was actually a pretty simple fix, once figured out. 🙂


I hope this may help others if they happen to have the problem and the email is actually in an "On My Mac" folder.

Oct 25, 2013 8:39 AM in response to JRibbit

Just thought I'd add that, not only are the issues above happening, but also smart mailboxes in general are not updating dynamically.


For example, new unread emails that appear in other standard mailboxes (filtered, say, through 'Rules') are not dynamically updating in the smart mailbox 'unread emails'. If I click out of the 'unread emails' smart mailbox and then click back in, the emails do then suddenly appear.


Any thoughts?

Edward

Oct 25, 2013 8:59 AM in response to Edward

I am having the same issue. And phantom emails in my Unread Mail smart mailbox. I removed the "Envelope" files from the library as was suggested, and which caused a complete rebuild of my emails, all 42,000 of them. Seemed to help some. But still have 2 emails showing in my Unread mailbox, but none there. Also, the 3 Envelope files that I put in the trash cannot be emptied from the trash. Get a message saying they are currently in use.


Lastly, the Junk Mail filter is not doing it's job. I'm getting a bunch now that will not filter to the Junk mail folder.


All in all, a pretty flawed release, IMHO.

Nov 4, 2013 4:25 PM in response to Edward

Another "me too" post. My message counts seem to be completely screwed up on two different Macs with Mavericks. Mailboxs (gmail specifically) show unread messages where there are none, and flagged message count is completely wrong. The badge on the dock icon reflects the same bad unread message count.


The bogus unread message counts are different on two Macs. iOS and Web don't show any unread messages at all, and it wasn't happening before Mavericks. I've flagged everything on the accounts involved as "read"

Nov 5, 2013 5:09 AM in response to ganmac

I've had this same problem, and the following worked for me, but it's a bit hazardous so make sure you have a backup of all your Mail messages, if you keep them locally, first.


1) Quit Mail.


2) In Finder, press Shift-Comand-G, and in the "Go to the folder:" box, enter:


~/library/mail/V2/maildata


3) Drag the following files to the Trash:


Envelope Index

Envelope Index-shm

Envelope Index-wal

ExternalUpdates.storedata

ExternalUpdates.storedata-shm

ExternalUpdates.storedata-wal

FlagMailboxes.plist


4) Start Mail; it should tell you it needs to reimport all your Mail messages; allow it to do so.


When this process is complete, you may see Flagged messages are once again indicated, but this time when you select the Flagged mailbox you should see the messages Mail thinks are flagged, and you should be able to take whatever action you want on those messages (unflag, delete, etc.)

Nov 8, 2013 8:26 AM in response to William Hamilton

Well, the update from Apple has not worked for me either; I still have 4 'unread' emails and an incorrect count of flagged messages (both in the flagged message folder and in my smart mailbox).

Sigh.

I guess I should try what William Kucharski's described. I'm somewhat reluctant though; although I have backups, this computer is too important to go belly-up!

Edward

Nov 8, 2013 8:52 AM in response to Edward

The fix suggested by William Kucharski is an older Apple-recommended fix. All it does is delete bad indexes and caches, forcing the Mail program to re-build them. If you follow the instructions- you won't cause any sort of harm to your Mac. I believe the Mavericks fix that came out will help prevent the bad message counts from happening to begin with, but if they are already bad- it may not fix them. After doing the recommended fix and updating Mavericks, all of my Google accounts seem to be working correctly now.

Phantom messages in Mail

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.