: Etherpad users! We are developing an extension that will allow you to create pages from etherpads quickly and easily. Please visit our sandbox and help us test it.


From MozillaWiki
Jump to: navigation, search

Thunderbird's current filter functionality

Thunderbird maintains its filters on a per-account basis. You can have filters for any type of account (mail, news, RSS feed), and for news you can have filters either for the entire news account or just for a particular newsgroup. There also is a set of filters (labeled as "Local Folders") that applies to the POP account messages that go in to the global Inbox. For such messages there are two sets of filters that get applied, first the per-account filters and then the "Local Folders" set.

The filters for an account are kept in a list, of which the filters are attempted to match sequentially. Once a messages matches a particular filter criteria and has an action to move (not copy) the message out of the Inbox, then filtering on that message stops. The user can change the ordering by moving individual filters up or down in the list.


Although Thunderbird does not allow the generic filters functionality to apply to outgoing messages, there are some actions that can be taken on messages. After messages are sent they can be transferred to any mailbox, and on reply a copy can be placed in the mailbox that the original messages resides in. Also, any number of addresses can be automatically added to the Bcc: header when composing. These actions are configured in the Account Settings dialog for each account.

Filters can be applied manually to messages on an ad-hoc basis. In the Message Filters dialog, any number of filters can be selected (for a given account), and applied to all messages in a specified mailbox.

Filters can be enabled or disabled. For example, a user may wish to disable a filter in order to not run it against incoming messages, but this still allows it to be selected in order to manually run it on messages.


The criteria by which filters match messages in Thunderbird is fairly large. There are a number of pre-listed common headers to match against (e.g. Subject, To, From, etc.) as well as the ability to enter any custom header. In addition there are numeric criteria, such as the size of a message and how old a message is. For text-based comparisons there are six different operators: contains, doesn't contain, is, isn't, begins with, ends with. Numeric comparisons support equals, greater than, and less than. If the From: header is being matched, then there are also operators to check if the address is or isn't in the user's address book.

Filters can have an unlimited number of criteria, and can be configured to fire if all or any of the criteria match. There is also a special "Match all messages" setting that ignores any criteria.


There are a variety of actions that can be performed by a filter in Thunderbird. Messages can be automatically organized by being moved/copied to another mailbox. Responses can be made in the form of a reply with a template, or forwarded to any number of addresses. The properties of a message can be altered: read/unread status, star, priority, tag, and junk status. And finally, messages left on the server can be deleted or fetched.

There can be an unlimited number of actions associated with a filter.

Migrating Eudora's filters to Thunderbird

Our plan is to move filters from Eudora to Thunderbird in a way that will best fit Thunderbird's current filter set. Later we can add extra functionality to Thunderbird's filters, and change the importing process to take advantage of the new features.

Thunderbird 2.0's filters are fairly similar to Eudora's, but Eudora's are more capable in most aspects. We will need to provide some sort of warning to the user when the filters will not be faithfully reproduced. TBD whether that warning contains specific info about the filter(s) that will not import exactly, or whether it will just be a generic "functionality will be lost" message. The majority of users have only simple "Transfer to mailbox X"-type filters, so those should move over easily.

One discrepancy is that TB's filters are organized/stored per account, with an exception for the "Local Folders" set of filters. In Eudora all filters are global unless they contain a matching criteria against a particular personality. In order to more faithfully reproduce Eudora's filters we will have to make copies of filters in the "Local Folders" set and in each account that does not have messages delivered in to "Local Folders".

Filtering is dependent on other data stores. Since filters are tied to an account, personalities definitely need to be imported before filters. To transfer/copy a message, mailboxes need to be established. Matching against address books obviously requires address books. Replying needs stationery. Setting the label/tag may need custom labels to be imported. Thunderbird's current method of giving the user the choice of what pieces to import may not be the best path to take. A better solution would be to import all of Eudora (personalities, mailboxes/messages, address books, settings, stationery, filters, etc.) in a controlled order that prevents/minimizes loss during the conversion.


As mentioned above, there is no outgoing filter context in Thunderbird, although there is a simple two action setting that can be specified for an account. The "Place replies in the folder of the message being replied to" option is analogous to Eudora's auto-FCC setting, so that maps nicely. If there's only one outgoing filter, and it does a Transfer/Copy to another mailbox, then that imports cleanly. But what if there is more than one? Also, the only matching criteria of Eudora's that will be understood in Thunderbird will be if it matches a certain personality/account.


The "<<Any Header>>" and "<<Junk Score>>" matching operands don't exist in Thunderbird.

Eudora's "unless" conjunction isn't in Thunderbird. However, "x UNLESS y" is the same as "x AND !y", so that should be okay.

Thunderbird doesn't support several of Eudora's matching operators: regular expressions and matching addresses in a particular address book entry (not the entire address book). Also, the "appears"/"doesn't appear" operators in Eudora aren't in Thunderbird, but maybe we can hack "appears" it with "isn't" some impossible/unlikely string.


There's no "Skip Rest" action in Thunderbird. Once a filter matches and has a move (not copy) action, then no further filters are looked at. I haven't tested it, but maybe we can fake "Skip Rest" by adding a "Move to Inbox" action.

There are a number of actions in Eudora that just don't exist in Thunderbird: Make Personality, Play Sound, Speak, Open, Print, Notify User, Notify Application, and Redirect.

Potential new features for Penelope