Spamassassin Score

We are receiving a huge amount of spam daily (around 200+ messages).

So I tried to change the SpamAssassin score in HestiaCP. I simply uncommented this line and changed its value from 5.0 to 4.0:
# required_score 5.0

to

required_score 4.0

(/etc/spamassassin/local.cf)
But when I Save, this error appears:
Error: ERROR: spamassassin failed to start with new configuration.

What is causing this problem?

How did you edit the local.cf file?

Show the output of these commands:

cat -A /etc/spamassassin/local.cf | grep -Ev '^$|^#'
spamassassin --lint

I edited the local.cf file using the HestiaCP web interface.
(https://myserver:port/edit/server/spamassassin/)
I usually avoid using the command line as much as possible.

Ok, I suppose you are using Ubuntu 24.04 and in that OS, Hestia uses spamassassin as the service name instead of the correct one, that is spamd:

The file you edited should be fine, only doesn’t work the service restart.

To fix the issue execute this command as root:

sudo /usr/local/hestia/bin/v-change-sys-config-value ANTISPAM_SYSTEM spamd

Then you could restart the service from Hestia and editing the local.cf file should work fine too.

Thanks, the fix worked perfectly!

I ran the command:

sudo /usr/local/hestia/bin/v-change-sys-config-value ANTISPAM_SYSTEM spamd

After that, the SpamAssassin service restarted normally, and now I can edit the local.cf file through the HestiaCP panel without any errors.
Changing required_score is working fine now.

Just one more question:
Isn’t this a bug in HestiaCP? Shouldn’t it automatically detect the correct service name on Ubuntu 24.04 instead of using the wrong one by default?
Thank you.

You’re welcome. I’m glad it worked :wink:

Yes, it is. I made a PR 4 months ago to fix it:

I forgot to say that if you change the score in spamassassin you should also change the score used by Exim.

Note: Exim doesn’t use floating numbers so instead of 4.0 you should use 40 but internally it will be 4.

From this:

SPAM_SCORE = 50

To this:

SPAM_SCORE = 40