Customize SpamAssassin score

DjKytra

Registered
Apr 30, 2015
4
3
3
Italy
cPanel Access Level
Root Administrator
Hello guys,
there is a way for customize spamassassin score?

Example:
score BAYES_00 -2.0
score BAYES_05 0.1
score BAYES_20 0.3
score BAYES_40 0.5
score BAYES_50 1.5
score BAYES_60 2.5
score BAYES_80 4.0
score BAYES_95 10.0
score BAYES_99 15.0
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Could you provide more details on how you tested the custom rules and the method you used to determine it did not work?

Thank you.
 

DjKytra

Registered
Apr 30, 2015
4
3
3
Italy
cPanel Access Level
Root Administrator
No custom rules, just score edit.

I try to send an email from an external address, and the score is not affect.

For example, without a customization SPF_PASS is 0, with a customization I set SPF_PASS -2.0 but if I try to send an email I see always SPF_PASS 0
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Are you using any third-party applications such as MailScanner that could change the default behavior of SpamAssassin?

Thank you.
 

DjKytra

Registered
Apr 30, 2015
4
3
3
Italy
cPanel Access Level
Root Administrator
Ok done!

According with Eric Delorme (cPanel Level II Technical Analist)

Hello,

There is no need to use the old style spamassassin to make the customizations desired. Spamassassin is rather flexible. You just need to use a separate configuration file in /etc/mail/spamassassin/ but with another name of your choosing so it's included and with the extension .cf like /etc/mail/spamassassin/mine.cf

Once these rules are set you would need to restart Spamassassin though.

/scripts/restartsrv spamd


In order to check the configuration before restarting you would do

/usr/local/cpanel/3rdparty/bin/spamassassin --lint

If there are errors you will see something like "warn: config: failed to parse line, skipping, in ". This can be tested so you can see if the icluded file is added pur some random characters in a file with .cf extension in /etc/mail/spamassassin and run "/usr/local/cpanel/3rdparty/bin/spamassassin --lint".

Thank you!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
I am happy to see the issue is now resolved. Thank you for updating us with the outcome.