16

Thunderbird's message filters (ToolsMessage Filters…) seem to only fire on Inbox automatically. If you want to filter on subfolders, you'd have to start this filter manually (ToolsRun Filters on Folder).

How can I filter mails in subfolders automatically, too?

I found the (now EOL'ed) extension Filter Sub Folders. There it says:

It turns out that there's already functionality to do filtering on sub folders in Thunderbird, it's just not well documented (indeed, it's barely documented at all). It can be enabled by setting the preference "mail.server.default.applyIncomingFilters" to true, or can be applied per folder by setting the "applyIncomingFilters" property to a folder.

I searched for the property mail.server.default.applyIncomingFilters, but didn't find it. So I added it (as string, according to this issue) and set its value to true. But this didn't work. After restarting TB the mails in subfolders didn't get filtered.

FilterQuilla (https://addons.mozilla.org/en-us/thunderbird/addon/filtaquilla/) is reported to be able to set that property, although I haven't tested it.

It doesn't say anything about that in the description.


Similar (but not same) question: How can I get Thunderbird to automatically move messages?

See also (useful to have it combination): How can I get Thunderbird to check subfolders on IMAP?

3 Answers 3

11

According to [1], set up Thunderbird to run filters on subfolders:

  1. Click the "Tools" menu
  2. Click the "Options" sub-menu
  3. Select the "Advanced" and "General" tab
  4. Click the "Config Editor..." button
  5. [Optional] Click the "I'll be careful (...)" button
  6. Right click on top of any of the preferences shown and click "New >"
  7. Select "String"
  8. Preference name: mail.server.default.applyIncomingFilters
  9. Preference value: true

Now the second problem is that the filters only work when you click the sub-folder. This seems to be because filters are only executed when new messages are downloaded and that only happens when you click the sub-folder.

According to [2], set up Thunderbird to download messages whenever new mail is detected:

  1. Go to the Config Editor (if needed, see above how to get to the "Config Editor..." button)
  2. Set mail.imap.use_status_for_biff to false
  3. Set mail.server.default.autosync_offline_stores to true

As pointed out in [2], please see the following observations

The advantage of the AutoSync settings is that (...) any downloading is not delayed until you go offline.

(...)

If you use it, be careful about how you configure Thunderbird to check for new mail, to avoid it downloading folders that you didn't expect.


[1] http://forums.mozillazine.org/viewtopic.php?f=39&t=1444045&p=12768821#p12768821

[2] http://kb.mozillazine.org/Offline_folders#AutoSync

2
  • This doesn't seem to work anymore on version 52.9.1 (32-Bit)
    – toesslab
    Commented Aug 13, 2018 at 5:16
  • This answer is completely outmoded as of 2021-12-26 and Thunderbird v91.
    – hopeseekr
    Commented Dec 26, 2021 at 12:39
13

To make filtering works for subfolders: 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".

Source: http://forums.mozillazine.org/viewtopic.php?f=39&t=1444045&p=12768821#p12768821 see reply of "geoyo1"

6
  • Thanks for your answer. Unfortunately, this doesn't work for me. As I documented in my question, I already tried this. I tried it again now, but it still doesn't work. I added the string preference, but after restarting TB nothing changed. The filter still doesn't apply to the subfolder automatically.
    – unor
    Commented Apr 3, 2013 at 15:07
  • Oh, it worked for a mail now. Seems to work only when visiting the folder manually. I'll test some more.
    – unor
    Commented Apr 4, 2013 at 11:26
  • I don't understand why, but sometimes it takes a long time until the messages are moved. However, as soon as I visit the folder, the filter apply immediately. It's a solution, so I accept your answer. Thanks for pointing me again to this string preference :)
    – unor
    Commented Apr 8, 2013 at 14:14
  • Can confirm this works on Thunderbird 31 (Ubuntu)
    – paul.ago
    Commented Aug 26, 2014 at 14:03
  • works. +unor try to set thunderbird to automatically download messages in the folder, only when message is downloaded filters are applied.
    – Ohad Cohen
    Commented Jan 23, 2015 at 16:21
2

You can solve your problem by using the Shedule-Filters Add-On. It still works with TB 52, but you need to install it manually.

After the installation you need to display the usual menu bar:

enter image description here

and then you find it under "Tools". Now you only need to mark the specific subfolder and select Tools -> Add message filters in folder schedule and define an interval. After that all your filters will run on this subfolder every X minutes:

enter image description here

In combination with FiltaQuilla's search term "Folder Name" this is really powerful because you can create general rules that only apply to certain folders and they run automatically!

In my opinion this should be a TB built-in feature.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .