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

Smart mailbox for unread message doesn't work

Hello,


I work only with a smart mail box that displays unread messages (all messages are archived with filters as they arrive). Since Yosemite this mailbox is regularly wrong (every two/three weeks).


For example: the "smart" mailbox displays 2 unread messages but the mail icon in the dock says there are 5. If I search through all the mail folders I will find three messages tagged as unread (blue dot) but they don't show in the smart mailbox. I read them, mark them as unread and voila! they reappear in the unread mailbox. Rebuilding the boxes doesn't solve the problem.

Is there a way to definitely solve this issue?



TIA

MacBook Pro (Retina, 15-inch, Early 2013), OS X Yosemite (10.10.5)

Posted on Oct 1, 2015 2:03 AM

Reply
15 replies

Oct 3, 2015 8:51 AM in response to Benoit Leraillez

I’m sorry to hear you are having these issues with your Mail. Smart Mailboxes can sometimes be a bit finicky, so it’s not unusual that they may need a bit of dialing in so that they work as expected, especially after a software change. With your help, we should be able to figure out what may be going on:


1. From what you are describing, it sounds like it is intermittently but regularly missing some of the unread messages, but not always. Do you notice any pattern to when it seems to work and when it does not?


2. In the same vein, do you notice any pattern to the emails that it seems to miss? Similar senders, similar subject lines, etc?


3. How do you have your mail rules and/or Smart Mailboxes set up? Without revealing any private information, can you outline any general Mail rules and/or Smart Mailbox rules you have set up, and specifically what order the rules are in?


Once we have a better idea of your configuration, we should be able to get you back up and running.

Oct 3, 2015 9:47 AM in response to brenden dv

brenden dv wrote:


1. From what you are describing, it sounds like it is intermittently but regularly missing some of the unread messages, but not always. Do you notice any pattern to when it seems to work and when it does not?


2. In the same vein, do you notice any pattern to the emails that it seems to miss? Similar senders, similar subject lines, etc?


3. How do you have your mail rules and/or Smart Mailboxes set up? Without revealing any private information, can you outline any general Mail rules and/or Smart Mailbox rules you have set up, and specifically what order the rules are in?


Once we have a better idea of your configuration, we should be able to get you back up and running.


1. I haven't noticed a pattern except that mail unread in another smart box counts twice. This of course goes the other way.


2. Last time they were in the exact same "normal" sub folder. Old mails that had been read a while ago (a few weeks if not months).


3. General rules use the sender (family, mailing list...) or the content (company name) to classify the mail. They are applied after the Mail's unwanted filter.

Smart mailboxes are:

- Unread

- Last two days

- Has a flag

- Has an attachement

- From X

- To Y

- From Z (this one has its unread counted twice)


Thanks in advance for your help.


P.S. When this is solved I'll start discussions about my other problems which I'm sure are classic problems for Mail 🙂

- non-breakable space replaced by a standard space (used in before : ; ? ! « and » in some countries like France)

- some mails that have a brown/beige background (spam color) in list view after a while.

- I have to add myself in bcc to have the sent mails automatically classified as the in mails are.

Oct 6, 2015 6:51 AM in response to Benoit Leraillez

Just to say another bug appeared today. In the mail list (the column between the folders and the mail content) I have my mails grouped by thread and I now have mails that don't show the number of mails in the thread, as if they weren't grouped anymore.

I used to have:

_____________________________________

Sender folder name >>2 |

Title | Here I can scroll through the two messages

Two lines of text |


Now I have:

_____________________________________

Sender folder name |

Title | Here I can still scroll through the two messages

Two lines of text |

Sender folder name |

Title | And here I can also scroll through the two messages

Two lines of text |


So the messages are still grouped by thread but displayed individually in the list. That's for the new messages, the old threads are perfectly displayed. What's wrong with my setup? This happens in the smart folder "Unread messages", and only there.

Nov 12, 2015 3:19 AM in response to brenden dv

Just to say that I'be upgraded to El Capitan and it hasn't changed concerning the number of unread mails that is displayed on mail's icon in the dock or the quick application switcher (cmd-tab)


- Unread mails in a specific intelligent mailbox are all counted twice

- I have a specific intelligent mailbox that displays unread mails and the number it displays is "almost" always higher than the number of mails.


TIA for any help

Nov 12, 2015 1:11 PM in response to Eric Root

It does take a while (10 mn is a long time these days) since I have close to 60k mails. Now they all count for 2 unread. If I mark them all as read, and mark one as unread I have 1 or 2 depending on... I dont know what since the same mail can give 2 or 1 at a later time.

Thanks for the idea but it doesn't work for me :-/


P.S. A bug reindexing does is to change the background color of some elements in the second column containing the list of mails (from/subject/two lines of text). The colors are beige, yellow or red. I haven't seen any blue or green, yet. The only way I've found to go back to white is to use the color palette (cmd-shift-C):

- select a color,

- select white,

- select another mail (the color hasn't changed)

- reselect the colored mail

- unselect the mail and it is white!

Nov 13, 2015 7:56 AM in response to Old Toad

Old Toad wrote:

As a general repair procedure boot into the Recovery volume (boot with the Command + R keys held down), select Disk Utility and repair the disk. Reboot normally. See if there are any improvements.


Disk utility found no problems. I'm reindexing the mailboxes but it finds ±43 000 mails instead of the ± 54 000 yesterday!


- Two unread mails do not appear anymore. My today/yesterday box has 6 mails instead of the 30 or more.

- One of the unread mails has it's background changed to light brown like a few others that I had brought back to white an hour ago.


A few minutes later: one unread mail reappears so I have three unread mails but the dock still displays 4. I've searched for this mail in the Finder and I found two identical mails with a different date/time and file name (59370.emlx and 59377.exml). If I do the same search in Mail there is only one. If I search by date received there is also only one so it knows/displays only one but counts it as two.


P.S. I selected all the mail folders (in Mail) and asked for a rebuild: there are only ±34 000 mails. It indexed 43k and counts/displays 34k.

Nov 13, 2015 8:47 AM in response to Benoit Leraillez

Try reindexing the mailboxes. The following is from this OSXDaily article: Rebuild the Mailbox & Reindex Messages to Fix Common Problems in Mail App for OS X


Repair & Reindex All Messages in Mail app

You may encounter an alert from Mail app telling you that the mailbox must be repaired, but you can also do this manually. This is particularly helpful if the search functions of the Mail app have become unreliable.

  • Quit out of Mail app and go to the Finder
  • Hit Command+Shift+G and go to the following path:

  • ~/Library/Mail/V2/MailData/

    Delete every file that begins with “Envelope Index” (optional but recommended: back up these files to the desktop just in case something goes awry)

    User uploaded file

    Close the MailData window, then relaunch Mail app to force reindexing

    Nov 15, 2015 3:56 AM in response to Benoit Leraillez

    Benoit Leraillez wrote:


    And now here's one more: the junk mail folder contains a dozen mails that I can read, move to another folder and put them back in the junk folder but the menu item to delete them is grayed out! I've quit and relaunched Mail but it doesn't help.

    I solved that one: I unchecked "Perform custom actions in the junk mail preferences.


    The difference between the number of unread messages in the dock and the mail window is still there.

    Nov 15, 2015 4:11 AM in response to Benoit Leraillez

    Here's what the icon menu in the dock displays sorry if it's French but you'll understand:

    User uploaded file

    The folder contains 4 messages, 4 unread, but the dock icon displays 7. Just in case, I have no unread junk message. When I mark all the 4 messages as read the icon in the dock displays 2 but there are no unread in the main window.


    I quit and relaunched Mail, the dock icon displays 5 for 4 unread. What does this number represent?

    May 11, 2016 8:54 PM in response to Benoit Leraillez

    I had the same problem and despite repeatedly editing the so-called smart mailbox it would still miss dozens of emails in other folders. I deleted the Smart Mailbox and just started from scratch. Seems to be working for now. It will be painful to individually add exclusions for the various SPAM folders of the various email accounts I have, to ensure those do not appear in the dvmb smart mailbox.


    Hope that helps.


    Imran

    Smart mailbox for unread message doesn't work

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