But before talking about filters, there is the issue of when and where they will work. The default out of the box arrangement for Thunderbird is they work on the inbox of a single mail account. As discussed below, that can be expanded for IMAP accounts and with the use of the Send Filter add-on you can run filters on mail as you send it.
If you have an IMAP mail account the filter will only run on the inbox. The functionality to enable filters to run on all sub folders has been around since Thunderbird version 3, but they never got around to placing a setting in the user interface to set it up, so you need to do it manually.
In Thunderbird select options from the tools menu. Then select the Advanced tab and finally on the General sub tab select the config editor button. Promise to be careful
In the list of settings, right click and select New and then string from the fly out menu
in the enter preference name dialog, place the following text and click Ok
mail.server.default.applyIncomingFiltersThe next dialog asks for a value for mail.server.default.applyIncomingFilters. Enter the value
Trueand click Ok
Note: These settings are case sensitive, so be sure to copy them exactly, including the camel case.
Now all your filters on IMAP mail accounts will run against all folders. This is a good thing if you want to say auto archive mail based on age. It is a bad thing if you want to move mail from the inbox to somewhere else.. Enter the filtaQuila add-on. This add-on, among it's list of features makes it possible to include the folder name in Filters, so a filter that used to move mail from email@example.com to the folder snoopy now needs a folder name in the mix, either as if folder is not "name" so the filter will run on all folders but the destination, or folder is "name" so the filter only works on that folder.