[Rspamd-Users] learn error: all learn conditions denied learning ham in default classifier
Jürgen Echter
j.echter at echter-kuechen-elektro.de
Mon Feb 21 12:53:29 UTC 2022
Am Montag, Februar 21, 2022 13:19 CET, schrieb Tony Blue <tony.blue.mailinglist at gmx.de>:
Has someone an idea for me? Or is my question wrong here?
Am 13.02.2022 um 17:13 schrieb Tony Blue:
> 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"
>
--
Users mailing list
Users at lists.rspamd.com
https://lists.rspamd.com/mailman/listinfo/usersHi,
it only learns this to the bayes filter, if the other criteria are giving a higher score it still is considered spam.
Best would to first look why it is considered spam, you can see if you have the web-interface up or you enable extended headers.
https://rspamd.com/webui/
https://rspamd.com/doc/modules/milter_headers.html#extended_spam_headers
Also it could be your spam/ham score based on the bayes filter is too low, to achieve what you want.
/etc/rspamd/local.d/statistics_group.conf as an example:
symbols = {
"BAYES_SPAM" {
weight = 7;
}
"BAYES_HAM" {
weight = -7;
}
}
Greetings
Juergen
More information about the Users
mailing list