How to Enable/Disable SpamAssassin on a cPanel WHM Server
How to Enable/Disable SpamAssassin on a cPanel WHM Server
Do the below steps to enable/Disable SpamAssassin spam filter for all cPanel accounts on the server.
1. Login to WHM using server root password
2. Search for “Tweak Settings” in WHM search box
3. Click on “Tweak Settings” under “Server Configuration”
Home » Server Configuration » Tweak Settings
4. Click on “Mail” tab in “Tweak Settings”
You can see the option “Enable Apache SpamAssassin spam filter”, select the On/Off radio button
5. Click on “Save” to save the changes you have made in tweak settings.
By default SpamAssassin will be enabled on all cPanel servers. In the below image you can see that I have disabled spamassassin server-wide for all cPanel accounts.
If you disable spamassassin in tweak settings, then there won’t be spamassassin icon available for all cPanel accounts.
You can do the above steps from server backend by editing the Tweak Settings configuration file
1. Log into WHM server via SSH as ‘root’ user
2. Edit tweak settings file using vi editor
vi /var/cpanel/cpanel.config
3. Change the line skipspamassassin=1 to disable spamassassin server-wide
Change the line skipspamassassin=0 to enable spamassassin for all cPanel accounts
4. Run the below command to update “Tweak Settings”
Command : /usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings
How to Enable/Disable spamassassin through cPanel
Spamassassin should be turned ‘On’ in “Tweak Settings” before doing the above steps
1. Log into cpanel using cPanel username and password
2. Click on “Apache SpamAssassin” under “EMAIL”
cPanel >> EMAIL >> Apache SpamAssassin
3. Click on “Enable Apache SpamAssassin” to enable spam filter
Click on “Disable Apache SpamAssassin” to disable spam filter
How to Whitelist / Blacklist an email address in Apache spamassassin
Spamassassin is a tool used on cPanel used to filter unwanted spam emails sent to your email address. You must have cPanel access to allow or block an incoming email using spamassassin spam filter. There is an option in spam assassin to whitelist legitimate email and block the spam emails.
1. Log in to cPanel
URL to access cPanel : https://YourDomain.com:2083
Enter cPanel login details and click on ‘Log in’
YourDomain.com should be replaced with your actual domain name in the above URL.
2. Search for “Apache Spamassassin” in cPanel search bar
3. Click on “Apache SpamAssassin” under “Email”
cPanel >> Email >> Apache SpamAssassin
4. Scroll down to the bottom and click on “Configure Apache SpamAssassin”
5. In the “blacklist_from” field enter the email address you want to blacklist
6. In the “whitelist_from” field enter the incoming email address that you wish to allow.
Whitelist and blacklist addresses are now file-glob-style patterns, so user@domain.com, *@gmail.com, or *.domain.com will all work. Only * and ? is allowed in the “blacklist_from” and “whitelist_from” field.
user@domain.com = This will blacklist/whitelist a single email account.
*@domain1.com = This will blacklist/whitelist all email account under the domain domain1.com
?ser@domain.com = Question mark ? blacklist or whitelist a single character. Example : user@domain.com, cser@domain.com etc
You can adjust the “Required score” in SpamAssassin settings. By default the SpamAssassin score will be 5 and you can change it to a higher or lower value.
If the score is 0, then all the emails will be marked as spam. Do not set 0 score in SpamAssassin settings.
Score below 5 is strict and it might block legitimate emails ( more spam emails will be blocked if score is less than 5 and might accidentally block some legitimate emails).