[Rspamd-Users] learn error: all learn conditions denied learning ham in default classifier

Tony Blue tony.blue.mailinglist at gmx.de
Sun Feb 13 16:13:09 UTC 2022


Hallo,

please excuse my bad english - but I am not a native Speaker.

If I try to teach a mail as "ham" via the web interface
(http://my-ip:11334/#scan), I get the following error messages.


...

Feb 13 16:57:43 firstmail rspamd[1161]: <bdbec3>; csession;
rspamd_stat_classifier_is_skipped: learn condition for classifier bayes
returned: already in class ham; probability 100.00%; skip classifier

Feb 13 16:57:43 firstmail rspamd[1161]: <bdbec3>; csession;
rspamd_task_process: learn error: all learn conditions denied learning
ham in default classifier

...

The message "already in class ham; probability 100.00%; skip classifier"
is issued, but the e-mails learned in this way are still classified as spam.

I've been running the configuration (getmail, dovecot, exim, rspamd) for
about 2 years. I used the dokumentation from
https://rspamd.com/downloads.html to install. Ubuntu focal is installed
as the operating system. It worked until recently.

What can I do to make the teach-in work again?

Thank you!


Tony

P. S. This is my /etc/rspamd/statistic.conf

# Statistics setup
# Please don't modify this file as your changes might be overwritten with
# the next update.
#
# You can modify 'local.d/statistics.conf' to add and merge
# parameters defined inside this section
#
# You can modify 'override.d/statistics.conf' to strictly override all
# parameters defined inside this section
#
# If you just need to change the default bayes classifier, you can also use
# 'local.d/classifier-bayes.conf' or 'override.d/classifier-bayes.conf'. But
# never ever use both `statistics.conf` and `classifier-bayes.conf`
locals files
# together!
#
# See
https://rspamd.com/doc/faq.html#what-are-the-locald-and-overrided-directories
# for details
#
# Module documentation: https://rspamd.com/doc/configuration/statistic.html

classifier "bayes" {
   tokenizer {
     name = "osb";
   }
   cache {
   }
   new_schema = true; # Always use new schema
   store_tokens = false; # Redefine if storing of tokens is desired
   signatures = false; # Store learn signatures
   #per_user = true; # Enable per user classifier
   min_tokens = 11;
   backend = "redis";
   min_learns = 200;

   statfile {
     symbol = "BAYES_HAM";
     spam = false;
   }
   statfile {
     symbol = "BAYES_SPAM";
     spam = true;
   }
   learn_condition = 'return require("lua_bayes_learn").can_learn';

   # Autolearn sample
   # autolearn {
   #  spam_threshold = 6.0; # When to learn spam (score >= threshold and
action is reject)
   #  junk_threshold = 4.0; # When to learn spam (score >= threshold and
action is rewrite subject or add header, and has two or more positive
results)
   #  ham_threshold = -0.5; # When to learn ham (score <= threshold and
action is no action, and score is negative or has three or more negative
results)
   #  check_balance = true; # Check spam and ham balance
   #  min_balance = 0.9; # Keep diff for spam/ham learns for at least
this value
   #}

   .include(try=true; priority=1)
"$LOCAL_CONFDIR/local.d/classifier-bayes.conf"
   .include(try=true; priority=10)
"$LOCAL_CONFDIR/override.d/classifier-bayes.conf"
}

.include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/statistic.conf"
.include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/statistic.conf"



More information about the Users mailing list