For cPanel version 11.40
(Home >> Mail >> Spam Assassin)
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.
This score can be set under the Filters
heading. The default setting is 5.
To enable SpamAssassin:
- Simply click the Enable SpamAssassin button on the SpamAssassin home screen.
It is possible to disable SpamAssassin by returning to the SpamAssassin page and clicking Disable SpamAssassin
Automatically Delete Spam
This function automatically deletes messages that meet or exceed the score limit. Activate this function by clicking the Auto-Delete Spam
button under the Filters
Click the Disable Auto-Delete Spam
button to disable this feature.
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.
Enable the Spam Box
When you click Enable Spam Box
, an additional folder named “spam” will be created. spam
mail will be sent to this newly created folder, which allows you to preserve mail that may have mistakenly been filtered by SpamAssassin.
- We recommend that you enable this feature.
- This feature also comes with a Clear Spam Box function that will delete the messages in the Spam Box.
- To disable the Spam Box, return to the SpamAssassin page and click Disable Spam Box.
: If you check your mail via a POP3 client, you must access and empty your spam box with the username
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 with the above address format. You cannot access other folders on your account 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.
: Some webmail clients may require you to take additional steps
: If this option is not available, contact your hosting provider to request that this option be enabled. If you want to redirect spam from your email inbox, and this option is not available, you can create a spam email filter
When you click Configure SpamAssassin
, you can add email addresses that should be filtered automatically by typing the address into the blacklist_from box. A whitelist can be created in the same way at the bottom of the page. It is also possible to specify scores that SpamAssassin should use for each particular test.
Set Required Spam Score
SpamAssassin examines every email message for spam characteristics, then assigns it an overall score. Enter the score required for a message to be considered spam.
5.0 is the default setting, and is aggressive. It would be suitable for a single user, but an ISP should set the default to be more lenient (8.0 or 10.0).
Add Addresses to the Blacklist
You can add addresses to the SpamAssasin blacklist to block the receipt of emails from those addresses.
When you add the addresses to the blacklist, use
as a wildcard to represent multiple characters and
to represent a single-character wildcard.
The following examples demonstrate how to properly use wildcards in the blacklist:
firstname.lastname@example.org — Blacklists a single email address.
*@example.com — Blacklists all the addresses at
?email@example.com — For example,
User@example.com would be blacklisted, but
AUser@example.com would not be blacklisted.
If you need to add more than 5 addresses to the blacklist, fill in the first 5 text boxes and click Save
. Additional text boxes will appear.
System Administrators who wish to block the receipt of emails from these addresses on multiple accounts should use the the Exim System Filter File
Set Individual Test Scores
You can precisely tailor SpamAssassin for your server by assigning scores to individual tests. SpamAssassin uses hundreds of tests; please see the SpamAssassin documentation at http://spamassassin.apache.org/tests.html
for more information. You will need to know which version of SpamAssassin is running on your server. To check your version of SpamAssassin, execute the following line of code on your server:
# perl -MMail::SpamAssassin -e 'print $Mail::SpamAssassin::VERSION."\n";'
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.
Add Addresses to the Whitelist
Enter addresses whose email is often blocked, but from whom you wish to receive email.
You may use
as a wildcard for multiple characters, or
as a single-character wildcard.
firstname.lastname@example.org — Whitelists a single email address.
*@example.com — Whitelists all the email addresses at example.com.
?email@example.com — For example,
User@example.com would be added to the whitelist while
AUser@example.com would not be added.
By default, 5 text boxes appear, allowing you to add 5 addresses. To add more than 5 addresses:
- Fill in the first 5 text boxes.
- Click Save.
When you return to the page, more text boxes will appear.
- 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/.
A Note for System Administrators
If you do not have access to a WHM interface, the following information does not specifically pertain to you. If you are experiencing trouble using BoxTrapper and SpamAssassin together, you should contact your web hosting provider for more information about how your server is configured.
BoxTrapper and SpamAssassin will only work together if the following option in WHM's Exim Configuration
interface ( Main >> Service Configuration >> Exim Configuration Editor
) remains disabled:
** Old Style Spam System [?]
DEPRECATED: Use legacy transport based SpamAssassin™ system instead of the new ACL style one (not recommended, slow).