Introduction
Spam Assassin determines whether or not a message is spam based upon the message's final calculated spam score. The overall score is composed of the result testing the message against various rules that each assign their own sub-score. If you find that there are certain Spam assassin rules that are weighted too heavily, or are not weighted enough you may use the procedure in this guide to change them.
If you're not sure if this would be effective to resolve your issue in the first place, you can use the following guide to determine which rules are being applied to a specific message:
How to Find SpamAssassin Scan Results
Based on what you find with the steps in the above guide, you can see the existing rule scores by searching for them in the various locations of the source rule configurations. The following is a script that accepts a RULE ID and will search for the description and default scores for the rule. You would copy and paste the entire thing into the CLI:
echo;echo "Paste or type a single SpamAssasin RuleID and press enter";read RULEID;echo;echo "Searching configuration files for rule: $RULEID";echo;find /var/lib/spamassassin /etc/mail/spamassassin -name "*.cf" | while read ruleConfigPath;do awk -v RULEIDAWK="$RULEID" '$0~RULEIDAWK && (/^describe/ || /^score/) {print FILENAME"\n"$0"\n";nextfile}' $ruleConfigPath;done | grep --color=never . && : || echo "RuleID: $RULEID not found in any file"
The following is an example output of the script if you were searching for the FREEMAIL_FORGED_REPLYTO rule.
Paste or type a single SpamAssasin RuleID and press enter
FREEMAIL_FORGED_REPLYTO
Searching configuration files for rule: FREEMAIL_FORGED_REPLYTO
/var/lib/spamassassin/3.004004/updates_spamassassin_org/20_freemail.cf
describe FREEMAIL_FORGED_REPLYTO Freemail in Reply-To, but not From
/var/lib/spamassassin/3.004004/updates_spamassassin_org/50_scores.cf
score FREEMAIL_FORGED_REPLYTO 1.199 2.503 1.204 2.095
Once you know which rules are affecting your messages' scores, and what the existing default rule scores are, you can use the following procedure to alter the default scores for all messages server-wide.
Also, keep in mind that each individual cPanel user has the ability to edit these default SpamAssassin scores for just their account with the steps in the following guide:
How to adjust the weight of a SpamAssassin Rule
Procedure
Login to the server via SSH as the root user.
Make a backup of the following file and then open it in a text editor:
/etc/mail/spamassassin/local.cf
Add your custom score configuration. For example, to change the RDNS_NONE rule score to 6 add the following:
SCORE RDNS_NONE 6
Save your changes and then restart spamd:
/scripts/restartsrv_spamd