Bug 87738

Summary: System tray icon's tooltip reports one unread message when IMAP inbox is empty
Product: [Applications] kmail Reporter: Thibaut Cousin <kde>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: christophe
Priority: NOR    
Version: 1.7   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thibaut Cousin 2004-08-22 11:38:18 UTC
Version:           1.7 (using KDE 3.3.0, SuSE)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.5-7.104-default

When my IMAP mailbox is empty, the KMail system tray icon correctly reports no mail (no digit on the icon) but its tooltip incorrectly reports one unread message.

When there are some new messages, the tooltip seems to work correctly.

Thanks for your attention!
Comment 1 Daniel Burrows 2004-08-29 14:52:17 UTC
I saw something like this while importing my existing (large) mailboxes into the KMail maildir format yesterday.  The tray icon at one point reported 870 unread messages when there were in fact 0, and several times opening a mailbox that didn't have unread messages caused the count to drop inexplicably by a message or two.  I assume that information about the number of unread mails is being cached that should be recalculated.

This may be related to the fact that I was doing a lot of renaming of folders, moving/refiltering messages, and so on.  It might not occur with "normal" usage (ie, just downloading and reading messages).

This was with KMail 3.3 from Debian unstable.
Comment 2 Thibaut Cousin 2004-08-29 22:30:19 UTC
I didn't do any such renaming, just connecting to my already existing IMAP account with the upgraded KMail...I'm afraid the bug is more general, then.
Comment 3 Thibaut Cousin 2004-09-02 22:40:11 UTC
The thing seems to be getting worse over time. The system tray icon now reports 9 unread messages in my IMAP mailbox, while there is actually none. Accessing my IMAP account with Squirrelmail, I see no unread message, so there is no problem with the IMAP server, it comes from the system tray icon...
Comment 4 Till Adam 2004-09-05 14:41:27 UTC
Could this be a duplicate of the bug that KMail reports deleted but unread mails as unread?
Comment 5 Thibaut Cousin 2004-09-05 15:01:54 UTC
I'm a bit puzzled now, for two reasons:

First, for the invisible unread messages in the system tray icon, I must apologize, since I found the cause and there is no bug. I thought I had disabled my local mailbox, but in fact KMail kept checking it. I never open that mailbox, so I didn't see that spam messages were accumulating in it. My bad.

Second, I saw a second problem. I thought it was related to the previous one, but I now know it's not. KMail reports one unread message in each IMAP subfolder. For example, I have 3 messages in the subfolder, all have been read. In the status bar, I get the string "3 messages, 1 unread.". The system tray icon displays the correct information, i.e. no unread message.

I thought that maybe my IMAP server was just keeping an invisible message for indexing purposes or something like that (I'm using Cyrus), but I checked and it's not the case. KMail just reports one unread message in all my subfolders. The same problem exists with a local maildir.

I don't think it's related to the bug you mention, since it happens in folders where I have never deleted unread messages, as far as I know (I read them all). Morever, it always reports 1 unread message, never 2 or 3...

Again, my apologies for the inappropriate report.
Comment 6 Thomas McGuire 2008-02-17 02:38:54 UTC
Some bugs about wrong unread count in the system tray icon:

bug 75583
bug 83893
bug 87738
bug 119350
bug 131917
Comment 7 Christophe Marin 2008-11-09 13:24:32 UTC
Merging the duplicate bugs.

*** This bug has been marked as a duplicate of bug 75583 ***