Introduction
Apache SpamAssassin does allow the ability to customize how the server processes spam emails.
Procedure
You will want to create a custom configuration file for the change. You can edit the local.cf, however, we do not recommend editing this file at cPanel. Configuration files can be located in the following directory:
/etc/mail/spamassassin/
You will want to make a custom.cf file. The file name can be anything you wish to use.
touch /etc/mail/spamassassin/custom.cf
Inside this file, you will want to add the options you wish to use. The following websites can provide a bit more in-depth on what rules can be added to the configuration:
Apache's SpamAssassin's WritingRules
Once saved, restart the Spamd service. On startup, the service will detect any *.cf file found in /etc/mail/spamassassin/. You will also want to run the following command before restarting the service to ensure there are no errors:
To check your rule syntax for errors, run the command line version with the – lint option. Look for syntax errors complaints and other messages of the sort in the output:
/usr/local/cpanel/3rdparty/bin/spamassassin --lint
/scripts/restartsrv_spamd