I have had my mailserver running for a few months now, and have tried to use SpamAssassin to minimize Spam. I followed this guide: https://docs.iredmail.org/store.spamass … n.sql.html - Successfully I believe, and I can see that the numbers of records in the bayes_token table is increasing:

But how can I check and verify that new emails are being correctly scanned and that this is actually working?

I have added the spam status to the mail headers, below an email that correctly have been identified as spam - but is this becuase of learnings from the mails marked as spam or due to other factors? - How can I very that SpamAssassin is actually learning, are using the learnings, and maybe even adjust the importans when classifying spam mails.

Re: Veriy SpamAssassin

ZhangHuangbin wrote:

SpamAssassin will start using bayes to judge spams when it got enough training.

That makes sense, but when is "enough". In the log it now says "only 3 spam(s) in bayes DB < 200" - But I have 500 mails in my spam folder, and at least half of them have been manuel moved from the inbox - and by then forced learning.

Re: Veriy SpamAssassin

ZhangHuangbin wrote:

Do you have this line in /etc/mail/spamassassin/local.cf?

Nope ... ... I'm afraid I had missed that one. I have updated the config and restarted amavis.

If I understand this correct, then it will look for tokens / spam at default user, but the learning is done per user I assume, so will this work? - Sorry, but I think I don't fully understand how this work. All help is truly appreciated!

Re: Veriy SpamAssassin

Runberg wrote:

If I understand this correct, then it will look for tokens / spam at default user, but the learning is done per user I assume, so will this work? - Sorry, but I think I don't fully understand how this work. All help is truly appreciated!

As the parameter name says, it "override"s the user name, so it's always "amavis" user.

Re: Veriy SpamAssassin

As the parameter name says, it "override"s the user name, so it's always "amavis" user.

That is what I assumed. I have commented this out again in order to do the learning per user, and not with the default user.

This is another way to call sa-learn to learn spam/clean messages.

I double checked my configuration, and it seems like it has "disappeared". Either I'm looking the wrong place (/etc/dovecot/dovecot.conf) or more likely my custom configuration have been overwritten during and update of Dovecot I'll try to walk through the guide again and see if I can restore a working setup.

Re: Veriy SpamAssassin

Anyone who can help with this issue? How do I verify that mails actually are scanned based upon the learning from mails moved to Junk / Spam by the user? - Preferably the individual user.

As mentioned below I have confirmed that the spam count is increasing in the database for the individual user, but according to the log, I still have less than 200 spam mails, and therefore bayes are not looked at ...

Or am I misunderstanding something here?

Any help would be appreciated!

Thanks

Runberg wrote:

I have now confirmed that when a mail is moved from the inbox to the spam folder, then numbers in the database is in fact going up for the specific user.