Filters do not work automatically on non-Inbox folders. Run filters on folders that check for new messages?

RESOLVED DUPLICATE of bug 428574

Status

MailNews Core
Filters
RESOLVED DUPLICATE of bug 428574
7 years ago
3 years ago

People

(Reporter: Away for a while, Unassigned)

Tracking

1.9.2 Branch
x86
All

Firefox Tracking Flags

(Not tracked)

Details

Comment hidden (empty)
(Reporter)

Comment 1

7 years ago
Heh, I pressed Enter too eagerly!

So, here goes the problem.  I have created a filter like this:

Apply Filter when: Checking Mail or Manually Run

* Match all of the following
X-Bugzilla-Type contains changed
X-Bugzilla-Who contains tbplbot@gmail.com

Perform these actions
Mark As Read

I originally created this filter for my Gmail account, and then tried adding the exact same filter to Local Folders as well.

The problem is that the filter does not seem to work (as in, it doesn't mark the matching messages as read) when new mail arrives.  If I go to my Mozilla Bugzilla folder and choose Tools > Run Filters on Folder, then it works correctly and marks all of my messages as read.

This is reproducible 100% of the time.  I'd like to help debug it if someone tells me how!
(Reporter)

Updated

7 years ago
Version: unspecified → 1.9.2 Branch
(Reporter)

Comment 2

7 years ago
I forgot to add that I have enabled the filter log.  The filter log is empty as new messages arrive, but when I run the filter manually, it's filled with lines indicating that the filter is being applied.

Comment 3

7 years ago
Local Folders filters only run when you're using the global inbox with pop3 - Ehsan, I thought you were using IMAP.
(Reporter)

Comment 4

7 years ago
(In reply to comment #3)
> Local Folders filters only run when you're using the global inbox with pop3 -
> Ehsan, I thought you were using IMAP.

I am.  I just added a Local Folders filter because I didn't really understand what Local Folders are!  :-)

But that shouldn't matter since I do have another identical filter in Gmail (which is my IMAP account), right?

Comment 5

7 years ago
the gmail account filter only works on your inbox - do you have server-side gmail filters (e.g., to move messages into the bugzilla folder?)
(Reporter)

Comment 6

7 years ago
(In reply to comment #5)
> the gmail account filter only works on your inbox - do you have server-side
> gmail filters (e.g., to move messages into the bugzilla folder?)

Yes, I do.  Is that why the filters are not applied?  Is there any way to make filters act on all IMAP folders?

Comment 7

7 years ago
"Is there any way to make filters act on all IMAP folders?"

Yes there is a way, but this is a hidden feature for people who know what they are doing, because you can easily get into filter loops, particularly if you are doing message moves.

If you set the preference "mail.server.default.applyIncomingFilters" to the string value "true" then all IMAP folders should be filtered, not just the inbox. You can also control this with more granularity using the user interface in the FiltaQuilla extension.
(Reporter)

Comment 8

7 years ago
Setting that pref did solve the problem for me, but I still find this behavior very confusing.  If the only concern here is protecting users against filter loops, we can just run a cycle detection algorithm on the filter rules and do not allow creation of filters which would result in cycles.  Or am I missing something?

Comment 9

7 years ago
"If the only concern here is protecting users against filter loops ..."

(For the record, I'm the guy who added that preference, and also support it somewhat in the FiltaQuilla extension).

I think the issue is more that the core code does not directly support filters on IMAP folders other than the inbox, but we added a preference in case people want to try to support it in extensions, or use it and know what they are doing. It was easier to just add the preference disabled, then to really think through and test what it would take for this to be always enabled for the average user. For example, I was not really aware that filter loops would be an issue until I started trying to use it.

"we can just ..." is probably true, but someone would have to be motivated to take this on.

Comment 10

7 years ago
A reasonable compromise might be to run filters on folders that are specified to be checked for new messages, since those are likely to have been placed there by server-side filters.

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
OS: Mac OS X → All
Resolution: --- → DUPLICATE
Summary: Filters do not work automatically on newly delivered Gmail messages → Filters do not work automatically on non-Inbox folders. Run filters on folders that check for new messages?
Duplicate of bug: 428574
You need to log in before you can comment on or make changes to this bug.