AlconicCF

Q: Unread message count is wrong in Mail and Dock

Just last week I noticed that both my Email Inbox & Mail Dock Icon is showing an incorrect unread message count on both my MacBook & iMac. I am using a Microsoft Exchange Hosted account (Office 365) and it is the only email account tied to both of my Macs. My iPhone shows the correct unread message count as well as Outlook Web Access, and on a seperate windows-based computer, Outlook is showing the correct unread message count of 3. Both Mac systems are using OS X 10.7.3 and I have never experienced this issue before.

 

The MacBook is showing 39 unread messages, and the iMac is showing 16, in actuality there are 3 unread messages. If I create a smart mailbox that shows only unread messages - it shows up with the correct number (3), when I sort by "Unread Messages" for Inbox, it only shows that I have three unread messages.

 

I have rebuilt the inbox, I have deleted the email account from the computer, restarted the computer and then readded it, all it did was bring the unread message count from 19 to 16 on my iMac (still - it should be 3).

 

I have also gone to Mail -> Preferences -> General and verified that Show Dock Unread County is set to "Inbox" but oddly enough, when I click "All Mailboxes" the unread count on the Dock changes to 3.

 

Is there a file I can delete to reset that unread message count? I feel like I've done everything that's suggested to no avail.

 

Thanks!

iMac (21.5-inch Mid 2011), Mac OS X (10.7.3)

Posted on Mar 4, 2012 7:10 PM

Close

Q: Unread message count is wrong in Mail and Dock

  • All replies
  • Helpful answers

Previous Page 2 of 7 last Next
  • by katiejoseph,

    katiejoseph katiejoseph Jun 19, 2012 7:18 AM in response to AlconicCF
    Level 1 (0 points)
    Jun 19, 2012 7:18 AM in response to AlconicCF

    FWIW, the same fix works in Snow Leopard, but the files are in user/Library/Mail/ (no V2, etc.).  Thanks for the fix!

  • by rob@blueprint,

    rob@blueprint rob@blueprint Jul 21, 2012 7:25 AM in response to HACKINT0SH
    Level 1 (0 points)
    Jul 21, 2012 7:25 AM in response to HACKINT0SH

    Good work Hackintosh, thanks! This was driving me insane!

  • by rob@blueprint,

    rob@blueprint rob@blueprint Jul 21, 2012 7:24 AM in response to Glenn Leblanc
    Level 1 (0 points)
    Jul 21, 2012 7:24 AM in response to Glenn Leblanc

    Cheers Glenn, good work!

  • by Brainwurks,

    Brainwurks Brainwurks Aug 9, 2012 9:01 AM in response to AlconicCF
    Level 1 (0 points)
    Aug 9, 2012 9:01 AM in response to AlconicCF

    This happened to me too, but in Mountain Lion. Same file location as in Lion and there were three "envelope Index" prefixed files. I have 1 iCloud, 3 Exchange and 1 Gmail accounts, if that matters. Deleted all three and the indexing took about 10 minutes for 31,000 messages but it worked. Even found a few more errors of items that weren'y actually read.

  • by tfbaud,

    tfbaud tfbaud Aug 21, 2012 9:48 AM in response to HACKINT0SH
    Level 1 (0 points)
    Aug 21, 2012 9:48 AM in response to HACKINT0SH

    41,000 emails reindexed, correct unread counts in inboxes!  Thanks!

  • by Nelchen,

    Nelchen Nelchen Aug 29, 2012 1:37 AM in response to AlconicCF
    Level 1 (0 points)
    Aug 29, 2012 1:37 AM in response to AlconicCF

    Please help, I have two mailbox accounts but only one of them is showing the new inbox count and makes "the noise".

    I've tried everything, I've swapped accounts around, reinstalled them and also did the envelope index thing but nothing worked.

    I am running version 10.7.4

     

    Thank you

  • by MichaelMcIntosh,

    MichaelMcIntosh MichaelMcIntosh Sep 19, 2012 5:05 AM in response to HACKINT0SH
    Level 1 (0 points)
    Sep 19, 2012 5:05 AM in response to HACKINT0SH

    When I tried this, nothing happened in Outlook but when I restarted Apple Mail it started to reimport old mail (or at least that what i think it said). I am running 10.7.4, I have Outlook and Mail running against different accounts (Outlook for work) (Mail for personal)

     

    Can somebody offer a little more help to me as a beginner please

     

    Thanks

  • by ivanbe,

    ivanbe ivanbe Oct 23, 2012 12:32 PM in response to Brainwurks
    Level 1 (0 points)
    Oct 23, 2012 12:32 PM in response to Brainwurks

    I had the problem in Mountain Lion as well, and deleting the Envelope files didn't appear to fix the problem — tried twice, still had the errant unread email in my inbox. What ended up clearing out that unread email: I simply disabled the account and reenabled, and poof.

  • by ivanbe,

    ivanbe ivanbe Oct 23, 2012 12:37 PM in response to ivanbe
    Level 1 (0 points)
    Oct 23, 2012 12:37 PM in response to ivanbe

    Wow, I spoke too soon. The unread count goes to 0 when I reenable the account, but jumps back up to 1 incorrectly if I restart Mail or poke around in other folders. What the what!

  • by gjalltheway,

    gjalltheway gjalltheway Nov 1, 2012 7:32 PM in response to AlconicCF
    Level 1 (0 points)
    Nov 1, 2012 7:32 PM in response to AlconicCF

    Sorry, I'm a bit slow as far as understanding Glenn's and Hackintosh's instructions.  I got as far as closing Outlook.  Where do I go next?

     

    Thanks.

  • by Glenn Leblanc,

    Glenn Leblanc Glenn Leblanc Nov 1, 2012 7:52 PM in response to gjalltheway
    Level 6 (11,011 points)
    Mac OS X
    Nov 1, 2012 7:52 PM in response to gjalltheway

    Note that those suggestions are for Apple Mail only. I'm not sure where Outlook stores it's indexing files. You should post a new discussion if you are having problems with Outlook.

  • by Brainwurks,

    Brainwurks Brainwurks Nov 6, 2012 2:50 PM in response to AlconicCF
    Level 1 (0 points)
    Nov 6, 2012 2:50 PM in response to AlconicCF

    It's done it again, following the latest update. Deleting the envelope files from the library did not work. Any ideas?

  • by Brainwurks,

    Brainwurks Brainwurks Nov 6, 2012 3:07 PM in response to Brainwurks
    Level 1 (0 points)
    Nov 6, 2012 3:07 PM in response to Brainwurks

    UPDATE: I rebuilt the library 3 times and rebooted twice before it finally took.

  • by MyFaithfulLabAssistantBeaker,

    MyFaithfulLabAssistantBeaker MyFaithfulLabAssistantBeaker Nov 10, 2012 12:33 AM in response to AlconicCF
    Level 1 (0 points)
    Nov 10, 2012 12:33 AM in response to AlconicCF

    It worked.  The rebuilding took a while -- it's like installing MAIL from scratch -- the absence of the folders makes MAIL import all the mailboxes it finds and this reconstruction for me was about 65K messages and took about 9 minutes.  The inboxes (I have 7 email accounts) seem to be intact although there was a brief panic when the Exchange served account looked empty -- closing and reopening MAIL a couple of times seemed to fix things. 

     

    The solution is brute force, but it works.  The underlying database was corrupted in some way that let MAIL work with it but without a correct count.  The fix is to force the database manager to recreate the database from scratch.  This is a recurring problem with databases and it is disturbing to me that it occurs with a critical application like MAIL.  Software quality remains the Achilles heel of modern computing.

     

    Thanks for the solution... now back to work for Dr. Bunsen Honeydew!

     

    --beaker

  • by GTBurns,

    GTBurns GTBurns Nov 13, 2012 3:58 AM in response to Glenn Leblanc
    Level 1 (0 points)
    Nov 13, 2012 3:58 AM in response to Glenn Leblanc

    Thanks to Glenn Leblanc for his posts. I had actually spoken to Apple about an issue where blank emails were landing (in work exchange server) and bumping up my unread badge count — permanently. Very frustrating and Apple engineers (after a couple of hours on seperate phone calls) couldn't resolve it! Deleting them made no difference and because the badge count was ever-changing, I eventually switched it off! (in Settings / Notifications). Then I came here last night and bingo! All good again.

     

    For the record — in Mountain Lion — I had to quit Mail. Then hold alt/option key in Finder's 'Go' menu to find Library: then Library/Mail/V2/MailData. Found files: Envelope Index-wal, Envelope Index-shm and Envelope Index and moved them to the Desktop.

     

    When you restart Mail it begins reindexing all your Mail accounts. This should be all it takes to get a correct badge count. It took 15-20 mins for app. 45,000 mails.

     

    When it's all done you can delete the Envelope Index-wal, Envelope Index-shm and Envelope Index files on your desktop — they will have been replaced in  Library/Mail/V2/MailData anyway.

     

    Hope this helps Mountain Lion users and, seriously, massive thanks to Glenn for solving this!

     

    Edit. After restarting Mail for the first time things may still be a bit muddled. Don't panic. Disabling then re-enabling the account will clear that up.

Previous Page 2 of 7 last Next