Closed Bug 552936 Opened 14 years ago Closed 8 years ago

Run Filters on Folder doesnt work, Run Filters on Selected Messages does (If "Stop Filter Execution" fires on a mail by "Run Filters on folder", other filter rules is not applied to other mails)

Categories

(MailNews Core :: Filters, defect)

1.9.1 Branch
x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: dtrollope, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: [filterfails])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3

Sometimes my inbox has messages in it that need to be filtered because I travel and access email from other computers while my normal thunderbird isn't running. So my inbox contains messages that are normally filtered but haven't been.

When I run thunderbird and get mail, new email is filtered. So I run Tools->Run Filters on Folder and nothing happens. No alerts, no errors, no warnings, nothing. It appears as if it succeeded but never actually did anything.

If I select all messages (Ctrl-A) then select Run Filters on Selected Messages the filters are applied and messages are moved to folders as specified by filters.

So its clear that the filters are working, but there is something not quite right about using Run Filters on Folder

I use IMAP

Reproducible: Always

Steps to Reproduce:
1. Shutdown thunderbird and receive messages that should be filtered.
2. Access email from another system, say ipod touch (Don't know if this is important or not)
3. Start Thunderbird
4. Get mail
5. Run Tools->Run Filters on Folder
   [nothing happens]
6. Ctrl-A (Select all messages)
7. Run Tools->Run Filters on Selected Messages
   [messages are filtered] 
Actual Results:  
Nothing is filtered on step 5. No errors, alerts etc.

Expected Results:  
Expect messages to be filtered at step 5.

Using Win XP Pro, up to date.

This behaviour has existed since beta versions and is not new.
Component: General → Filters
Product: Thunderbird → MailNews Core
QA Contact: general → filters
When you do the failed "Run Filters on Folder", are you in Smart Folders mode? If so, does it work if you start from All Folders mode instead?
Good idea. Yes I am in Smart Folders mode. I tried doing it in All Folders mode but it didn't make any difference.

Something I recently noticed is that I created some new filters which are set to only manually run, and I am seeing those executed when I pick run filters on folder - my other filters are set to run on retrieving mail and manually run.

I'm wondering if this issue is specifically when filters are set for both retrieving mail and manual run?

I'll try a test on that tomorrow.
Is this still happening on Thunderbird 7?
Are your filters using Custom mail headers?
There is a similar report in bug 622307, but that actually says the opposite: "run on folder" works, "run on message" does not.
Yes this still happens - I am using TBird 7.0.1 and I routinely use run on message to force filtering.

Since I opened the bug my email configuration has changed. I used to be 
on an IMAP server but have since moved to an exchange server with 
davmail as an intermediary. The behaviour is the same so I don't think 
its a factor but I figured I should share that info in the name of 
completeness.

A typical filter is simply:

Apply when : Checking Mail or Manually Run, Match All of the following:

 From contains <email address>

Curious that there is another bug reporting the opposite.

I'm willing to run debug versions of TBird if needed to help diagnose 
this - just let me know.
At start, try to look into Tools->Error console.
Also, the Tools->Activity manager shows how many messages were moved (after you runt he filter). Try to observe these windows, maybe you notice something.

I can only test on POP3, maybe it makes a difference.
So what is the type of account set in Thunderbird with that exchange server? POP/IMAP? Or what?
I will monitor the activity log and try it.

I am setup as IMAP - davmail converts between IMAP and Exchange
Been watching this over the past few days. Some curious, though not entirely conclusive results. Where I used to be able to get TBird to leave messages in my inbox unfiltered (by shutting down TBird and reading with my iPad etc), I don't seem to be able to do this. Emails get filtered reoutinely upon starting TBird after new mail has been read.

So thats the first difficulty - I'm unable to reproduce the original conditions in my inbox that led to inactive folder filtering.

However, during my observation this week, I found my Junk Email folder had a bunch of old stuff in it. Now I think Exchange automatically puts things in the Junk Email folder without TBird knowing. I ran filter on folder and nothing happened - I reran with messages selected and the filters applied.

Now, thinking that perhaps these were just very old messages that were somehow badly indexed or marked by an older TBird (or Exchange), I left it. After a couple of days, the Junk Email was again full of such [fresh] email. Again, I applied the filter by folder menu item and nothing filtered. Using selected message filtering, it worked.

So, my conclusion is that the folder filtering behaviour (or lack thereof) is still there - but is being masked by improved inbox handling and potentially its filtering application.

However, emails moved to folders (say by server filters) make the vulnerability show up - but this is less of an issue than when it occurs with the inbox.

Sorry this isn't more conclusive.

Cheers
Dave
PS. Watching the activity monitor during these tests was interesting - I didn't realize that was there - but yielded no obvious errors or odd behaviour.
Having the same issue. Using Windows7, TB 6,7 and 8, on IMAP. To reproduce:

1. run TB in safe mode (optional) with IMAP account configured and some filters created
2. leave for a while running on background or minimized
3. open, realize that few of new mails doesn't filtered
4. select subj of one of these mails
5. Do "Run filters on folder": nothing happens. No new entries in "Activity Manager" or "Error console"
6. Do "Run filters on selected message": message get filtered

Expected:
1. filters should constantly run on background, not leaving any unfiltered messages
2. "run filters on folder" should run filters on selected folder
Guys, are your filters defined on some account but the email is received on some other one?
E.g., some users use several accounts (POP3) but move all incoming mail (automatically) to the account Local Folders into one folder.
Then, it makes a difference if the filters are defined on a POP3 account or on the Local Folders account. Does anything like this resemble your setup?
Depends on: 697522
Version: unspecified → 1.9.1 Branch
I have one single account "mcv@...". Applying my filters to upper "Inbox" (not "local folders"),  while all of the targets to move messages - are in the account's folders "mcv@...".
Whiteboard: [filterfails]
(In reply to Dave Trollope from comment #0)
> 5. Run Tools->Run Filters on Folder
>    [nothing happens]
> 7. Run Tools->Run Filters on Selected Messages
>    [messages are filtered] 

Do you use action of "Delete" or "Stop Filter Execution"?
If yes, same problem as bug 695671?
Yes, i'm using "stop filter execution" alot.

Removed that action from all of the rules, and all started to work as expected.

Seems like my bug is actually dupe of #695671
No longer blocks: 393668
Depends on: 393668
FYI.
If "Run Filters on FolderX" is executed and if "Move to FolderX" of a rule fires on a mail in FolderX, other filter ruls on other mails is not executed. This is bug 393668, and another "Run Filters on folder doesn't work even though Run Filters on Selected Messages works well".
Adding "Stop Filter Execution" to bug summary per commet #14.
Summary: Run Filters on Folder doesnt work, Run Filters on Selected Messages does → Run Filters on Folder doesnt work, Run Filters on Selected Messages does (If "Stop Filter Execution" fires on a mail by "Run Filters on folder", other filter rules is not applied to other mails)
No longer depends on: 393668
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.
Reporter's address fails - so Dave's last info is comment 9
Vasa writes " stopped having issues with filters after I upgraded to some of the recent versions of TB."
so => WFM
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
I have still this problem Latest version Thunderbird 52.9.1 (32bit)

Stop Filter Execution does not stop any other filter execution when moving an email from one folder to an other.

Not filtering messages problem exists when there are no specific folders for an account. They are not created but must exist. For example for message per file setting there should be folders:

Archives.sbd
Drafts
Inbox
Sent
Trash

In each of these above folders should be two folders:

cur
tmp

If the tree is complete you should not have problems filtering messages. Just resolved that problem in my 68.1.1.

I use TB 52.5.0 (64-bit) on Ubuntu 17.04 and have the same(??) issue.

From memory, I have experienced this issue over many years without improvement.

Most of the time, all bar one filter will work - and that is a common filter on a number of email accounts.

The one that consistently is unreliable is one which deletes "SPAM" emails. Sometimes, I can even run the filter on the correct folder, and it may - or may not delete the emails.

I find it annoying, as in my SPAM folder, I will sometimes see a dozen or more emails that my filter should have deleted (the filters are set to delete before migration to the SPAM folder.

It suggests to me there is a fault that has been there for some time "lurking". If it could be removed, that would be wonderful.

Many thanks,

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