知識庫

How To Use SpamAssassin In cPanel

SpamAssassin is an email utility that attempts to filter spam by examining incoming email and testing for spam characteristics. It uses Bayesian spam filtering and network testing to screen incoming email. This results in an overall score. If an incoming message reaches a predefined score, the message is discarded.

 

  • Step 1: Turn On SpamAssassin
  • Step 2: Configure Filters
  • Step 3: Enable Spam Box
  • Step 4: Configure Other Options
    • Required Spam Score
    • Blacklisting
    • Individual Scores
    • Whitelisting

 

This score can be set under the Filters heading. The default setting is 5.

Step 1: Turn On SpamAssassin

Connect to the SpamAssassin tool through your cPanel >> Mail section.

To turn on SpamAssassin for your account, click the "Enable SpamAssassin" button. This will enable the tool for all e-mail users on your cPanel account. If you ever need to turn SpamAssassin off, you will navigate to this page and click on the same button, which will read "Disable SpamAssassin.

There are a number of settings associated with SpamAssassin.

 

Step 2: Configure Filters

Filters allow you to automatically delete e-mail messages that are flagged by SpamAssassin. You will want to set the required "score" for SpamAssassin to begin marking messages as spam. The default is 5, but the higher you set the number, the more conservicate SpamAssassin will be.

Enabling this feature could cause you to lose email that is not spam, if a message meets or exceeds the defined score. Make sure SpamAssassin is configured properly for your account before using this feature.

If needed, you can disable the Auto-Delete tool, with the button immediately to the right of the Filters area.

 

Step 3: Enable Spam Box

Enabling the spam box will create an additional folder, named “spam,” where spam mail will be sent. This can be useful in preserving mail that may have mistakenly been filtered by SpamAssassin. It is recommended that you enable this feature.

This feature also comes with a Clear Spam Box function that will delete the messages in the spam box.

It is possible to disable the spam box by returning to the SpamAssassin page and clicking Disable Spam Box.

If you check your mail via a POP3 client, you must access and empty your spam box using the username [email protected]/spam and your email account password. Otherwise, spam may accumulate in the spam box and cause you to reach your email account quota.

  • Only the spam box may be accessed using the above address format; no other folders on your account are accessible in this way.
  • While this is not an issue for IMAP and webmail users, all users should periodically check and delete the contents of the spam box.
  • If you are unsure whether you use POP3 or IMAP to receive mail, you may be able to find this information on your email application's Preferences screen.

 

Step 4: Configure Other Options

When you click Configure SpamAssassin, you can add email addresses that should never be allowed to send you e-mail by typing the address into the blacklist_from box. A whitelist can be created in the same way at the bottom of the page. You can also specify scores that SpamAssassin should use for each particular instance.

Required Spam Score

SpamAssassin scans every message for spam indicators, then assigns it an overall score. You can modify the score required for SpamAssassin to flag a message as junk.

5.0 is the default setting, and is aggressive. It would be suitable for a single e-mail user, but overall you may want it to be higher [between 8 and 10].

Blacklisting

If you are receiving frequent spam e-mails from one particular domain name, and notice that SpamAssassin is not catching them by default, you can add that particular e-mail address to a Blacklist to force each message from that address to be flagged as spam.

You may use * as a wildcard for multiple characters, or ? as a single-character wildcard.

By default there are 5 boxes for you to enter Blacklist entries. If you need more than 5 you will want to fill in all the boxes, click on Save, and then return to the Configuration page to see more available Blacklist boxes for you to utilize.

Individual Scores

You can generate your own tests for SpamAssassin to use when flagging mail messages as spam. Please see http://spamassassin.apache.org/tests.html to verify that you are not already covered by one of the hundreds of tests that SpamAssassin uses by default.

You can enter individual test scores in the following format:

  • “score” “TEST_NAME” “1 to 4 positive or negative numbers”

For example, you could enter:

  • score INVALID_DATE 3.2 3.3 2.5 2.1

This example sets the scores that SpamAssassin assigns to a message with an invalid date in its header.

  • If only one number is listed, that score is always used for the test.
  • Setting a score to 0 will disable the test.

In the example above, 3.2 is the first score, 3.3 is the second, 2.5 is the third, and 2.1 is the fourth. If you enter four numbers, as in the example, then the score that is used depends on whether Bayes and network tests are enabled in your installation of SpamAssassin.

  • The first score is used when both Bayes and network tests are disabled.
  • The second score is used when Bayes is disabled, but network tests are enabled.
  • The third score is used when Bayes is enabled and network tests are disabled.
  • The fourth score is used when Bayes is enabled and network tests are enabled.

Whitelisting

If you notice that certain messages from an e-mail address are being flagged as junk by SpamAssassin when they should not be, you can Whitelist them.

You may use * as a wildcard for multiple characters, or ? as a single-character wildcard.

By default, 5 text boxes appear, allowing you to add 5 addresses. To add more than 5 addresses:

  1. Fill in the first 5 text boxes.
  2. Click Save.

When you return to the page, more text boxes will appear.

Remember:

  • Click Save to store the configuration changes.
  • A whitelisted address is automatically allowed past the filter.
  • A blacklisted address will automatically be filtered by SpamAssassin.
  • More details about configuring SpamAssassin can be found at http://spamassassin.apache.org/.
  • 613 Users Found This Useful
這篇文章有幫助嗎?