How do I filter spam in my email client?

The vast majority of spam sent to your SEAS email address is automatically blocked by a service called Proofpoint. Proofpoint does an excellent job of learning about new types of spam and quickly blocking them. Since Proofpoint is automatically used for all SEAS email accounts, you will rarely need to worry about blocking spam yourself.

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

  1. Click Tools | Account Settings | Junk Settings
  2. Use these settings:
    Eudora settings
  3. 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:

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.

  1. 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.
  2. Make sure you don't already have a folder called "Junk". If you do, you can skip the next step.
  3. 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.

  1. Click Tools | Account Settings | Junk Settings
  2. Use these settings (where "brubaker@seas.upenn.edu" is your email address):
    Thunderbird settings
  3. 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

  1. Click Mail | Preferences
  2. Click the Junk Mail icon and use these settings:
    Apple Mail Settings
  3. 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.

  1. Check Mail | Preferences... -> Advanced Tab. Make sure the IMAP Path Prefix is "~/Mail/".
  2. Make sure you don't already have a folder called "Junk". If you do, you can skip the next step.
  3. 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.

  1. Click Mail | Preferences
  2. Click the Junk Mail icon and use these settings:
    Apple Mail Settings
  3. 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.

 

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:

  1. 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".
  2. 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:

  1. Visit your SEAS Account Management page.
  2. Login using your SEAS user name and password.
  3. On the left, click on "Spam Blocker and Blocked Addresses".
  4. Make sure the "Enabled" radio button is checked beneath "Spam Block".
  5. 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:

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:

  1. 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.
  2. 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:

  1. Visit your SEAS Account Management page.
  2. Login using your SEAS user name and password.
  3. On the left, click on "Spam Blocker and Blocked Addresses".
  4. Make sure the "Enabled" radio button is checked beneath "Spam Block".
  5. 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.

© Computing and Educational Technology Services | Report a Problem
cets@seas.upenn.edu | 215.898.4707