Email filters can be set up in webmail and Thunderbird to automatically file messages in specified folders. For instance, you may want to put all your messages from a news group into one folder, all messages from family members into another, and all marked as spam into your junk folder.
Filters make decisions based on conditions that you define. Before you set up a filter, make sure you have a clear idea of what condition you are defining. Are you making a determination based on the sender, the subject, or some other criteria? Where are you going to put the mail that gets filtered?
Once you know what your filter is going to do, the creation process is pretty straightforward.
If you are going to put your filtered mail into a new folder, create the folder by selecting “Local Folders” and choosing File→New→Folder…
Once your folder is created, go to Tools → Message Filters…
Give your filter a name that makes sense, such as “Spam” or “Personal.”
Define your filter rule. If you have more than one condition (e.g. if the sender could contain either “Barack Obama” or “moveon.org”), define the first part of the rule (“From contains Barack Obama”), then use “+” to add another, and define the second part of the rule (“From contains moveon.org”).
Select either “Match all of the following” or “Match any of the following.” In the example I’ve given it would be the latter. (“Match all messages” will allow you to create a rule that affects every single message in your mailbox. This would be useful if you needed to move all messages out of your inbox into a local folder, for instance, but seems like a pretty low-use item.)
In the lower part of the dialog box, select “Move messages to,” and then select the folder to which you're filing. There are other options as well, including the ability to auto-respond or forward the message.
When you’ve got things set up as you want, click “OK.”
Check that the filter is enabled (a checkmark), and then select it and test it by using “Run Now.”
If the filter works as expected, close out of the dialog box; if not, select “Edit…” to make your changes and go back to step 5.
If you are going to put your filtered mail into a new folder, create the folder .by selecting “Folders” and then Choose Action “Create Folder.”
Once your folder is created, go to Options and select “Filters.”
Decide which options are appropriate for your filters, at the very least selecting “Apply filter rules upon logging on.”
Select “Edit your filter rules.”
Define your filter rule. If you have more than one condition (e.g. if the sender could contain either “Barack Obama” or “moveon.org”), define the first part of the rule (Field = From, Text = Barack Obama, Move message to appropriate folder), then repeat to add another rule (Field = From, Text = moveon.org, Move message to appropriate folder).
When you’ve got things set up as you want, click “Create.”
Test the rule by using “Apply all rules.”
If it doesn’t work as expected, start at step 2, and go through steps to correct it.