Open Bug 428574 Opened 16 years ago Updated 3 months ago

UI to allow filters to automatically apply to ALL incoming messages other than inbox (in ANY folder including IMAP subfolders)

Categories

(Thunderbird :: Mail Window Front End, enhancement)

x86
Windows XP
enhancement

Tracking

(Not tracked)

People

(Reporter: seisen, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
Build Identifier: Mozilla Thunderbird version 2.0.0.12 (20080213)

Now Account filters are only automatically apply to Inbox folder (even without subfolders of Inbox in case of IMAP account).

I want to Thunderbird automatically apply filters to all incoming messages regardless in which folder (or subfolder in case of IMAP) a message will come.
In other words all folders which marked as "Check this folder for new messages" must be affected by Account filters for new messages that was detected in it.

I think it will be all messages that want to appears in "alert notification" but filters are work at first of all and if filter move/delete/... such message it not appears in "alert notification" of course.

Reproducible: Always

Steps to Reproduce:
1. Create IMAP account with some subfolder in Inbox ('test' for example)
2. Create some filter for this account ('mark all read', 'move all to trash' for example)
3. Let's server put any message to your 'test' folder
Actual Results:  
New unread message will be in 'test' subfolder, 'Inbox' folder is bold (marked as new message arrived), "alert notification" was showed.

Expected Results:  
New read message must be in 'trash' folder, 'Inbox' folder is normal (not changed), "alert notification" was not showed.

The "Bug 294632" is helpful too but it's not the same.
I want that already existing Account filters (one set of filters, not different filters for each folder) will apply to all incoming messages (not to some folders or subfolders) but for any folder in which new message is appears.

P.S. I'm sorry if something was wrong, I write to bugzilla at first time.
Flags: wanted-thunderbird3?
Version: unspecified → Trunk
Product: Core → MailNews Core
Component: General → MailNews: Filters
Product: Thunderbird → Core
QA Contact: general → filters
Whiteboard: dupem
Could be a dupe of bug #289208?
good call. let's make it dependent
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Depends on: 289208
Ever confirmed: true
Whiteboard: dupem
Bug 257415 "Add filtering for IMAP folders other than the INBOX" now provides the capability to override this behavior, though there is no UI for this (but I will provide one in an extension for TB3). It's an inherited folder property, which means that the request of this bug could be met by setting the string preference "mail.server.default.applyIncomingFilters" to "true".

So the backend exists. You need to decide whether this bug is now WFM, or is a request to 1) add UI for this, or 2) change the default behavior.
Component: Filters → Mail Window Front End
Product: MailNews Core → Thunderbird
QA Contact: filters → front-end
Summary: Filters must automatically apply to ALL incoming messages (in ANY folder including IMAP subfolders) → UI to allow filters to automatically apply to ALL incoming messages (in ANY folder including IMAP subfolders)
Depends on: 257415
Summary: UI to allow filters to automatically apply to ALL incoming messages (in ANY folder including IMAP subfolders) → UI to allow filters to automatically apply to ALL incoming messages other than inbox (in ANY folder including IMAP subfolders)
Does this actually require the config value to be a string?  From my reading of the code, that seems to be the case.
Yes, according to my testing this requires a string argument set equal to "true".  Which is an odd way to enable or disable a boolean feature.
Sorry, been ignoring this.

Yes true is string "true". This is an inherited string property, which only supports string. Not much different than DOM attributes though, which are also "true".
Ah, that explains the design decision.  Thanks!
Any workaround/extension is for TB2 can solve this problem?
(In reply to comment #9)
> Any workaround/extension is for TB2 can solve this problem?

The solution mentioned in comment 3 is a TB3-only solution. It would be theoretically possible for an extension to detect new messages and apply a filter to them in TB2, which would be a workaround of sorts, but I am not aware of any such solution.
Solution in comment3 still works in Thunderbird 17, but with one nuance ...

create a new string preference "mail.server.default.applyIncomingFilters" to "true". Even if it seems odd, do NOT create a boolean setting, it has to be a STRING setting with the value "true".

forum: http://forums.mozillazine.org/viewtopic.php?f=39&t=1444045&p=12768821#p12768821
Maybe it's a good time to implement this stuff. Since 2008 or even 2010 people have more and more mobile device. This is a reason for a lot of server-side filtering and sending things directly to folders instead of the inbox.

I have a lot of server-side filters but I need some filters for things that the server won't do, like adding tags to messages so I can color code them. Alright, this may be edge-case. But how hard it is to put a config somewhere or to make an extension that only set this flag on the config options?
Hmm, does this bug apply to my Feed accounts not firing filters automatically? By default all feed folder names are created from the feed title, which is pretty much never "Inbox". Not sure if renaming a feed folder "Inbox" would make filters fire. Going to have to test that later today.
(In reply to Leho Kraav (:macmaN @lkraav) from comment #13)
> Hmm, does this bug apply to my Feed accounts not firing filters
> automatically? By default all feed folder names are created from the feed
> title, which is pretty much never "Inbox". Not sure if renaming a feed
> folder "Inbox" would make filters fire. Going to have to test that later
> today.

I don't think so.
(In reply to Wayne Mery (:wsmwk) from comment #14)
> (In reply to Leho Kraav (:macmaN @lkraav) from comment #13)
> > Hmm, does this bug apply to my Feed accounts not firing filters
> > automatically? By default all feed folder names are created from the feed
> > title, which is pretty much never "Inbox". Not sure if renaming a feed
> > folder "Inbox" would make filters fire. Going to have to test that later
> > today.
> 
> I don't think so.

I can confirm that doing the mail.server.default.applyIncomingFilters trick made Feeds filtering also work as desired.
No longer depends on: 289208
See Also: → 289208

Can this option be added to the filters UI and not be hidden away in an advanced configuration area where regular users should not be fiddling around in?

I recently learned filters only work on Inbox, which is a ridiculous idea. It should by default apply to all incoming mail regardless the folder.

Severity: normal → S3

Most servers now have "Plus addressing", so different emails are delivered in subfolders. and having them filtered outside the inbox is something needed! Doing it manually its just nonsense.

My host forces email into the SPAM folder server side before I can retrieve it.
POP retreival will only grab the INBOX folder, but not the SPAM folder.
IMAP retreival will grab all folders, including SPAM folder, but any filter I have setup to run automatically on message retreival, only runs on the INBOX folder, and not the other folders. You can manually run it on those folders but that defeats the purpose of an automatic filter.

GLOBAL SETTING
Setting a STRING (not boolean) preference "mail.server.default.applyIncomingFilters" to "true" seems to solve the issue globally and it will now run the filter on all folders of all IMAP mailboxes, including SPAM filter.

MAILBOX SPECIFIC SETTING
However, what I want to do is turn this feature on for only one specific mailbox only that is IMAP, but not the other mailboxes.
It appears, each mailbox is assigned as 'server1', 'server2' etc so if you can determine (from looking in the preferences) what the specific mailbox is called, I think you can set it for the one mailbox only.
So if the mailbox I want is 'server2', then I think I can replace 'default' like this:
Setting a STRING (not boolean) preference "mail.server.server2.applyIncomingFilters" to "true".

Can anybody confirm if this is correct or not?

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