How do I filter spam in my email client?
There are two important levels to blocking spam:
- Personal level - This article discusses how to filter spam using your email client.
- Server level - We have a separate Answers article discussing ways to stop spam at the server level.
It is important to implement both levels of filtering to control the amount of spam you receive. If you are interested in knowing more details about why both levels are necessary or just want more details about how we filter mail, please visit our How we filter mail article.
This article explains how to use your email client's (Eudora, Thunderbird, Mutt, etc...) built-in spam filtering. Filtering locally allows you to customize the spam filter based on what you want to be classified as spam. The more email you mark as spam and not spam, the better your email client will get at identifying spam messages in the future. Filtering spam locally does not replace the filtering done at the server level. Instead, it provides another layer of protection against spam.
Thunderbird
Thunderbird's junk mail filtering system requires training to be accurate. Because of this, we recommend that you don't initially have junk mail sent to a separate folder. By keeping it in your inbox, you can teach Thunderbird what is spam and what isn't. Once you are satisfied with Thunderbird's success rate, you can have spam automatically moved to a "junk" folder.
Turn on server spam filtering
If you haven't done so already, turn on the server spam filter by following these instructions.
Set up junk mail identification
- Click Tools | Account Settings | Junk Settings
- Use these settings:

- Click OK at the bottom of the window.
Training the junk mail filter
To train the junk-mail filtering, you need to mark messages that you've received as either "junk" or "not junk". There are various ways that you can mark messages:
- Right-click on a message and choose Mark -> As Junk (or As Not Junk).
- Select a message and from the "Message" menu, choose Mark -> As Junk (or As Not Junk).
- Select a message and click on the Junk icon on the toolbar.
- Select a message and type "J" (for Junk) or "Shift+J" (for not Junk).
Initially, the automatic junk mail detection for incoming messages might not be very accurate because it needs to be trained.
Stop here if you want to spend some time training Thunderbird's spam filter. Start from this spot once you are satisfied Thunderbird knows what is spam and what isn't.
Create the Junk mail folder
Note: This step will create a new "folder" for your junk mail. Be aware that this is distinct from your "spamfolder" used by the SEAS SpamAssasin filter. Combining these two folders is not recommended since they are used by two separate filtering systems.
- Check Tools | Account Settings -> Server Settings -> Advanced... Make sure IMAP Server Directory is "~/Mail/",
and make sure "Show only subscribed folders" and "Server supports folders that
contain sub-folders and messages" are both UNchecked.
- Make sure you don't already have a folder called "Junk". If you do, you can skip the next step.
- Click File | New | Folder... Type the name as "Junk".
Leave the "Messages Only" radio button selected.
Set up junk mail to automatically move to Junk folder
Warning: If you do this step before a month or two of training (as described above), you may find many real messages get sent to the Junk folder.
- Click Tools | Account Settings | Junk Settings
- Use these settings (where "brubaker@seas.upenn.edu" is your email address):

- Click OK at the bottom of the window.
It is advisable to check your Junk folder every few days to make sure no good mail has been placed there. Also, spammers will continue to evolve new ways of getting around spam filters, so there will always be a few messages that get through the filter. Identifying a spam message that gets through as spam will help the filter recognize similar messages as spam next time.
Note: using the settings suggested above, messages in your Junk folder older than 30 days will be deleted.
Eudora for Windows (version 6+ required)
Eudora's junk mail filtering system requires training to improve accuracy. Because of this, we recommend that you don't initially have junk mail sent to a separate folder. By keeping it in your inbox, you can teach Eudora what is spam and what isn't. Once you are satisfied with Eudora's success rate, you can have spam automatically moved to a "junk" folder.
Turn on server spam filtering
If you haven't done so already, turn on the server spam filter by following these instructions.
Set up junk mail identification
- Click Tools | Options...
- Scroll down to the "Junk Mail" icon and use these settings:

- Click OK at the bottom of the window.
Training the junk mail filter
To train the junk-mail filtering, mark a message using "junk" and "not junk". If you have a message that is Junk, highlight the message, then use the Junk command. The message will be given a Junk score of 100. If you have a message identified as junk that is not Junk, highlight the message, then use the Not Junk command. The message will be given a Junk score of 0. There are various ways that you can mark messages:
- Right-click on a message and choose Junk (or Not Junk).
- Select a message and from the "Message" menu, choose Junk (or Not Junk).
- Select a message and type "Ctrl+J" (for Junk) or "Ctrl+Shift+J" (for not Junk).
Initially, the automatic junk mail detection for incoming messages might not be very accurate because it hasn't yet been trained very much.
Stop here if you want to spend some time training Eudora's spam filter. Start from this spot once you are satisfied Eudora knows what is spam and what isn't.
Create the Junk mailbox
Note: This step will create a new "mailbox" (or "folder") for your junk mail. Be aware that this is distinct from your "spamfolder" used by the SEAS SpamAssasin filter. Combining these two folders is not recommended since they are used by two separate filtering systems.
- Check to see if you already have a mailbox called "Junk" listed under "<Dominant>". If you already have one, you can skip to the next section.
- To create the mailbox, click Mailbox > Dominant > New... Type the name as "Junk". Leave the "Make it a folder" check box UNchecked (which is the default).
Set up junk mail to automatically move to Junk folder
Warning: If you do this step before a month or two of training (as described above), you may find many real messages get sent to the Junk folder.
- Click Tools | Options...
- Scroll down to the "Junk Mail" icon and use these settings:

- Click OK at the bottom of the window.
It is advisable to check your Junk folder every few days to make sure no good mail has been placed there. Also, spammers will continue to evolve new ways of getting around spam filters, so there will always be a few messages that get through the filter. Identifying a spam message that gets through as spam will help the filter recognize similar messages as spam next time.
Note: using the settings suggested above, messages in your Junk folder older than 30 days will be deleted.
Apple Mail
Apple Mail's junk mail filtering system requires training to improve accuracy. Because of this, we recommend that you don't initially have junk mail sent to a separate folder. By keeping it in your inbox, you can teach Apple Mail what is spam and what isn't. Once you are satisfied with Apple Mail's success rate, you can have spam automatically moved to a "Junk" folder.
Turn on server spam filtering
If you haven't done so already, turn on the server spam filter by following these instructions.
Set up junk mail identification
- Click Mail | Preferences
- Click the Junk Mail icon and use these settings:

- Close the Junk Mail window.
Training the Junk mail filter
Initially, you will need to train the spam filter to recognize the messages you consider to be spam. If a valid message is incorrectly marked as junk, highlight the message, go to the Message menu, then Mark, then As Not Junk Mail.
If a spam message is not marked as junk, follow the same steps as above, but select Mark -> As Junk Mail. There is also a Mark as Junk/as Not Junk icon in the Mail's toolbar which you can use instead of the menus.
Over time, Mail will become more and more accurate at correctly identifying spam. Spammers will continue to evolve new ways of getting around spam filters, so there will always be a few messages that get through. Identifying a spam message that gets through as spam will help the filter recognize similar messages as spam next time.
Stop here if you want to spend some time training Apple Mail's spam filter. Start from this spot once you are satisfied Apple Mail knows what is spam and what isn't.
Creating a new folder
Note: This step will create a new "folder" for your junk mail. Be aware that this is distinct from your "spamfolder" used by the SEAS SpamAssasin filter. Combining these two folders is not recommended since they are used by two separate filtering systems.
-
Check Mail | Preferences... -> Advanced Tab.
Make sure the IMAP Path Prefix is "~/Mail/".
- Make sure you don't already have a folder called "Junk". If you do, you can skip the next step.
- To create the new folder, click Mailbox -> New Mailbox...
Type the name "Junk".
Set up junk mail to automatically move to Junk folder
Warning: If you do this step before a month or two of training (as described above), you may find many real messages get sent to the Junk folder.
- Click Mail | Preferences
- Click the Junk Mail icon and use these settings:

- Close the Junk Mail window.
It is advisable to check your Junk folder every few days to make sure no good mail has been placed there. Also, spammers will continue to evolve new ways of getting around spam filters, so there will always be a few messages that get through the filter. Identifying a spam message that gets through as spam will help the filter recognize similar messages as spam next time.
Webmail
Turn on spam filtering for your account
If you haven't done so already, turn on the server spam filter by following these instructions.
Training the filter
You can now use the Report as Spam and Report as Innocent links in Webmail:
"Report as Spam" will take any selected message(s), add its characteristics to your personal spam filter, and delete the message.
"Report as Innocent" will take any selected message(s) and remove its characteristics from your personal spam filter. This link is generally used in your "spamfolder" to tell the filter that it misclassified a valid email.
Required Training
Before your personal spam filter will start working, you need to train it with at least 100 pieces of "innocent" mail. We recommend the following:
- Teach the filter from all the good messages in your largest folder. Make sure there are no spam messages in your largest folder, select all the messages (see note below), and teach the filter these are good messages: click the checkbox at the top of the list of messages to select all, then click "Report as Innocent".
- Teach the filter from all the spam messages in your spamfolder. Make sure there are no good messages in your spamfolder, select all the messages, and teach the filter these are bad messages: Click the checkbox at the top of the list of messages to select all, then click "Report as Spam".
Note: you can change the number of messages displayed on a
page. So, when you want to do something to a lot of messages at once, you
can increase the number of messages displayed on a page to 999, then
"select all" and do what you need to do, then set the messages per page
back. The drawback to displaying all your messages on one page is that
the large pages load slowly. In webmail, use Options > Mailbox and Folder Display Options > Messages per page in the mailbox view to change the number of messages displayed.
Once you have done the training, follow these instructions:
- Visit your SEAS Account Management page.
- Login using your SEAS user name and password.
- On the left, click on "Spam Blocker and Blocked Addresses".
- Make sure the "Enabled" radio button is checked beneath "Spam Block".
- Click on "Update Email Filters" further down the page to save and exit.
Assuming you have trained the filter with at least 100 "innocent" messages, your personal filter will start working.
Managing your spamfolder
Once you have done the training and activated your filter, it will begin to move new messages it thinks are spam to your "spamfolder". It is advisable to check your spamfolder every few days to make sure no good mail has been placed there. If you find a valid email in your spamfolder, simply select the message and click the Report as Innocent link.
Mutt
Turn on spam filtering for your account
If you haven't done so already, turn on the server spam filter by following these instructions.
Training the filter
You can now use *s (that's asterisk-ess) to add the characteristics of a message to your personal spam filter. *h (asterisk-aitch) will remove the characteristics of a message from your personal spam filter.
Required Training
Before your personal spam filter will start working, you need to train it with at least 100 pieces of "innocent" mail. We recommend the following:
- Teach the filter from all the good messages in your largest folder. Make sure there are no spam messages in your largest folder, select all the messages, and teach the filter these are good messages: Hit shift-T period enter to tag all messages, then *h to learn them as "ham".
- Teach the filter from all the spam messages in your spamfolder. Make sure there are no good messages in your spamfolder, select all the messages, and teach the filter these are bad messages. Again do Shift-T Period Enter to tag all messages, and then *s to learn them as "spam".
Once you have done the training, follow these instructions:
- Visit your SEAS Account Management page.
- Login using your SEAS user name and password.
- On the left, click on "Spam Blocker and Blocked Addresses".
- Make sure the "Enabled" radio button is checked beneath "Spam Block".
- Click on "Update Email Filters" further down the page to save and exit.
Assuming you have trained the filter with at least 100 "innocent" messages, your personal filter will start working.
Managing your spamfolder
Once you have done the training and activated your filter, it will begin to move new messages it thinks are spam to your "spamfolder". It is advisable to check your spamfolder every few days to make sure no good mail has been placed there. If you find a valid email in your spamfolder, simply use *h to report the message as not spam.
Other UNIX-based mail readers
Turn on spam filtering for your account
If you haven't done so already, turn on the server spam filter by following these instructions.
Training the filter
At the moment, we don't have simple keystrokes for pine, mh, or other unix
mail readers. If you would like to configure your mail reader to train
the
personal spam filter, here are the commands you need to
run to to mark messages as spam or ham:
- To learn a message as spam, pipe the full message and headers into the
command 'bogofilter -s', for instance:
bogofilter -s < spam-message
- To learn a message as ham (non-spam), pipe the full message and headers
into the command 'bogofilter -n', for instance:
bogofilter -n < ham-message
There are a number of other options for the 'bogofilter' command. See 'man
bogofilter' for details. A particularly useful option is -M, which tells
bogofilter that its input will be a mbox style mailbox. For instance,
while the above commands expect a single message only, you can have them
read an entire mailbox like this:
bogofilter -s -M < spam-mailbox
Required Training
Before your personal spam filter will start working, you need to train it with at least 100 pieces of "innocent" mail. We recommend the following:
- Teach the filter from all the good messages in your largest folder. Make sure there are no spam messages in your largest folder, and use the bogofilter -n -M option described above.
- Teach the filter from all the spam messages in your spamfolder. Make sure there are no good messages in your spamfolder, and use the bogofilter -s -M option described above.
Once you have done the training, follow these instructions:
- Visit your SEAS Account Management page.
- Login using your SEAS user name and password.
- On the left, click on "Spam Blocker and Blocked Addresses".
- Make sure the "Enabled" radio button is checked beneath "Spam Block".
- Click on "Update Email Filters" further down the page to save and exit.
Assuming you have trained the filter with at least 100 "innocent" messages, your personal filter will start working.
Managing your spamfolder
Once you have done the training and activated your filter, it will begin to move new messages it thinks are spam to your "spamfolder". It is advisable to check your spamfolder every few days to make sure no good mail has been placed there.
|