Spamassassin autolearn=no
-
Hello,
i’am using postfix, amavis, spamassassin and clamav.
Amavis triggers spamassassin and clamav.
Every mail which arrives in kopano includes this entry in the mail meader:
autolearn=no autolearn_force=no
Perhaps this is a normal behaviour, but i thought when i use bayes then it should autolearn, or iam false?
To explain spamassassin which mails are spam iam using inotify-spamlearn and kopano-spamd.
This is my /etc/spamassassin/local.cf:
# This is the right place to customize your installation of SpamAssassin. # # See 'perldoc Mail::SpamAssassin::Conf' for details of what can be # tweaked. # # Only a small subset of options are listed below # ########################################################################### # Add *****SPAM***** to the Subject header of spam e-mails # # rewrite_header Subject *****SPAM***** # Save spam messages as a message/rfc822 MIME attachment instead of # modifying the original message (0: off, 2: use text/plain instead) # # report_safe 1 # Set which networks or hosts are considered 'trusted' by your mail # server (i.e. not spammers) # # trusted_networks 212.17.35. # Set file-locking method (flock is not safe over NFS, but is faster) # # lock_method flock # Set the threshold at which a message is considered spam (default: 5.0) # # required_score 5.0 # Use Bayesian classifier (default: 1) # use_bayes 1 # Bayesian classifier auto-learning (default: 1) # bayes_auto_learn 1 # Set headers which may provide inappropriate cues to the Bayesian # classifier # bayes_ignore_header X-Bogosity bayes_ignore_header X-Spam-Flag bayes_ignore_header X-Spam-Status # Whether to decode non- UTF-8 and non-ASCII textual parts and recode # them to UTF-8 before the text is given over to rules processing. # # normalize_charset 1 # Some shortcircuiting, if the plugin is enabled # ifplugin Mail::SpamAssassin::Plugin::Shortcircuit # # default: strongly-whitelisted mails are *really* whitelisted now, if the # shortcircuiting plugin is active, causing early exit to save CPU load. # Uncomment to turn this on # # shortcircuit USER_IN_WHITELIST on # shortcircuit USER_IN_DEF_WHITELIST on # shortcircuit USER_IN_ALL_SPAM_TO on # shortcircuit SUBJECT_IN_WHITELIST on # the opposite; blacklisted mails can also save CPU # # shortcircuit USER_IN_BLACKLIST on # shortcircuit USER_IN_BLACKLIST_TO on # shortcircuit SUBJECT_IN_BLACKLIST on # if you have taken the time to correctly specify your "trusted_networks", # this is another good way to save CPU # # shortcircuit ALL_TRUSTED on # and a well-trained bayes DB can save running rules, too # # shortcircuit BAYES_99 spam # shortcircuit BAYES_00 ham endif # Mail::SpamAssassin::Plugin::Shortcircuit ifplugin Mail::SpamAssassin::Plugin::RelayCountry add_header all Relay-Country _RELAYCOUNTRY_ header RELAYCOUNTRY_BAD X-Relay-Countries =~ /(CN|RU|UA|RO|VN)/ describe RELAYCOUNTRY_BAD Relayed through spammy country at some point score RELAYCOUNTRY_BAD 2.0 header RELAYCOUNTRY_GOOD X-Relay-Countries =~ /^(DE|AT|CH)/ describe RELAYCOUNTRY_GOOD First untrusted GW is DE, AT or CH score RELAYCOUNTRY_GOOD -0.5 endif # Mail::SpamAssassin::Plugin::RelayCountry score RCVD_IN_BL_SPAMCOP_NET 0 5.246 0 5.347 score RCVD_IN_BRBL_LASTEXT 0 5.246 0 5.347 score URIBL_BLACK 0 5.7 0 5.7 score URIBL_WS_SURBL 0 2.659 0 2.608 score URIBL_MW_SURBL 0 2.263 0 2.263 score URIBL_CR_SURBL 0 2.263 0 2.263 score URIBL_GREY 0 2.084 0 1.424 score URIBL_DBL_SPAM 0 4.5 0 4.5 score URIBL_DBL_PHISH 0 4.5 0 4.5 score URIBL_DBL_MALWARE 0 4.5 0 4.5 score URIBL_DBL_BOTNETCC 0 4.5 0 4.5 score URIBL_DBL_ABUSE_SPAM 0 4.0 0 4.0 score URIBL_DBL_ABUSE_PHISH 0 4.5 0 4.5 score URIBL_DBL_ABUSE_MALW 0 4.5 0 4.5 score URIBL_DBL_ABUSE_BOTCC 0 4.5 0 4.5
I gave already more then 500 spam mails to learn to spamassassin.
I think some counts should be higher as zero
sa-learn --dump magic
0.000 0 3 0 non-token data: bayes db version 0.000 0 0 0 non-token data: nspam 0.000 0 0 0 non-token data: nham 0.000 0 0 0 non-token data: ntokens 0.000 0 0 0 non-token data: oldest atime 0.000 0 0 0 non-token data: newest atime 0.000 0 0 0 non-token data: last journal sync atime 0.000 0 0 0 non-token data: last expiry atime 0.000 0 0 0 non-token data: last expire atime delta 0.000 0 0 0 non-token data: last expire reduction count
But the logs from inotify-spamlearn says it has Learned tokens:
INFO Processing [Inotify] /var/lib/kopano/spamd/spam/FC102D47DEDD4AEEABE91BBD90F08D0D.eml: Learned tokens from 1 message(s) (1 message(s) examined) INFO Removing file: /var/lib/kopano/spamd/spam/FC102D47DEDD4AEEABE91BBD90F08D0D.eml INFO Processing [Inotify] /var/lib/kopano/spamd/spam/F507443E09D24102911540197DC2C66B.eml: Learned tokens from 1 message(s) (1 message(s) examined) INFO Removing file: /var/lib/kopano/spamd/spam/F507443E09D24102911540197DC2C66B.eml INFO Processing [Inotify] /var/lib/kopano/spamd/spam/66113D3562C548219755ADCF12DD61EC.eml: Learned tokens from 1 message(s) (1 message(s) examined) INFO Removing file: /var/lib/kopano/spamd/spam/66113D3562C548219755ADCF12DD61EC.eml INFO Processing [Inotify] /var/lib/kopano/spamd/spam/D6E90D3DE8724866A21AE80146022E07.eml: Learned tokens from 1 message(s) (1 message(s) examined) INFO Removing file: /var/lib/kopano/spamd/spam/D6E90D3DE8724866A21AE80146022E07.eml INFO Processing [Inotify] /var/lib/kopano/spamd/spam/1A600DC9E18A40FA8A925837673A65F8.eml: Learned tokens from 1 message(s) (1 message(s) examined) INFO Removing file: /var/lib/kopano/spamd/spam/1A600DC9E18A40FA8A925837673A65F8.eml
-
This problem is solved.
i forgot to set the bayes_auto_learn_threshold values.