How to stop Spam emails in the inbox

Arunlal P.R

Oct 31, 2018
cPanel Access Level
Root Administrator
Enabled Apache SpamAssassin and set Spam Threshold Score as 4. Still, a lot of spam emails are receiving in the inbox.

Is there any setting in cPanel to prevent incoming spam?


Well-Known Member
Nov 20, 2014
cPanel Access Level
Root Administrator
Fighting spam is a tough battle, there is no single solution.
There are many options to fighting spam, with spamassasin being only one of them.
However, personally, i believe spamassasin on it's own is in-effective.

You could try enabling SPF and DKIM, which might help.

You could also try 'GreyListing'.
Greylisting effectively stalls the email delivery for a short period of time, it forces the sending server to try again later.
It works on the basis that some spam sending servers do not perform the retry, sort of use fire and forget.
So the spam email will just never be delivered.

Also consider enabling additional custom RBL's.

All these settings are in your exim config.

You could also create custom filters within the Cpanel for the account.
Last edited:


Product Owner II
Staff member
Nov 14, 2017
@keat63 I agree with you for the most part but I will say that used correctly SpamAssassin can be extremely effective, it does take some configuration base don your needs though.

Custom rules are incredibly easy to add in SpamAssassin and can be done based on what you'd like to weigh more heavily in email.

Some advice I'd give for enhancing the experience with SpamAssassin is the following:

  • Enable the rulesets available at WHM>>Service Configuration>>Exim Configuration Manager -> Apache SpamAssassin Options
  • I'd flag as spam at a spam score of 2 instead of 4, then auto delete spam at 4 or 5
  • You can add weights to rules for spam assassin depending on what you're seeing come in at cPanel>>Email>>Spam Filters -> Show Additional Configurations -> Configuration Calculated Spam Scores Settings
  • You can manually add custom rulesets globally in /usr/local/cpanel/etc/mail/spamassassin/.
  • There are also custom plugins that can be added such as those found here: CustomPlugins - SPAMASSASSIN - Apache Software Foundation which you'd need to add in /usr/local/cpanel/etc/mail/spamassassin/