10 Replies Latest reply: Apr 28, 2009 7:38 PM by Brad2610a
Doug Niven1 Level 1 Level 1 (45 points)
Hi Folks,

My problem is not the unread mail count in the Dock, but the unread mail count in left-hand column Inbox.

It says 32 unread mail, and even after rebuilding my Inbox, quitting, rebooting, that number never changes. Even if there aren't 32 messages total in the Inbox.

Using OS X version 10.5.6 and Apple Mail version 3.5 (930.3), and IMAP protocol.

Deleting this IMAP account, then recreating it from scratch fixed the problem before, but now the same problem has appeared again.

Any ideas?

Thanks, Doug
  • V.K. Level 9 Level 9 (56,130 points)
    try rebuilding the entire mail index. quit Mail and delete the file /users/username/library/mail/envelope index. start mail and let it import (that means reindex). if that doesn't help, try making a smart mailbox with a single condition to show only unread messages. see if it reveals those hidden unread messages.
  • Doug Niven1 Level 1 Level 1 (45 points)
    I'll give it a try, thanks!
  • Doug Niven1 Level 1 Level 1 (45 points)
    Interestingly, tossing the Envelope Index did not fix this problem.

    Creating a Smart mailbox for all unread mail and then marking all the mail there as "read" reset the counter next to the Inbox at top left in Apple Mail.

    However, now the reverse is happening:

    --the unread mail count in the Dock and at top of window is correct, but there is no value next to Inbox at top left in Apple Mail

    Note this user had an Archive & Install recently and there's nothing suspicious in her log files, so this is a real mystery.

    Message was edited by: Doug Niven1
  • V.K. Level 9 Level 9 (56,130 points)
    Doug Niven1 wrote:
    Interestingly, tossing the Envelope Index did not fix this problem.

    Creating a Smart mailbox for all unread mail and then marking all the mail there as "read" reset the counter next to the Inbox at top left in Apple Mail.

    However, now the reverse is happening:

    --the unread mail count in the Dock and at top of window is correct, but there is no value next to Inbox at top left in Apple Mail

    oh, brother... You can try resetting mail preferences. maybe something is wrong there. quit Mail and delete (or move to the desktop) the file /users/username/library/preferences/com.apple.mail.plist. Start Mail and recreate all your accounts. see if the unread count displays correctly now.

    Note this user had an Archive & Install recently and there's nothing suspicious in her log files, so this is a real mystery.

    Message was edited by: Doug Niven1
  • Doug Niven1 Level 1 Level 1 (45 points)
    VK, thanks for your help.

    Been there, done that, already. Since this is an IMAP account and nothing is stored locally, it was trivial to toss the prefence file, then recreate the account. That was what I tried first.

    I guess I'll try tossing all those other .plist files in /Users/[username]/Library/Mail next....
  • Ernie Stamper Level 8 Level 8 (37,550 points)
    When using IMAP accounts, and removing the Envelope Index, you must also remove the IMAP folders to prevent problems! This is because the Envelope Index in on each computer, and when the procedure creates new xxxx.emlx names in each Messages folder, in each mailbox it may lose sync with the messages on the server. They are only on the Mac to reindex, if you have selected to Keep all messages for Offline viewing.

    Having said all that, whether a message in an IMAP mailbox is marked as Read or Unread is something that happens on the server, and not on the Mac. It appears to me that you may have some communication problems with the server.

    Ernie
  • Patrick Brice Level 1 Level 1 (15 points)
    Just wanted to chime in that this fix worked for me.

    Thanks!
  • Machinegun Level 1 Level 1 (5 points)
    This worked for me as well! Not having a badge next to the Inbox (the dock badge worked correctly) was driving me nuts. Thanks
  • Machinegun Level 1 Level 1 (5 points)
    Another thing, login to your webmail account through Safari (or whichever browser you use) and delete any redundant email folders or ones that you don't use. I had two trash, sent, and junk folders which I suppose was confusing Mail.app therefore the Inbox badge wasn't displaying correctly.

    Also, I noticed that when I pointed to one Junk folder and clicked on "Use this Mailbox for" > Junk, my Inbox badge on the left panel disappeared although I had two unread messages in there. After I deleted a bunch of folders through webmail (I deleted both my Junk folders since Mail.app will make a new one anyway), everything is working perfectly

    I hope this helps anyone.
  • Brad2610a Level 1 Level 1 (0 points)
    I was having the same issues and in the end was solved in the simplest way.

    I selected all messages in the inboc... changed to unread... then back to read.

    Presto! all was fixed.