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

smart mailbox unread counts wrong

After upgrading to Mavericks, my smart mailboxes' unread counts are all wrong. I've tried restarting mail and rebuilding mailboxes and recreating the smart mailboxes, but still they are wrong.

Mail-OTHER, OS X Mavericks (10.9)

Posted on Oct 22, 2013 7:40 PM

Reply
Question marked as Best reply

Posted on May 6, 2017 1:53 PM

Bruce Alderson wrote:


I fixed this for my smart mailboxes (Mail.app v7.0 1822) by following these steps:


1. Open a terminal

2. Re-index Spotlight


sudo mdutil -E /


I suspect this is related to Mavericks improvements in Spotlight, as it now indexes Mail.app messages much better than in previous releases.

This solution still works! It just solve a wrong unread counts on a smart mailbox, on macOS Sierra.

Thanks!

114 replies

Nov 19, 2013 1:27 PM in response to RioMacUser

The solution from RioMacUser worked for me (thanks). I'm curious if others have waited long enough and actually looked in the mail boxes before claiming that this doesn't work for them. My folder was still marked with the same qty, but now the emails were in the box, then I had to delete three batches of emails to get it empty and now the qty matches the number. Good luck.


Quit Mail if it’s open.
In ~/Library/Mail/V2/MailData, delete any file that begins with “Envelope Index,” such as Envelope Index or Envelope Index-shm.
Your home Library folder is hidden by default. To display it, choose Finder > “Go to Folder” and then enter “~/Library.”
Open Mail.
Mail creates new Envelope Index files. This process may take a few minutes, depending on how many messages Mail is reindexing.

Dec 5, 2013 1:48 AM in response to Lorelei

@Lorelei: in Finder choose 'Secure Empty Trash' in the Finder menu.


But removing the Envelopes didn't work for me. It changed something tho (now only showing 1 read mail in my 'Unread' smart mailbox, instead of 11 old ones).


Went on to try re-indexing Spotlight, following Bruce's Terminal command. Nothing happened. Did some googling: turned out that somehow Spotlight was disabled (although in Preferences all was good).


I added one line:


sudo mdutil -E /

sudo mdutil -i on /


Now Spotlight is re-indexing fine. Might take a few hours, so don't know yet if this fixes anything...


BTW, Apple's way of re-indexing Spotlight (http://support.apple.com/kb/ht2409) didn't work for me, probably due to the mysterious disabling of Spotlight...

Dec 17, 2013 10:20 AM in response to jmfinn9

I had similar problems with Mail on Mavericks - at least - I have one folder -Jobs- in 'On my mac' containg a lot of subfolders that receive emails for customers according to rules...

The containing Jobs folder didn't show mailcount after upgrading to Mavericks.

After searching the web I ended up here and was just clicking around in mail...


Suddenly I clicked right to the line 'ON MY MAC' in the Mailbox list and there was this 'HIDE" command (feek dumb but didn't even know it was there...)

After clicking it and afterwards clicking SHOW again, suddenly the correct message-count was also on my containing Jobs folder...


It can well be that I did something stupid at some point but perhaps someone else is actually having the same minor problem


cheers

smart mailbox unread counts wrong

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