Closed Bug 414106 Opened 17 years ago Closed 14 years ago

Unread Counter Error with Filters and, possibly, Compact Folders

Categories

(Thunderbird :: Folder and Message Lists, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: n1ck.h0w1tt+bugzilla, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: closeme 2010-04-22)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: version 2.0.0.9 (20071031)

I have 4 POP3 mailboxes running with their own folders. 2 get upwards of 30 SPAM mails a day or when I turn the PC on. I have a first rule that "if subject contains viagra, casino, rolex, penis or body contains viagra, casino or penis, then set junk status to Junk, Mark as Read, Move Message to Deleted on whichever folder". Sometimes I notice that the unread message counter on the Inbox goes wrong, such that it displays a count lower than the true unread count until I click on the Inbox when the unread count suddenly jumps to the correct number. This can be fixed by deleting all the .msf files and re-compacting the folders. With the rule disabled I do not have this problem.
From researching this, the indications are that you should never compact the folders when fetching mail. I suspect that this rule is triggering folder compaction while new mail is still arriving as it moves mail between folders.
I also run Junk junk mail controls on each account, but I want to delete these matching messages automatically before I need to review the junk.
This issue is apparent on my primary and one secondary account, but is better observed on a secondary account as this Inbox is not selected when Thunderbird first starts and fetches mail.
The issue does not only happen when TB first starts, but it is more likely then due to the amount of mail downloaded.
If diagnosis is correct Compact Folders should not be allowed while POP is running and vice-versa.

Reproducible: Sometimes

Steps to Reproduce:
1. Set up first rule "if subject contains viagra, casino, rolex, penis or body contains viagra, casino or penis, then set junk status to Junk, Mark as Read, Move Message to Deleted on whichever folder"
2. Get a lot of POP3 messages with a fair amount of junk, enough of which matches the rule above, such that compact folders may be triggered. (Perhaps lower the compaction threshold or delete a number of messages from Junk and Inbox prior to fetching mail so compaction is more likely)
3. Unread counter may go wrong
Actual Results:  
Sometime the unread counter in the Inbox displays an incorrect count until the Inbox is selected, when the counter then changed to the correct count.

Expected Results:  
Unread counter should always be correct without having to select folder.
Blocks: 438257
My diagnosis is incorrect. It does not matter if Compact Folders is allowed to run automatically. Compact Folders running automatically causes other issues which I have reported in other bug(s).

I get the problem just with the filter enabled when receiving a fair amount of e-mails (10+?) some of which are spam, and some of the spam matching the filter.

I have had to stop these sorts of filters.
When you say "POP3 messages with a fair amount of junk" are you saying that they match your filter, or that they are being classified as junk by the TB Bayesian filter? Do you have the bayes junk classification enabled?
Some junk comes in pre-classified by my ISP. I also have the Bayesian filter enabled. What I am trying to do is force known junk into into my trash to limit the items in the Junk folder that I have to quickly scan for false positives. It can go wrong when my filters get matched.
Component: General → Mail Window Front End
QA Contact: general → front-end
can you reproduce this using version 3.0 [1] or 3.1 [2]?

[1] http://www.mozillamessaging.com/en-US/thunderbird/
[2] http://www.mozillamessaging.com/en-US/thunderbird/early_releases/  (beta 2
comes out soon)
Component: Mail Window Front End → Folder and Message Lists
QA Contact: front-end → folders-message-lists
Whiteboard: closeme 2010-04-22
Sorry but I have now switched to IMAP. With this set up I not noticed any bugs with the counter.
(TB 3.0.4, WinXP Pro)
WFM per comment 5.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.