Spam Assasin not working?

dorucrisan

Verified User
Joined
Oct 23, 2021
Messages
140
Location
Bucharest / Romania
I just installed and activated Spam Assasin and it is not working, does not do anything. I made the basic settings but no spam is filtered, actually it doesn't do anything. Any help please?
Thanks in advance. If it matters, I run Almalinux8+DA, everything is updated and fully working otherwise.
 
It needs to be enabled for the User. Under Email Manager -> SpamAssassin Setup. Can you confirm that was done?
 
Interesting.

When you look at an email that is spam, look into the headers of the email (view the email source). Does it mention X-Spam at all?

It's really hard to say without seeing logs.
 
It only writes the headers if the email matches or exceeds the required_score in user_prefs. That's the "Global threshold" on the config page. So when you say it isn't working it could simply be that the spam you are seeing scores lower than your global threshold and therefore passes the filter, and no spam test headers are written. To test this, try setting your score really low like a 1, and set it to send spam to your inbox. Then start looking at headers, but know that many emails will still score lower than 1 as well.

You can also check for spamd in the dovecot log, maillog or mail.log, and you should be able to see logs of it running.

The key here is to make sure we're not confusing "SpamAssassin isn't very good by most user's standards, thanks to Gmail" with "it's not working."
 
It only writes the headers if the email matches or exceeds the required_score in user_prefs. That's the "Global threshold" on the config page. So when you say it isn't working it could simply be that the spam you are seeing scores lower than your global threshold and therefore passes the filter, and no spam test headers are written. To test this, try setting your score really low like a 1, and set it to send spam to your inbox. Then start looking at headers, but know that many emails will still score lower than 1 as well.

You can also check for spamd in the dovecot log, maillog or mail.log, and you should be able to see logs of it running.

The key here is to make sure we're not confusing "SpamAssassin isn't very good by most user's standards, thanks to Gmail" with "it's not working."
Thank you, did that already, it is not working at all regardless.

1722600313303.png
 
A threshold of 1 is way too low. It will delete (because you don't flag it as spam and/or have it put into the spamfolder) a lot of valid mails before you even seen them.
There is a good reason Spamassassin uses 5 as the lowest value. You could do a bit lower, maybe 3, but I would not recommend to use 1 as threshold for the reason mentioned.
 
A threshold of 1 is way too low. It will delete (because you don't flag it as spam and/or have it put into the spamfolder) a lot of valid mails before you even seen them.
There is a good reason Spamassassin uses 5 as the lowest value. You could do a bit lower, maybe 3, but I would not recommend to use 1 as threshold for the reason mentioned.
Thanks, set to 3, not block, still not working 1722604416293.png
 
Did you check the /var/log/maillog already for spamd entry's as suggested?

Did you check if spamassassin is indeed running via SSH just to be sure?
Code:
ps faux | grep spamd
root     3283005  0.0  0.0   6408  2176 pts/0    S+   15:20   0:00              \_ grep --color=auto spamd
root      250821  0.0  0.1 131336 117080 ?       Ss   03:16   0:04 spamd
root      250982  0.1  0.2 157864 142188 ?       S    03:16   1:03  \_ spamd child
root      250983  0.0  0.1 142476 125964 ?       S    03:16   0:02  \_ spamd child
 
Did you check the /var/log/maillog already for spamd entry's as suggested?

Did you check if spamassassin is indeed running via SSH just to be sure?
Code:
ps faux | grep spamd
root     3283005  0.0  0.0   6408  2176 pts/0    S+   15:20   0:00              \_ grep --color=auto spamd
root      250821  0.0  0.1 131336 117080 ?       Ss   03:16   0:04 spamd
root      250982  0.1  0.2 157864 142188 ?       S    03:16   1:03  \_ spamd child
root      250983  0.0  0.1 142476 125964 ?       S    03:16   0:02  \_ spamd child
Thanks, it is running https - 1722605092938.png
log as below:
1722605235039.png
 
You could do a:
cat /var/log/maillog | grep spamd

Also check for the existance of a /home/user/.spamassassin directory (where "user" is the correct accountname), containing a user_prefs file.
 
You need to be root at the terminal for this.
Yes I can be root at terminal. I have full control, but I am a medium skilled user not a server admin. I am not skilled enough for fixing mistakes others have done. If you tell me what to do I can do. Bottom line, this is something it should work according to basic settings. It just does not. I activated Spam Assasin while using CPanel and was working as it should. On DA it does not work. This is the problem, not how skilled I am.
 
Yes I can be root at terminal. I have full control, but I am a medium skilled user not an server admin. If you tell me what to do I can do.
Run this via terminal without quotes:

"grep spamd /var/log/maillog"

If it says file not found, run:

"grep spamd /var/log/mail.log"

If it returns a bunch of lines and they're not errors, SpamAssassin is working. If it returns nothing, then we know it really isn't. It's just too plausible for it to be running but you not notice because default SpamAssassin sucks.
 
Bottom line, this is something it should work according to basic settings. It just does not. I activated Spam Assasin while using CPanel and was working as it should. On DA it does not work. This is the problem, not how skilled I am.

It's not broken on DA. I've got a whole fleet running it. If you can't get it working it is user error plain and simple.
 
This means it's working and we're going back to what I thought it was originally. It's not working as well as you want it to. That's pretty much everyone's story with a default SpamAssassin installation. It doesn't catch much spam these days.
Is does not catch anything. Is there any alternative to SA?

second line displays that:
1722670169869.png

there is a maillog file there not mail.log if that matters

If I run with maillog instead of mail.log I get this:

1722670391215.png
 
Back
Top