To answer my own questions:

It seems that by default SpamAssasin requires a minimum of 200 SPAM and 200 HAM messages in Bayes training database before it starts using Bayes.

This can be changed via SpamAssasins's local.cf by setting:

bayes_min_ham_num 50
bayes_min_spam_num 50



Also, I was able to copy Bayes databases from the old server to the new one, but that revealed another issue with Bayes that was present on the old server already.  Databases were extremely 'imbalanced' - there were millions of 'HAM' messages in the database and 'only' several thousand of 'SPAM' messages - which is quite bad, as most tokens have been seen in HAM messages much more often than in SPAM (or at least that's how I understand the problem).

The cause for that was that I had Bayes auto learning enabled while using Amavis as a centralized filter for all users and multiple domains.

So for now I turned auto learning off - again in local.cf by setting:

bayes_auto_learn 0


I removed old Bayes databases to start over and am now training both HAM and SPAM manually...


   Regards,

    Danilo





On 09.10.25 09:46, Danilo Godec wrote:

Hello,

I recently upgraded my central Amavis server from CentOS 7 to Rocky Linux 9, which brought a few version changes in the relevant packages:

  * amavis 2.12.3 -> 2.13.1
  * spamassassin 3.4.0 -> 3.4.6
  * rpsamd 3.8.4 -> 3.13.2
  * dspam is no longer available on Rocky Linux (was 3.10.2 on CentOS 7)
  * clamav 0.103.11 -> 1.4.3


Things mostly work, but I noticed that the new server never lists 'BAYES' in the tests list.

tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, 
HTML_MESSAGE=0.001, HTML_MIME_NO_HTML_TAG=0.635, MIME_HTML_ONLY=0.1, 
RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 
RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, 
R_UNDISC_RCPT=3, R_DKIM_REJECT=0, DKIM_TRACE=0, MIME_HTML_ONLY=0.2, 
ARC_ALLOW=-1, RCVD_TLS_LAST=0, ASN=0, FORGED_RECIPIENTS=2, 
DMARC_POLICY_SOFTFAIL=0.1, FORGED_SENDER=0.3, DKIM_MIXED=0, 
RWL_MAILSPIKE_POSSIBLE=0, TO_DN_ALL=0, R_SPF_ALLOW=-0.2, FROM_HAS_DN=0, 
MIME_TRACE=0, RCVD_COUNT_FIVE=0, MISSING_XM_UA=0, TAGGED_FROM=0, 
RCPT_COUNT_ONE=0, MID_RHS_NOT_FQDN=0.5, FROM_NEQ_ENVFROM=0, R_DKIM_ALLOW=-0.2]


I only trained the new server for a couple of days now, could it be that it just didn't gather enough training data yet?


   Best regards,

    Danilo












Reply via email to