Filters that apply to multiple accounts?
Is it possible to create a filter in Thunderbird that covers multiple accounts? The interface seems to allow each filter to apply only to one account (which is a major limitation compared to Windows Live Mail).
Compounding the problem, there is no obvious way to copy or move a filter from one account to another. The rule edit interface has a copy feature, but insists on copying the filter within the same account, where it's stuck.
Alle Antworten (4)
Do your filters move messages, and if so would they move messages to the exact same folder in the SAME thunderbird instance (same Thunderbird profile)?
Filters are stored in the msgFilterRules.dat file in each account subfolder of Mail or ImapMail in the profile folder, and can be copied between accounts. Help/Troubleshooting, Profile Folder, Open Folder. Close TB before making any changes.
Thanks, yes, after my original question, I discovered the format and location of in which filters were stored. Despite the worrisome .dat file extension, they are in fact just friendly text files, and it's possible not only to copy them from account to account, but to manually edit them, and copy individual filters from the file in one account to the file in another. (Each filter consists of five lines of text, starting with "name=..." and ending with "condition=...") Copy-paste of the text in files is much faster than re-building a complex filter in the Thunderbird filters interface. The syntax of the filter rules is not too hard to learn. The mail folders in the file system tend to have cryptic names, so it's not super-easy to tell which folder goes with which account; except if you have created sub-folders with recognizable names. Then when you open up a mail folder, you can tell which account it handles based on the names of sub-folders.
Not only is it possible to manually edit them, but the filter files can be manipulated programmatically. I run IIS on my computer for work, and spent a day writing a classic ASP script to run on localhost that rebuilds and expands all the files. The tough part was getting the text encoding (character set) right. The filter files are ISO-8859-1 format, which is codepage 28591.
My mail server has a spam filtering system that classifies messages into four levels of spam probability: high, medium, low, and none. I was in the habit of trusting the high and medium designations, but low has false positives, and none has false negatives. So I compiled a big list of spam words and phrases to use in message rules in Windows Live Mail to further check those categories. My script adds similar filters to every account folder in Thunderbird.
Next problem will be how large filter files and rules can be in Thunderbird. So far, I have an experimental filter with 30 conditions, built by the script, and it works fine and can be edited through the interface. But what about 300 conditions, or 2,000? Does anyone happen to know: -- is there a size limit for msgFilterRules.dat files? -- is there a limit to the length of the condition line of an individual filter?
I think the only limit is the number of custom headers:
http://kb.mozillazine.org/Limits_(Thunderbird)#Message_filters