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

Jan 17, 2014 8:31 AM in response to metelvis

RioMacUser's advice worked for me! Also, Metelvis is correct in that you need to be patient and wait after you do RioMacUser's step and fire Mail back up, then decide if it worked or not. When I fired Mail back up I saw no fix, I ended up taking a nap and coming back to my Macbook and all of my mail was there and the unread counts were correct again! It seems that Mavericks and Mail were still busy re-indexing everything.

Apr 21, 2014 10:56 AM in response to Bruce Alderson

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.

I usually shy from Terminal but this was simple and totally solved my problem. Thank you!

May 11, 2014 1:59 PM in response to mumbles2701

I'm a bit nervous to post this but it seems like I've resolved my problems with Mail in Mavericks. It was the one-two punch.


1)Reindexing Spotlight by dumping it via terminal. The "Apple Way" via System Preferences didn't work.


1. Open a terminal

2. Re-index Spotlight


sudo mdutil -E /


This did not take very long, maybe an hour and a half. I kept checking the Spotlight magnifying glass to see if it was done.


2) Reindexing & importing all my mail.


This is referred to above as RioMacUser's solution.


Quit Mail

Go to folder ~/Library/Mail/V2/MailData

In that folder remove any file that starts with "Envelope Index" It doesn't matter to where.

Restart Mail.

Mail will ask you if you want to import your mail.

Do it.

Wait. Wait. Wait.


In my case I let the process continue for nearly 18 hours. Mail, according to Activity Monitor was still doing something. But in the end I decided it was hung up, so I Force Quit it. What did I have to lose?


When I restared Mail it did not ask me to import again. AND it appeared that all my mailboxes were being populated correctly. Counts were correct. And it seemd to be happening at the speed it had in the past. Whew!


Now two days later I have not had any problems. So far...


I should say that I'd tried each of these solutions before. But not in direct succession.


Just one user's experience. YMMV.

May 28, 2014 5:30 PM in response to mumbles2701

If you're nervous about using the terminal, try this way through the graphical user interface:


In the Finder, choose the "Go" menu, and the "Go to Folder" menu item.


Then copy and paste this directory location:


~/Library/Mail


Then follow the steps in this link (and use the Mail folder above):


<http://support.apple.com/kb/HT2409>


Then go get a sandwitch, a cup of coffee, or go take a walk - because if you have a lot of mail, it'll take a good 15+ minutes to process.

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.