Last Comment Bug 324777 - junk mail not moved to junk folder sometimes (Thunderbird, Local Junk folder)
: junk mail not moved to junk folder sometimes (Thunderbird, Local Junk folder)
Status: NEW
[summary: comment 102]
: steps-wanted
Product: MailNews Core
Classification: Components
Component: Filters (show other bugs)
: 1.9.1 Branch
: x86 All
: -- normal with 19 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
: 370495 380396 391533 403489 451713 473758 550707 702917 (view as bug list)
Depends on: 168648 196732 310431
Blocks: 498274 junktracker 362247 370495
  Show dependency treegraph
 
Reported: 2006-01-26 02:41 PST by cornel panceac
Modified: 2015-09-30 06:27 PDT (History)
48 users (show)
vseerror: needinfo? (mdcrawford)
standard8: blocking‑thunderbird3-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description cornel panceac 2006-01-26 02:41:09 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4
Build Identifier: thunderbird 1.5 20051201

junk message is correctly marked as junk but not moved to the junk folder as it does with all the other junk messages

a similar problem has been reported in bug #323257

Reproducible: Sometimes

Steps to Reproduce:
1.open thunderbird
2.get new messages
3.some junk messages goes to messages, one is not, remaining in inbox




unmarking and re-marking the message as junk moved it to the junk folder
Comment 1 cornel panceac 2006-01-26 10:41:41 PST
i mean, some junk messages goes to JUNK one is not, even if it was correctly marked automatically as junk. it was left on inbox.
Comment 2 cornel panceac 2006-01-26 22:43:41 PST
it happened again. i have received two messages. one was clean (and the program marked him accordingly and left him in inbox as it was supposed to), the other junk, marked correctly by thunderbird as junk but not moved to junk folder as it was supposed to, instead it was left also on inbox. i have enabled logging  now, and maybe we'll found out what's going on ....
Comment 3 cornel panceac 2006-01-27 00:50:00 PST
update: i have received three junk emails. all three were (automatically) moved correctly to the junk folder, by the filter(rule).
Comment 4 Mike Cowperthwaite 2006-02-02 07:32:11 PST
(In reply to comment #1)
> i mean, some junk messages goes to JUNK one is not, even if it was correctly
> marked automatically as junk. it was left on inbox.

Did the one that wasn't moved arrive in the same fetch as the ones that were?

Are you getting mail from multiple accounts?  POP or IMAP?  If POP, are you using the Global Inbox (or a global junk folder)?



(In reply to comment #3)
> update: i have received three junk emails. all three were (automatically)
> moved correctly to the junk folder, by the filter(rule).

"By the filter" meaning, you have a filter defined to move junk mail?  Or do 
you mean by the normal operation of junk moving?


See bug 196732 comment 60 -- this bug is likely a dupe of that.
Comment 5 cornel panceac 2006-02-03 01:36:29 PST
(In reply to comment #4)
> (In reply to comment #1)
> > i mean, some junk messages goes to JUNK one is not, even if it was correctly
> > marked automatically as junk. it was left on inbox.
> 
> Did the one that wasn't moved arrive in the same fetch as the ones that were?
> 
> Are you getting mail from multiple accounts?  POP or IMAP?  If POP, are you
> using the Global Inbox (or a global junk folder)?
> 
> 
> 
> (In reply to comment #3)
> > update: i have received three junk emails. all three were (automatically)
> > moved correctly to the junk folder, by the filter(rule).
> 
> "By the filter" meaning, you have a filter defined to move junk mail?  Or do 
> you mean by the normal operation of junk moving?
> 
> 
> See bug 196732 comment 60 -- this bug is likely a dupe of that.
> 

i have only one account, pop, and in "accounts" it says all these folders are local, but, when i look on the left frame, there's my account, and below there's "local folders" so i suppose it's not global

the messages arrive all in the same fetch.

i have defined in "junk mail controls" the rule to (automatically) move the junk messages to the junk folder.

i have not posted more but the story goes on randomly and even once all the junk in a fetch was moved ....
Comment 6 Lee Bartholomew 2006-08-07 16:06:19 PDT
Seems to be happening more often after that latest update.  Have to restart Thunderbird in some cases and reboot the computer in others.
Comment 7 u88484 2006-09-06 06:03:57 PDT
These messages that were incorrectly marked as junk but not moved...do you have the send in a filter? addressbook? is there some kind of other filter that includes this sender? 

I just think it's weird that its only the messages that you say were incorrectly marked as junk that weren't automatically moved to junk folder.
Comment 8 Lee Bartholomew 2006-09-06 06:10:46 PDT
Maybe it's another bug, I have noticed though that when I start to scroll down on my email thats still coming in..  that's when it marks stuff that really is junk, but fails to move the junk to to junk folder
Comment 9 Mike Cowperthwaite 2006-09-11 12:46:12 PDT
(In reply to comment #8)
> Maybe it's another bug, I have noticed though that when I start to scroll
> down on my email thats still coming in..  that's when it marks stuff that
> really is junk, but fails to move the junk to to junk folder

Interesting.  Some clarification on this, please:  when you say "that's when it marks stuff that really is junk," do you mean:
1) the mail is marked as junk *while* you are scrolling, or
2) the times where you scroll while mail is arriving, are the times when the mail is marked as junk (after arrival) but not moved.

I'm assuming you mean (2) but I wanted to be sure.
Comment 10 Joerg Starkmuth 2006-10-14 12:58:46 PDT
I have the same problem. And I can confirm that it seems to happen (at least more likely) when I scroll or do some other action while the mails are coming in. The filter marks them as junk but leaves them in the inbox.
Comment 11 Peter Ebden 2006-10-16 13:50:37 PDT
I've got the same issue, using 2.0 alpha1 on Linux.
Works fine using seperate POP accounts, but when I changed to Global Inbox, it no longer automatically moves junk messages to the junk folder.
Comment 12 mozilla 2007-01-11 18:39:31 PST
same or similar to https://bugzilla.mozilla.org/show_bug.cgi?id=337585
Comment 13 Wayne Mery (:wsmwk, NI for questions) 2007-02-26 07:32:51 PST
Joerg, Peter, Lee, can you cause this reliably?   Does it sound like bug 196732?
Comment 14 Joerg Starkmuth 2007-02-26 07:47:14 PST
Yes, it seems to be the same as bug 196732 to me. But I cannot reproduce it reliably. It seems to happen on a random basis that junk mails remain in the inbox rather than being moved. Sometimes I had the impression that it helps not to touch the mouse while downloading the mails, but I'm not sure about that.

Note that for any given mail download from the POP server, either *all* or *none* of the received junk mails are moved to the junk folder.
Comment 15 Lee Bartholomew 2007-02-26 08:48:14 PST
I haven't had a problem with this in awhile.  Can't remember the last time.  However something Joerg says about moving the mouse sounds about what I had problems with.
Comment 16 Joerg Starkmuth 2007-04-26 15:03:43 PDT
The problem is still present in TB 2.0.0.0. I would estimate that it happens in about 20 to 40 percent of the cases when I download new mails. It can also happen when I don't touch the mouse or keyboard at all, so meanwhile I doubt that it has to do with that.
Comment 17 WADA 2007-04-26 18:02:42 PDT
Possibly "open failure" of file for Junk folder when try to move after marking as Junk. And this may be caused by anti-virus software.

To all problem reporters :

What happens when Tb's mail directory is registered as "not scan directory" to your anti-virus software(s)? Does frequency of problem decline?    
Comment 18 Joerg Starkmuth 2007-04-27 04:11:30 PDT
Which one is the critical object to be excluded from virus scanning? Junk, Junk.sdb or Junk.msf? I would rather not like to exclude the entire Mail folder ...

Joerg
Comment 19 WADA 2007-04-27 07:28:12 PDT
(In reply to comment #18)
> Which one is the critical object to be excluded from virus scanning?
Junk, not Junk.msf, is the file I suspect "open failure", but I'm not sure. Please exclude all of mail directory of Tb as first step of problem isolation, to see whether anti-virus software has relation to problem or not, if(and only if) you also think it's valuable for problem isolation.
Comment 20 Joerg Starkmuth 2007-05-02 14:45:02 PDT
So far, it does not seem to help to disable the virus scanner (more precisely, the virus guard that checks each file when it is opened). The problem keeps occurring, no matter whether I exclude only the Junk file or the entire Mail folder. If the frequency has declined, then only a little (hard to tell after only some days of testing), definitely not enough for a significant improvement.
Comment 21 WADA 2007-05-02 15:32:53 PDT
(In reply to comment #20)
> more precisely, the virus guard that checks each file when it is opened
I think so too, but I was/am not sure whether this timing only or not. 
> The problem keeps occurring 
Thanks for quick test.
Another suspect is open by "Junk Purge" or contention with "Junk Purge", especially when multi-cpu. If you enable "Junk Purge", disable "automatically delete junk mails older than" and watch some days, please. 
Comment 22 Joerg Starkmuth 2007-05-03 01:03:40 PDT
I never had the "Junk Purge" option enabled, but the problem was there nevertheless. So the Purge function is probably not to blame, too.

Wouldn't it be possible to create a debug build of Thunderbird that checks the reason why it cannot move Junk mails? After all, if it cannot move them, it must know at least a part of the reason (e.g. "file opened by another process"), right?
Comment 23 Magnus Melin 2007-05-16 13:14:56 PDT
*** Bug 380396 has been marked as a duplicate of this bug. ***
Comment 24 WADA 2007-05-16 16:19:50 PDT
(In reply to comment #22)
> the Purge function is probably not to blame, too.
I see.
 
> it must know at least a part of the reason (e.g. "file opened by another process"), right?

Bug 378077 Comment #3 attached data of "many file handles for a .msf by Tb" by process explorer. ( https://bugzilla.mozilla.org/attachment.cgi?id=263700 )
I think "Multiple file handle for a .msf" itself is not a problem, but it seems for me that too many file handles.
Possibly interfere by other task in process of Tb.
Joerg Starkmuth, can you get data like this by some tool such as filemon? 
Comment 25 WADA 2007-06-21 00:15:14 PDT
I saw some Junk mails left in Inbox several times even after Seamonkey 1.1.2.
And, at least when a victim of Bug 368112, original folder of failed "multiple mail move" in my test, when I tried to move some mails to the victim just after problem of Bug 368112, error message of "folder is used by other process" was issued and move wasn't executed.
This is similar situation to Bug 168648 which was mentioned by Mike Cowperthwaite in Bug 196732 Comment #60(pointed by [see comment 60] in Whiteboard:) on 2005-03-17.
> Bug 168648 – Cannot filter (move) messages to Inbox that is busy (fetching its own mail)

A possible scenario of "junk mail not moved to junk folder":
 1. Problem of Bug 368112 occurrs during Junk Move or Junk Purge, then some
    Junk mails are left in Inbox.
 2. Junk folder is locked after Bug 368112, and "Move to Junk folder by Junk
    filter" becomes impossible.
 2. But, this "lock of Junk folder" disappear after a while.
    Why I guess so:
    I could see that Junk mails were moved to Junk successfully even after I saw
    Junk mails left in Inbox. Because I set download interval of 59 minutes
    for the account(99.999% of mails are Junk), I guess that mail-db-close by
    garbage collector unlocks Junk folder.
 4. And Junk move by Junk filter works well again.
Comment 26 Joerg Starkmuth 2007-06-21 02:07:46 PDT
Hmm, it is possible that we are talking about two different bugs here - or at least two different emanations of the problem. Because I *never* encountered the case that only *some* junk mails are left in the inbox. Either *all* of them are moved to the junk folder or *none*.
Comment 27 WADA 2007-06-21 02:29:17 PDT
(In reply to comment #26)
> Because I *never* encountered the case that only *some* junk mails are left in the inbox.
> Either *all* of them are moved to the junk folder or *none*.

Oh, sorry for my ambiguous comment.
My "some" didn't mean "some mails of downloaded mails in one download".
Simply meant that I saw "more than one" mails marked Junk in Inbox several times.
And "Folder will be unlocked" is simply my guess.
I shutdown Seamonkey freequently, and "download interval of 59" is used for account on whuch I saw problem several times, and I have 7 active POP3 accounts and many dummy accounts for test, I'm not sure whether problem was recovered automatically or not.

Question to Joerg Starkmuth to clarify phenomenon:
Once problem occur, "Junk move by Junk filter" will not be executed, and restart of Tb is required?
Comment 28 Joerg Starkmuth 2007-06-21 02:54:13 PDT
> Once problem occur, "Junk move by Junk filter" will not be executed, and
> restart of Tb is required?

No, the program continues to work normally. To me the occurrence of the problem appears to be totally random. In some cases (maybe 20 % of all my POP3 downloads), all mails that are marked as junk remain in the inbox, in other cases they are all moved to the junk folder correctly. Nothing else. No restart required.

Comment 29 Worcester12345 2007-06-21 08:53:50 PDT
Is there any manual way to edit or review the junk mail filter file to see what is in there? 
Comment 30 Wayne Mery (:wsmwk, NI for questions) 2007-06-21 10:11:09 PDT
(In reply to comment #29)
> Is there any manual way to edit or review the junk mail filter file to see what
> is in there? 

Bayes Junk Tool mentioned here: http://kb.mozillazine.org/Junk_Mail_Controls
Comment 31 Worcester12345 2007-06-21 16:04:22 PDT
(In reply to comment #30)
> (In reply to comment #29)
> > Is there any manual way to edit or review the junk mail filter file to see what
> > is in there? 
> 
> Bayes Junk Tool mentioned here: http://kb.mozillazine.org/Junk_Mail_Controls
> 

OK, went there, then went to look at my training.dat file. So, how come this file DISAPPEARED at some point between 1.5 and 2.0 nightly build? Did it not convert or come over properly? Could this be the problem for others? Should this be a new bug?
Comment 32 David :Bienvenu 2007-06-21 16:08:16 PDT
your training.dat file is gone? We haven't changed the location or name of that file since 1.0 - No idea why that would be gone for you, but it pretty much completely breaks the junk filter, obviously.  
Comment 33 WADA 2007-06-21 17:44:21 PDT
(In reply to comment #28)
> > Once problem occur, "Junk move by Junk filter" will not be executed, and restart of Tb is required?
> No, the program continues to work normally. (snip) No restart required.

Thanks. My experience said so, but I was not sure.
Comment 34 Tony Firshman 2007-08-26 00:45:20 PDT
(In reply to comment #1)
> i mean, some junk messages goes to JUNK one is not, even if it was correctly
> marked automatically as junk. it was left on inbox.
> 
I am replying form top of thread as I am not sure if this is a separate bug.  There are many hits for 'junk' and I cannot see a direct reference. Sorry if this is already a known bug.

My problem only appeared after upgrade to 2.0.0.6 from some V1. Auto identified junk mail gets moved OK if JM controls run.  If I manually mark messages as junk, then I have to manually drag to junk as well.  In V1.?.?.? these were moved automatically by TB after marking as junk.
Comment 35 WADA 2007-08-26 01:27:05 PDT
(In reply to comment #34)
> My problem only appeared after upgrade to 2.0.0.6 from some V1. Auto identified
> junk mail gets moved OK if JM controls run.  If I manually mark messages as
> junk, then I have to manually drag to junk as well.

This bug is for problem of b. where;
a. "Manual marking as Junk" always moves junks to Junk folder successfully,
b. "Junk filtering when download" sometimes fails to move to Junk folder,
(c. I don't know about "Run Junk Mail Controls On Folder" case,)
even though all Junk related settings are properly set. 

To Tony Firshman:
Check your Junk mail filter related settings first,
 (1) Tools/Options/Privacy/Junk tab
 (2) Account Settings/Junk Settings
and search open bugs of "junk manual move" in summary.
Comment 36 WADA 2007-08-26 01:34:13 PDT
FYI.
I could observe that Junk mails remained in Inbox after download, when I replied OK to dialog of "Compact folder"(by "Offline & Disk Space" setting). 
Sorry but I'm not sure "compact" was done on Junk when I observed.
Comment 37 Tony Firshman 2007-08-26 01:39:21 PDT
(In reply to comment #35)
> (In reply to comment #34)
<snip>
> To Tony Firshman:
> Check your Junk mail filter related settings first,
>  (1) Tools/Options/Privacy/Junk tab
>  (2) Account Settings/Junk Settings
> and search open bugs of "junk manual move" in summary.
> 
Doh - the upgrade reset my options. Sorry for not checking.
Thanks for the quick reply and resolution.


 
Comment 38 WADA 2007-08-31 19:56:35 PDT
(In addition to comment #36)
My "Junk is not moved when compact is executed" seems to be similar phenomenon to Bug 168648 which I mentioned in Comment #25.
> Bug 168648 Cannot filter (move) messages to Inbox that is busy (fetching its own mail) 

Comment 39 WADA 2007-08-31 23:39:59 PDT
Bug 310431 is earlier report of same phenomenon with clearer summary ("sometimes" is included in summary), although it was reported as App Suite bug.
> Bug 310431 – Junk filter sometimes doesn't move junk to junk folder

Is change to Core & DUP to Bug 310431 appropriate action?
Comment 40 Wayne Mery (:wsmwk, NI for questions) 2007-09-01 06:23:00 PDT
I suggest each product be left with at least one bug open for searchability, and link them up instead of duping.  Might want to avoid duping much in general as there are easily several problems. 

As junk problems rank in the top 5 problem areas of 2.0.0.x, it would be nice to have a *bugday* soon on junk bugs to nail the 155 open bugs.  And possibly some are dupes of those that were recently fixed
bug 206679
bug 279018
bug 377920
bug 378807  
Comment 41 WADA 2007-09-01 18:32:42 PDT
(In reply to comment #40)
> I suggest each product be left with at least one bug open for searchability
Roger, over.
Comment 42 Magnus Melin 2007-09-03 11:59:24 PDT
*** Bug 391533 has been marked as a duplicate of this bug. ***
Comment 43 Daniel Durington 2007-09-07 08:02:40 PDT
A couple of things I have observed when this bug happens for me is that the mail marked junk that doesn't move to the junk folder will move if the junk filter is manually run from the Tools menu. Also if the junk mail is left in the inbox and another download of mail is done, the new junk mail will be moved but the old junk mail will not be moved unless moved manually from the Tools menu.
Comment 44 Magnus Melin 2007-09-23 12:39:30 PDT
*** Bug 396124 has been marked as a duplicate of this bug. ***
Comment 45 Marc Chamberlin 2007-09-23 20:01:51 PDT
Just want to add a note. I recently reported this bug separately, not having found that it was already reported, for some reason with Bugzilla's search tool.. See Bug 396124... In that report I mentioned that it was working under Linux.. I am going to rescind that..  I recently upgraded Thunderbird to 2.0 under Linux and now this feature (of instantly moving junk mail marked as junk to the junk folder) is no longer working reliably there either. So this problem is NOT strictly confined to Windows. That probably rules out external Windows related influences such as anti virus programs etc.. (I don't run anti virus software under Linux, FYI)
Comment 46 WADA 2007-09-23 21:20:41 PDT
(In reply to comment #45)
To Marc Chamberlin:  
Please read thru bug before add comment.
See Comment #35 and Comment #37. This bug is not for problem of "Manual mark as Junk doesn't work". See 394062 and Bug 279018.  
Comment 47 Noel St. John 2007-09-29 12:02:14 PDT
I have the same problem as reported by Cornel. It seemed to start with 2.0.x. I'm currently running 2.0.0.7pre (20070926) on XP. 

I'm not using Junk Purge.

The one major difference is I'm using IMAP. I've just set the max connections from (previously) 1 to (now) 4 but I've just had another spam message auto marked but not moved.

I'll see if the problem is better with the change from 1 to 4 connections. Also I've just turned off my email virus protection (Avast) to see if this fixes it.
Comment 48 Noel St. John 2007-10-20 08:18:59 PDT
For me, this appears to be resolved by changing the IMAP connection number to 5. IIRC 4 connections still showed this problem but much less than before. I previously changed the connections to 1 to solve a problem with complaints about connecting to the IMAP server. This previous problem appears to be resolved so the change to 5 connections has, apparently, no negative impact.
Comment 49 Florian Rittmeier 2007-10-21 03:26:14 PDT
Hello Noel,

thanks for your hint, it helped me with a problem in SM 1.1.4 where mails from one account were not moved to my primary inbox. Before I had specified that the junk folder for the secondary inboxes are on the primary, which didn't work, too. I`m sure you solution is the correct fo many problems, the number of max cached connections should be set to the number of accounts plus some space for each account (I've 7 imap/pop-accounts and set the value to 10).

Thanks!
Comment 50 Joerg Starkmuth 2007-10-21 04:19:31 PDT
In reply to the last few comments: Well, I'm *not* using IMAP, and for me the bug has been present since *before* 2.x and has not changed ever since ... Seems to be a multi-faceted problem.

Is there a POP equivalent to the "max cached connections" setting? If so, where can I change it?

Thanks,
Joerg
Comment 51 Alan Thompson 2007-12-11 13:49:33 PST
This may or may not work for you.

I finally solved the problem with junk mail not being moved very easily (once I tried everything else ;>).  I have several e mail accounts, and checked the "Move junk messages to:" settings on every one of them with no success. Junk would not move out of the Inbox automatically. Tried several of the the things suggested above, like compacting folders, etc. Nothing worked. 

Then it occurred to me: when I set up all of my e mail accounts, I configured all of them to deliver mail to the "Global Inbox" (store mail in Local Folders). ZAP! Brain fog clears... I discovered I also needed to set the Junk mail settings for one more account, the "Global Inbox" or Local Folders account! It was at the bottom of all the other accounts and it just never occurred to me to look there since all my "real" e mail accounts were correctly configured.

Go to > Tools > Account Settings, and click on Local Folders / Junk Settings.  Check the box: "Move new junk messages to: "Junk folder on: Local Folders"

Worked for me. Problem solved.
Comment 52 Chris Denesha 2008-01-18 17:38:12 PST
Alan Thompson's comment #51 worked for me - there was one additional Junk setting all the way at the bottom for Local Folders.  

The interesting thing is that I thought it was working when I had three POP accounts configured and only had the junk option set on the individual account.  Once I added two more it would mark as junk but not move to Junk folder, even though I had it configured for that account.  But maybe I'm mis-remembering.

thanks Alan!

chris
Comment 53 Wayne Mery (:wsmwk, NI for questions) 2008-01-24 05:01:27 PST
*** Bug 380396 has been marked as a duplicate of this bug. ***
Comment 54 Jonathan Pritchard 2008-01-29 18:01:34 PST
Just encountered this bug. When I deleted my old Gmail account in Thunderbird and remade it to use IMAP. I have Move messages marked as junk to account's junk folder checked in the Tools->Options and I have also set under Account Settings my junk folder to Other and the relevant one that Gmail's Help said I should for Thunderbird. Now when I manually mark a message as junk, it does not go to the intended folder, it does nothing whatsoever. I have to manually drag it.

Windows XP SP2.

Thunderbird 2.0.0.x
Comment 55 WADA 2008-02-01 04:53:39 PST
Bug 196732 looks to be older report(Core bug) of the problem.
See also Bug 383202 for problem of "Junk log lies" when problem of Bug 196732/Bug 310431/Bug 324777 occurs.
Comment 56 Noel St. John 2008-02-09 08:33:16 PST
This is resolved for me. I tried the previous mentioned fix. I believe setting the IMAP maximum number of server connections to 5 fixes this (I think this is the default but at one time setting it to 1 was needed to avoid IMAP error messages).

XP SP2
Tbird 2.0.0.13pre (20080207)

I don't know if any specific release helped since it just started working after making the setting change.
Comment 57 Joerg Starkmuth 2008-02-09 08:40:50 PST
Well, I repeat that the bug (or at least the flavor of it that I have) has nothing to do with IMAP, as I'm only using POP3, and the bug has always been there and still is.
Comment 58 ovidiu 2008-05-13 10:38:01 PDT
I would consider related
bug 392714
bug 351811

all could change to 
OS "all" (all three different)
versions are newer than "1.5"
from general to "mailnews: filters"? like bug 196732 ..
Comment 59 Steve Simms 2008-08-28 12:45:14 PDT
*** Bug 451713 has been marked as a duplicate of this bug. ***
Comment 60 Worcester12345 2008-09-04 09:56:21 PDT
This bug is marked against Version 1.5 which has come and gone. The field should be changed.
Comment 61 cornel panceac 2008-09-09 13:01:43 PDT
the bug is still present on
version 3.0a1pre (2008040903)
Comment 62 rfc469 2008-09-21 14:48:28 PDT
I'm seeing this with 2.0.0.14 on SuSE 9.3.  I only started using Thunderbird so I can't be sure, but it seems it may only be happening when the junk mail matches one of my filters and gets moved to a folder.  In that case, the junk stays in the folder instead of being moved to the Junk folder (maybe).  I would expect the junk mail filter to run before any of my own filters.
Comment 63 Alan Hart 2008-10-08 00:59:28 PDT
I don't think I see this any more. I am pretty sure it relates to the IMAP (and POP?) connection caching that doesn't seem to quite work right. If you reduce server caching to 1 connection for each email account, this seems to go away.

Surely this should be marked as a duplicate of bug 196732 and closed.
Comment 64 Joerg Starkmuth 2008-10-08 03:20:53 PDT
Where can I configure that server caching setting?
Comment 65 Alan Hart 2008-10-08 03:49:13 PDT
tools/account settings/server settings/advanced
Comment 66 timmy 2008-10-08 04:12:35 PDT
How about someone solving it instead of everyone working around it?
Comment 67 Joerg Starkmuth 2008-10-08 06:12:14 PDT
This server caching seems to be applicable to IMAP only. At least I don't find the setting for my POP3 accounts. But the bug does affect them, so even if this workaround works in principle, it doesn't help the POP3 users.
Comment 68 Florian Rittmeier 2008-10-10 06:46:57 PDT
I changed the connection caching to 1 connection per account for my imap accounts and it did not help.
Comment 69 Alan Hart 2009-01-14 02:45:15 PST
Appears to be the same as Seamonkey bug 231845
Comment 70 Ludovic Hirlimann [:Usul] 2009-03-20 00:38:21 PDT
*** Bug 403489 has been marked as a duplicate of this bug. ***
Comment 71 Ludovic Hirlimann [:Usul] 2009-03-20 00:42:32 PDT
*** Bug 473758 has been marked as a duplicate of this bug. ***
Comment 72 John P. 2009-05-29 17:01:00 PDT
I just started using Thunderbird, version 2.0.0.21.  I also have this bug.  In any given get-new-mail action, either all the mail that is ID'd as junk gets moved to my (single) junk folder, or none of it does.  I have a global inbox, use POP only, am on Windows Vista 32.  It fails to move junk to junk folder about one third of the time, and whether it works or not seems completely random.
Comment 73 WADA 2009-05-30 20:02:01 PDT
To all IMAP case reporters:

As written in Comment #5, this bug is for local Junk folder case.
Cause of problem on IMAP folder is different in many cases, even if external symptom of "Junk move silently fails" is same, because communication with server is involved. If "move to Junk folder on same IMAP account, "move to Junk folder" consists of "uid x:y copy Junk" and "uid x:y store flag \Deleted", and timeout of "uid copy" causes move failure.

Check mail.server.serverX.timeout value(see Bug 495007), and get IMAP log with timestamp(see meta Bug 402793) and check IMAP level flow first. If Tb's fault is seen in log, open separate bug for IMAP case for ease of problem analysis, please.
I guess "silently fails" part is common, so please set dependency to this bug.

Adding "local Junk folder" in bug summary.
Comment 74 cornel panceac 2009-05-30 20:16:08 PDT
of course, we must not forget this bug is _not_ specific to imap ...
Comment 75 WADA 2009-05-30 20:35:14 PDT
To all reporters of "local Junk folder" & auto-compact=ON case:

Check whether auto-compact is one of culprits, please.
1. Change mail.purge.ask=false to mail.purge.ask=true, and restart Tb.
   (reset it via Config Editor)
2. When dialog before start of auto-compact appeared, reply "No".
   Never check "[ ] Do this automatically from now on" at the dialog.
   If you checked, do step 1 again, and restart Tb.
(Q1) Does your problem occur frequently even when "No" to dialog?
3. If dialog appeared at 2, execute File/"Compact Folders" for each account.
4. Because small threshold(defaulted 100KB), dialog will be issued frequently,
and it's annoying. Increase the value for your daily use.
5. Repeat 2-4 in daily use.
(Q2) Does your problem still occur frequently?
Comment 76 Angel Blue 2009-09-21 12:30:05 PDT
I have a dozen clients using WIN32 Thunderbird 2.0.0.23 who are now having the problem described here: messages are flagged as junk but remain in the Inbox folder although both account settings and program settings are set to move messages flagged as junk to the Junk folder.

For them, this is a reversion, it worked in earlier version of Thunderbird 2.0.x but this bug has been present since at least 2.0.0.17
Comment 77 WADA 2009-09-30 19:32:33 PDT
Bug 362247 was report of IMAP case.
To all problem reporters for IMAP case:
Please add comment to that bug if there is new findings for IMAP case, or open separate bug with attaching IMAP log, because IMAP log is required to analyze IMAP case.
Comment 78 [:Aureliano Buendía] 2009-10-07 00:06:04 PDT
Set as related also to 3.0 release.

I have this problem also today. In error console I have:

Error: currentHeaderData.date is undefined
Source File: chrome://messenger/content/msgHdrViewOverlay.js
Line: 966

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4pre) Gecko/20091006 Lightning/1.0pre Shredder/3.0pre ID:20091006032243
Comment 79 Mark Banner (:standard8) 2009-10-27 13:59:08 PDT
Whilst this appears it could be a significant bug, I don't think we can block on something that has no clear steps to repeat and hasn't been largely confirmed on the Thunderbird 3 builds.
Comment 80 Jonathan Pritchard 2009-10-27 14:47:08 PDT
Using Google Mail & thunderbird-3.0-2.8.b4.fc11.i586

If I take a piece of my spam, mark it as junk, then unmark it it goes into my Inbox. But if I then go and mark that same email as junk again, it doesn't go into the accounts Spam folder. I have to manually drag and drop it to spam.
Comment 81 John Andersen 2009-10-29 15:12:00 PDT
See also this bug which MAY explain why this acts so inconsistently:
https://bugzilla.mozilla.org/show_bug.cgi?id=470114
Comment 82 Mark Banner (:standard8) 2009-10-30 03:47:31 PDT
(In reply to comment #81)
> See also this bug which MAY explain why this acts so inconsistently:
> https://bugzilla.mozilla.org/show_bug.cgi?id=470114

I very much doubt it, but even if it did we'd block on that bug (which is actually probably a duplicate of bug 487610) and not this one.

The only way this will block at the moment is if someone can give clear repeatable steps with Thunderbird 3 (even comment 80 WFM).
Comment 83 Worcester12345 2009-11-12 06:46:32 PST
(In reply to comment #76)
> I have a dozen clients using WIN32 Thunderbird 2.0.0.23 who are now having the
> problem described here: messages are flagged as junk but remain in the Inbox
> folder although both account settings and program settings are set to move
> messages flagged as junk to the Junk folder.
> 
> For them, this is a reversion, it worked in earlier version of Thunderbird
> 2.0.x but this bug has been present since at least 2.0.0.17

Ditto. It seems to happen more with version ending in .23 than before.
Comment 84 Michael D. Crawford 2009-11-12 11:26:57 PST
I get vast torrents of junk, because I have never obscured any of my email addresses.

I have observed that I can mark junk for quite a long time - two hours or more - without this bug ever occurring.  But if I persist with my junk marking, it will inevitably strike.  At that point the bug persists until I quit Thunderbird and relaunch it.

This suggests to me that the problem is some kind of memory corruption.  Perhaps a wild pointer is overwriting a variable somewhere, that has the effect of causing this bug.  That variable then keeps its new, erroneous value so the bug persists.

The bug also seems to be cross-platform - I see reports that it occurs on Linux, Windows and for me on Mac OS X.

I suggest that someone test Thunderbird under Valgrind: http://www.valgrind.org/

It is a memory debugger.  It detects out of bounds memory references, leaks, and it validates the parameters to many system and library calls.  IMHO it is The Best Thing Since Sliced Bread.

If the bug really is cross-platform, you could do the Valgrind work on whatever platform you're most comfortable with.  Note that the latest release has added support for Mac OS X.

On Mac OS X, one could instead use Guard Malloc; one can enable it within the Xcode IDE, or on the command line by consulting "man libgmalloc".

If anyone has buckets of money to burn, they could purchase a copy of Rational Purify.  I expect that Purify can do things that Valgrind cannot, but I'd be surprised if the difference really mattered to this particular bug.
Comment 85 hartung 2010-02-01 17:21:14 PST
This is true in Eudora 8 8b. Some junk gets put in the JUNK folder. Other JUNK is still left in the INBOX folder. Why? This is a POP3 account. Both Eudora settings and Local Accoutn settings are set to move JUNK to the JUNK folder.
Comment 86 Stefan 2010-06-04 22:30:40 PDT
I tested this with Thunderbird 3.0.4 on Windows XP SP3 and it is not working for me.  Messages marked by a filter as they arrive are not moved to Junk automatically.  If I click on a message to mark it junk manually, it is moved.  If it is marked as junk by the junk mail controls, then it is automatically moved to Junk.
Comment 87 Wayne Mery (:wsmwk, NI for questions) 2011-04-19 09:03:38 PDT
*** Bug 370495 has been marked as a duplicate of this bug. ***
Comment 88 Wayne Mery (:wsmwk, NI for questions) 2011-06-13 06:16:45 PDT
(In reply to comment #86)
> I tested this with Thunderbird 3.0.4 on Windows XP SP3 and it is not working
> for me.  Messages marked by a filter as they arrive are not moved to Junk
> automatically.  If I click on a message to mark it junk manually, it is
> moved.  If it is marked as junk by the junk mail controls, then it is
> automatically moved to Junk.

Stefan, If you are using FILTERS, it marks the *status* to junk, but by design a message will not go through same logic as manually marking a message as junk. Namely, a) it does not train the junk database, b) it does *not* move a message to a junk folder.
Comment 89 [:Aureliano Buendía] 2011-12-29 03:13:31 PST
*** Bug 702917 has been marked as a duplicate of this bug. ***
Comment 90 Ludovic Hirlimann [:Usul] 2012-01-24 23:43:21 PST
*** Bug 550707 has been marked as a duplicate of this bug. ***
Comment 91 Larry 2012-01-25 00:04:49 PST
I am using Thunderbird 9.0.1 and Windows 7. If there is junk mail that was not filtered and I mark it as junk it does not go to a Junk folder.  If I run junk controls it does not go to a Junk folder.  If I click on delete Junk it does not go to a junk folder and it does not go to Trash but is gone.
Comment 92 SSovets 2012-05-10 04:55:19 PDT
This bug is still present in TB 12.0.1: a part on the messages auto-marked correctly as Junk are not moved to the Junk folder, but remain in the inbox.
I've seen more reports similar to this, dunno which one is most actual.
Comment 93 Larry 2012-05-11 00:38:45 PDT
Now updated to 12.0.1 and it is working fine.
Comment 94 SSovets 2012-05-11 02:09:23 PDT
I have this bug again since last OS re-install half a year ago, it seems it is set to happen or not during the installation: I had it like 2-3 years ago, then I re-installed the OS and the bug was gone, now I re-installed again and it reappeared.
Comment 95 Wayne Mery (:wsmwk, NI for questions) 2012-11-13 05:01:31 PST
wada, do you still see this?

I just encountered it with my rarely used pop (non-Global) Inbox.  It downloaded about 70  message and auto-marked 6 messages as junk, but did not move them to junk folder. But manual marking of some messages as junk did move them.
Comment 96 Wayne Mery (:wsmwk, NI for questions) 2012-11-13 16:53:01 PST
(reporter no longer using TB)
Comment 97 Wayne Mery (:wsmwk, NI for questions) 2012-12-05 07:37:33 PST
(In reply to Wayne Mery (:wsmwk) from comment #95)
> I just encountered it with my rarely used pop (non-Global) Inbox.  It
> downloaded about 70  message and auto-marked 6 messages as junk, but did not
> move them to junk folder. But manual marking of some messages as junk did
> move them.

Emptied Junk and compacted, but still Continues for me. 

I don't believe that in all user cases, mine for example, that this fails because the target filter is busy.

ssovets, if you disable compact, do you still see the problem?
Comment 98 :aceman 2012-12-05 07:44:21 PST
Wayne, filter=folder? And why version 9?
Comment 99 Wayne Mery (:wsmwk, NI for questions) 2012-12-05 07:48:26 PST
version pick was arbitrary because of my short memory.

my guess is bug is either backend or junk=fillter.  I opted for filter component first. But feel free to move to better component.
Comment 100 :aceman 2012-12-05 07:59:02 PST
I meant filter in this sentence: "... this fails because the target filter is busy."

So can we disambuguate this bug? Is it about the built in junk classification and that it does not move messages to the Junk folder as as in Account settings -> Junk settings?

Or is this about the case when a filter has an action of "set Junk status to: Junk" ?
Comment 101 Wayne Mery (:wsmwk, NI for questions) 2012-12-05 10:12:58 PST
Mike, can you get a sense of this bug and it's context in the grander scheme of issues reported? [1]

(In reply to :aceman from comment #100)
> I meant filter in this sentence: "... this fails because the target filter
> is busy."

c/target filter/target folder/

> So can we disambuguate this bug? Is it about the built in junk
> classification and that it does not move messages to the Junk folder as as
> in Account settings -> Junk settings?

good question. reading beyond comment 0 it may become murky. comment 3 for example?

I don't really have time to read the rest of the bug. 


> Or is this about the case when a filter has an action of "set Junk status
> to: Junk" ?

comment 0 would not seem to be about "set". But indeed we need to clarify. FWIW, the bug summary changed substantively only once, where term "local junk folder" was added.


[1] junk bugs - sorry is so long - https://bugzilla.mozilla.org/buglist.cgi?list_id=5135445;field0-0-0=short_desc;bug_severity=blocker;bug_severity=critical;bug_severity=major;bug_severity=normal;bug_severity=minor;short_desc_type=allwordssubstr;type0-0-0=nowordssubstr;value0-0-0=test%20filter;short_desc=junk;resolution=---;query_format=advanced;product=MailNews%20Core;product=Thunderbird
Comment 102 TGOS 2012-12-05 12:55:56 PST
Wayne asked me to summarize this bug, so I hope I'll be doing a good job here.

Summary
=======

Scenario:

- User fetches mails via POP3
- Junk folder is a local folder
- User has checked "Enable adaptive junk mail controls for this account"
- User has checked "Move new Junk messages to:"
- User has selected "Junk folder on Local Folders"
- User has not checked "Automatically delete junk mails order than … days"


Actual Issue:

During fetch, some e-mails are marked as junk, yet they aren't moved to the local Junk folder. Other e-mails are marked as junk and are moved as expected. All e-mails got fetched in the same session. 

If any mails were not moved, the following actions will move them: 
(1) Unchecking and rechecking the mail as junk.
(2) Running "Run Junk Mail Controls on Folder" from the "Tools" menu.


Additional Information:

One user suggests that the issue may be related to the fact how busy Thunderbird is. E.g. the issue is observed more often, if the e-mail list is scrolled (= UI updates are performed) while new mails are being fetched.

Another user suggests, that in his case, either all mails are marked and moved correctly or all mails are marked correctly but none of them is moved for any given mail fetch session to the same POP3 server. Contradicts initial report, though.

Disabling virus scanning has no effect. Compacting folders has no effect.

It may be that the issue only happens to users with multiple POP3 accounts configured, even though they have all the same junk settings configured for all their POP3 accounts.

Several bugs may be mixed here, though. Some users reported bugs with IMAP connections as well. In case of one user, the issue was solved by raising the maximum number of IMAP server connects to 5. This may be an entirely different bug, though, I would probably ignore this.

For some users the problem was solved by also setting the same junk settings on the "Local Folders" account, in addition to all their POP3 accounts. In fact, maybe users are only confused by the fact, that you can set junk settings for mail accounts, yet maybe all mails end up in a common inbox folder, which is a local folder (is that even possible? Maybe with rules?), and in that case not the junk settings of the POP3 accounts but the ones of the local folders may be important (which most people never enable nor even look at). I must admit, this is indeed very confusing that there are junk settings for local folders, as all mails must arrive through some e-mail account to even get into a local folder.

If there really is a bug to fix (and this bug is not caused by configuration confusion), from the perspective of a developer it sounds like a race condition between processing incoming mails, testing them for junk and moving them around. Most of the time it is "won" and mails are moved correctly, yet keeping the main thread busy (e.g. with UI updates, see above) may change some timings, causing the code to "lose" it. Just an idea, though.
Comment 103 SSovets 2012-12-08 02:41:55 PST
In my scenario the user fetches mails via IMAP and the Junk folder is not a local folder, but a folder on the mail server.
Comment 104 Tony Mechelynck [:tonymec] 2012-12-08 20:27:38 PST
(In reply to TGOS from comment #102)
[...]
> For some users the problem was solved by also setting the same junk settings
> on the "Local Folders" account, in addition to all their POP3 accounts. In
> fact, maybe users are only confused by the fact, that you can set junk
> settings for mail accounts, yet maybe all mails end up in a common inbox
> folder, which is a local folder (is that even possible? Maybe with rules?),
[...]

If you use the "Global Inbox", it is Inbox of Local Folders. Usually accounts using the Global Inbox are not shown in the Folders pane of the 3-pane window.

Note that each mail filter can be configured to run "before" or "after" Junk classification. I'm not sure how relevant for this bug this possibility might be.
Comment 105 Worcester12345 2014-02-27 07:24:49 PST
There seems to be an uptick in junk messages not getting moved in the past month or two.

Thunderbird 24.3.0
Comment 106 John Andersen 2014-02-27 14:42:26 PST
(In reply to Worcester12345 from comment #105)
> There seems to be an uptick in junk messages not getting moved in the past
> month or two.
> 
> Thunderbird 24.3.0

This is a very old bug report, so this might not be the best place to put your report.

But also a bit more info may be needed, such as something about the characteristics of
the spam that does not get moved, and if you are using only the built in spam recognition
tools or if there is a spam scanner upstream that is suddenly passing more spam, and
your Tbird was relying on that upstream process to categorize the spam.

I too was seeing more spam recently, but it was properly being categorized by my 
Imap server so it didn't affect Tbird at all.
Comment 107 Konstantin Svist 2014-02-27 15:33:36 PST
The original report (and ongoing behavior of Tb) is that its internal Junk filtering processes the message -- and message gets marked with the Junk flag -- but the message remains in the inbox.
There's seemingly no pattern to this behavior, at least not that I've noticed. But it does keep happening.
Comment 108 Wayne Mery (:wsmwk, NI for questions) 2014-03-21 03:27:50 PDT
(SSovets no longer uses tbird)
Comment 109 AB 2015-02-09 00:11:02 PST
When fetching new mail, Junk mail is not moved into Junk folder until I select the Inbox folder. (Seamonkey 2.32)
Comment 110 Worcester12345 2015-02-11 07:20:22 PST
This has started happening with more frequency lately. Sometimes I have to select the Inbox and go to the menu to run junk mail controls on the folder.
Comment 111 Tony Payne 2015-03-01 02:16:31 PST
This happened to me about a year ago and the problem went away, I assume with an update, but now it's back.

I am running TB 31.5.0 on Windows XP Pro and have been on this laptop for over 8 years with no other problems.

I have about 10 POP accounts, each goes to it's own set of folders, but Junk Mail is all set to go to the Junk folder in Local Folders.

In the last few days, mail is still flagged as Junk, but nothing moves into the Junk folder at all. The folder remains empty.

I tried to repair the folder, but it made no difference.

Fortunately most of the junk mail I get (which is a LOT) is filtered by my host (Hostgator), but I get enough downloaded to TB to make it a nuisance if the mail is not moved to the Junk folder, and it also means I have to click on the messages to delete them.

If you need more information, please let me know. Happy to provide it.
Comment 112 Tony Payne 2015-03-01 02:28:15 PST
Just tried something else which indicates that the Junk folder is possibly damaged.  I tried to move a message to the folder, but it would not move.  I have tried to repair the Junk folder, but I get no errors and it makes no difference.
Comment 113 Tony Payne 2015-03-01 03:06:02 PST
I managed to figure out a fix for this problem, which will hopefully help others.

Looking at the Junk folder in Notepad++ it was not empty, even though TB was showing that it was. Obviously something was wrong which caused TB to "dislike" doing anything with the folder.

To fix the problem, I first renamed the folder (in the profile) from Junk to Junk.OLD and then created a new one (text document).  To do this, just shutting down TB wasn't enough, the file was still locked. I had to reboot the computer. Having done so and rebuilt the file, when I opened TB new junk messages were moved to it, and when I flagged existing messages as Not Junk then Junk again, they moved as they ought to.

Note You need to log in before you can comment on or make changes to this bug.