Spam Assassin

How to use Spam Assassin - Advanced

Our servers support using custom Spam Assassin configuration files, you can use this tool to generate the new config file. Once you generate it, save it as /home/cpuser/.spamassassin/user_prefs on your account.

You can also manually edit this file, a few of the operatives are:

  • required_score - Defines the required score for Spam Assassin, 5 is default, 1 is the most strict (lets the least amount of spam though, may filter too much), 10 is the least strict (lets the most amount of spam though, may filter too little).
  • whitelist_from - Allows email from this address or domain, syntax is "whitelist_from user@domain.com"
  • blacklist_from - Denys email from this address or domain, syntax is "blacklist_from user@domain.com"

 

SpamAssassin

SpamAssassin is a popular SPAM filtering program that uses a set of rules to determine if incoming e-mail is potentially SPAM. It uses a scoring system to add or subtract points based on conditions that match certain rules, and, if enough points are accumulated (at or above the "Score Threshold"), marks it as SPAM. SpamAssassin can also use a Bayesian type filter to improve the accuracy with which SPAM is detected.

Installing SpamAssassin

For installation instructions, please click here.

Using SpamAssassin

Getting Started

Once SpamAssassin is installed on your account, you will need to configure your SpamAssassin settings, and then configure your e-mail client to work with your SpamAssassin settings.

We have created a web based SpamAssassin configuration tool to make it easier and quicker to change your individual user and global user SpamAssassin settings. To log into your SpamAssassin configuration tool, point your browser to the following address (make sure to replace yourdomain.com with your own domain name):

http://www.yourdomain.com/plugins/spamassassin/config.php

You will be asked to enter your account username and password to continue (see Figure 1).


(Figure 1: SpamAssassin Configuration Login Screen)

User Settings

By default, the SpamAssassin configuration tool will ask you to modify your SpamAssassin settings and preferences for a specific e-mail user (see Figure 2).

To configure SpamAssassin for a specific user:

  1. Make sure that User Settings is selected from the top nav bar.
  2. Select the user account you wish to configure from the User drop down menu.
  3. Select the SpamAssassin threshhold from the Required Hits drop down menu.
    • Required Hits: SpamAssassin uses a unique point system to filter your e-mail. Each message is analyzed and assigned a score based on a list of rules. If the total score of the e-mail is equal to or greater than your Required Hits value, your message will be marked as SPAM. Depending on your personal preference, you can set this number as high (lenient) or low (strict) as you like, though the default value of five is suitable for most people.

  4. Type in a Subject Tag in the indicated field.
    • Subject Tag: Once SpamAssassin determines that an e-mail message is SPAM, it will insert the Subject Tag into the beginning of the e-mail subject line. This allows you to set up custom filters on you personal e-mail client to sort SPAM-flagged e-mail.

      For example, if you received a SPAM message with the following subject line:

      Refinance your mortgage!

      and your Subject Tag is set to ***SPAM***, the email subject line will be changed to the following:

      ***SPAM*** Refinance your mortgage!

  5. Select the Report Safe setting from the drop down menu.
    • Report Safe: This setting allows you to modify the way you receive e-mail messages that SpamAssassin marks as SPAM. There are 3 different options for Report Safe.

      0 - By setting Report Safe to 0, the message body of the SPAM message is kept intact, and a detailed list of the offending SPAM rules is included in the e-mail header.

      1 - By setting Report Safe to 1, the message body is replaced by 2 attachments, The first attachment is a SPAM report, detailing the e-mail messages SPAM rule offenses, and the second attachment is the original message body (with content-type message/rfc8222).

      2 - By setting Report Safe to 2, the message body is replaced by 2 attachments. The first attachment is a SPAM report detailing the e-mail messages SPAM rule offenses, and the second attachment is the original message body (with content-type text/plain).

  6. Select whether you would like to Use Bayes on this user account.
    • Use Bayes: This setting allows your SpamAssassin to continue to learn new SPAM rules and definitions by analyzing both valid e-mails and SPAM e-mails that you receive.

  7. Select whether you would like to have Auto Learn activated on this user account.
    • Auto Learn: SpamAssassin has an Auto-Learn feature which uses information from messages seen in the past to improve decisions about SPAM in the future.

  8. Enter any Blacklist e-mails in the specified text box.
    • Blacklist: SpamAssassin has a Blacklist feature that allows you to automatically mark certain e-mail addresses as SPAM regardless of its SPAM score. To add an e-mail address to your SpamAssassin Blacklist, type the full e-mail address in to the Blacklist text box.

      NOTE: Multiple e-mail address should be separated on separate lines or with a single blank space. DO NOT use commas or semi-colons to separate your e-mail addresses.

      Example Blacklist:
      greatoffers@domain1.com
      freestuff@domain2.biz
      newsletter@domain3.net
      bob@domain4.com

  9. Enter any Whitelist e-mails in the specified text box.
    • Whitelist: SpamAssassin has a Whitelist feature that allows you to automatically mark certain e-mail addresses as valid e-mail regardless of its SPAM score. (e.g. valid e-mail newsletters). To add an e-mail address to your SpamAssassin Whitelist, type the full e-mail address in to the Whitelist text box.

      NOTE: Multiple e-mail addresses should be separated on separate lines or with a single blank space. DO NOT use commas or semi-colons to separate your e-mail addresses.

      Example Whitelist:
      bob@domain1.com
      newsletter@domain2.biz
      mary@domain3.net
      info@domain4.com

  10. Click Submit to save your SpamAssassin settings for this user account.

Global Settings

The SpamAssassin configuration tool allows you to modify the settings for ALL e-mail users on your domain (see Figure 3).

To configure SpamAssassin for ALL e-mail users on your domain:

  1. Make sure that Global Settings is selected from the top nav bar.
  2. Select the SpamAssassin threshhold from the Required Hits drop down menu.
    • Required Hits: SpamAssassin uses a unique point system to filter your e-mail. Each message is analyzed and assigned a score based on a list of rules. If the total score of the e-mail is equal to or greater than your Required Hits value, your message will be marked as SPAM. Depending on your personal preference, you can set this number as high (lenient) or low (strict) as you like, though the default value of five is suitable for most people.

  3. Type in a Subject Tag in the indicated field.
    • Subject Tag: Once SpamAssassin determines that an e-mail message is SPAM, it will insert the Subject Tag into the beginning of the e-mail subject line. This allows you to set up custom filters on you personal e-mail client to sort SPAM-flagged e-mail.

      For example, if you received a SPAM message with the following subject line:

      Refinance your mortgage!

      and your Subject Tag is set to ***SPAM***, the email subject line will be changed to the following:

      ***SPAM*** Refinance your mortgage!

  4. Select the Report Safe setting from the drop down menu.
    • Report Safe: This setting allows you to modify the way you receive e-mail messages that SpamAssassin marks as SPAM. There are 3 different options for Report Safe.

      0 - By setting Report Safe to 0, the message body of the SPAM message is kept intact, and a detailed list of the offending SPAM rules is included in the e-mail header.

      1 - By setting Report Safe to 1, the message body is replaced by 2 attachments, The first attachment is a SPAM report, detailing the e-mail messages SPAM rule offenses, and the second attachment is the original message body (with content-type message/rfc8222).

      2 - By setting Report Safe to 2, the message body is replaced by 2 attachments. The first attachment is a SPAM report detailing the e-mail messages SPAM rule offenses, and the second attachment is the original message body (with content-type text/plain).

  5. Select whether you would like to Use Bayes on all user accounts.
    • Use Bayes: This setting allows your SpamAssassin to continue to learn new SPAM rules and definitions by analyzing both valid e-mails and SPAM e-mails that you receive.

  6. Select whether you would like to have Auto Learn activated on all user accounts.
    • Auto Learn: SpamAssassin has an Auto-Learn feature which uses information from messages seen in the past to improve decisions about SPAM in the future.

  7. Enter any Blacklist e-mails in the specified text box.
    • Blacklist: SpamAssassin has a Blacklist feature that allows you to automatically mark certain e-mail addresses as SPAM regardless of its SPAM score. To add an e-mail address to your SpamAssassin Blacklist, type the full e-mail address in to the Blacklist text box.

      NOTE: Multiple e-mail address should be separated on separate lines or with a single blank space. DO NOT use commas or semi-colons to separate your e-mail addresses.

      Example Blacklist:
      greatoffers@domain1.com
      freestuff@domain2.biz
      newsletter@domain3.net
      bob@domain4.com

  8. Enter any Whitelist e-mails in the specified text box.
    • Whitelist: SpamAssassin has a Whitelist feature that allows you to automatically mark certain e-mail addresses as valid e-mail regardless of its SPAM score. (e.g. valid e-mail newsletters). To add an e-mail address to your SpamAssassin Whitelist, type the full e-mail address in to the Whitelist text box.

      NOTE: Multiple e-mail addresses should be separated on separate lines or with a single blank space. DO NOT use commas or semi-colons to separate your e-mail addresses.

      Example Whitelist:
      bob@domain1.com
      newsletter@domain2.biz
      mary@domain3.net
      info@domain4.com

  9. Click Submit to save your SpamAssassin settings for all user account.

E-mail Client Configuration

SpamAssassin will not delete or sort any e-mail, it only flags potential SPAM with the designated Subject Tag. For SpamAssassin to truly be effective, you will need to configure your e-mail client to watch for flagged messages and perform appropriate actions on the SPAM messages (e.g. move the flagged SPAM message to a different folder, delete the flagged SPAM message, etc...).

For this example, we will be moving the flagged SPAM to a new mail folder we created earlier named Possible Spam. This is a good option if you are worried about SpamAssassin flagging valid e-mail as SPAM (this is called a false positive). Once the flagged e-mail is sorted into our Possible Spam folder, we can check it as often as we like to make sure there are no false positives and send the SPAM to the e-mail trash. Most e-mail clients will allow you to simply delete the flagged SPAM if you don't want to bother with checking for false positives, be aware that once the e-mail is completely deleted, there is no way to bring it back.

Below are instructions for filtering incoming mail with the most popular e-mail clients. If you do not see your e-mail client below, you will need to contact the author or distributor of your e-mail client for detailed instructions on filtering e-mail with your program.

Outlook Express

  1. Click on Tools from the top bar.
  2. Click on Message Rules > Mail... from the Tools menu.
  3. Check the Where the Subject line contains specific words checkbox ( ) from the 1. Select the Conditions for your rule: box (see Figure 4).


    (Figure 4: Setting the Conditions for Our Filter)

  4. Check the Move it to the specified folder checkbox ( ) from the 2. Select the Actions for your rule: box (see Figure 5).


    (Figure 5: Setting the Actions for Our Filter)

  5. Click the contains specific words link from the 3. Rule Description (click on an underlined value to edit it): box.
  6. Type your Subject Tag into the top field and click the Add button and then click the OK button. (see Figure 6).


    (Figure 6: Enter Your Subject Tag Into the Top Field)

  7. Click the specified link from the 3. Rule Description (click on an underlined value to edit it): box.
  8. Find the Possible Spam folder that you created earlier from the list of Local Folders and select it and click the OK button (see Figure 7).


    (Figure 7: Select Your Possible Spam Folder)

  9. Enter in your unique rule name in the 4. Name of the rule: box (see Figure 8).


    (Figure 8: Enter a Unique Rule Name)

  10. Click the OK button to finish.

Thunderbird

  1. Click on Tools from the top bar.
  2. Click on Message Filters... from the Tools menu.
  3. Select your e-mail account from the Filters for: drop down menu and then click the New... button from the Message Filters window (see Figure 9).
  4. Enter in your unique rule name in the Filter name: field (see Figure 10).
  5. Type your Subject Tag into the empty field next to the Subject drop down and contains drop down from the top box (see Figure 11).
  6. Find the Possible Spam folder that you created earlier from the Local Folders drop down menu (see Figure 12)
  7. Click the OK button to finish.

Eudora

  1. Click on Tools from the top bar.
  2. Click on Filters from the Tools menu.
  3. Click the New button from the Filters menu.
  4. Select Subject: from the Header: drop down menu (see Figure 13).
  5. Type your Subject Tag into the empty field next to the contains drop down menu (see Figure 14).
  6. Click the first drop down menu under the Action section and select Transfer To near the bottom of the list (see Figure 15).
  7. Click the In button next to the Transfer To drop down menu and select your Possible Spam folder from the drop down menu (see Figure 16).
  8. Close the Filters window and click Yes when it asks if you would like to save the changes to the filter (see Figure 17).


Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
POP and SMTP (Views: 2672)
Email Hacked (Views: 2096)
Mail Filter (Views: 2695)

Powered by WHMCompleteSolution

WordPress and WHMCS integration by i-Plugins