[Rspamd-Users] Bayes learning question.

Daniel, Sebastian s.daniel at q-mex.net
Fri Nov 22 09:18:04 UTC 2019


Why outdated? It's seems to work well at my configuration.

And nobody knows, that's outdated, because only 3-4 people knows about a new shematic - in the most cases, the people, who was worked or report on a issue @ github.
Sorry, rspamd's docs and help @ the web is always old and outdated. This isn't helpful for users and the interest in rspamd  disappears very quickly.
I think, if you see my config, you will cry about the "old style". But it's depends on your bad docs...

So, in wich correct format should i use your Sample? I think, if i copied  --->  #  spam_threshold = 6.0; # When to learn spam (score >= threshold)  #  ham_threshold = -0.5; # When to learn ham (score <= threshold)  #  check_balance = true; # Check spam and ham balance  #  min_balance = 0.9; # Keep diff for spam/ham learns for at least this value  #} <-----    i will get a syntax error at the config... 

Thanks


-----Ursprüngliche Nachricht-----
Von: Users <users-bounces at lists.rspamd.com> Im Auftrag von Vsevolod Stakhov
Gesendet: Freitag, 22. November 2019 10:03
An: users at lists.rspamd.com
Betreff: Re: [Rspamd-Users] Bayes learning question.

On 22/11/2019 08:40, Daniel, Sebastian wrote:
> Hello,
> 
> this depends on your Configuration....
> Show us your Bayes Config...  or  as descriped here: https://rspamd.com/doc/configuration/statistic.html :
> 
> 
> From version 1.1, Rspamd supports autolearning for statfiles. Autolearning is applied after all rules are processed (including statistics) if and only if the same symbol has not been inserted. E.g. a message won't be learned as spam if BAYES_SPAM is already in the results of checking.
> 
> There are 3 possibilities to specify autolearning:
> 
> autolearn = true: autolearning is performing as spam if a message has 
> reject action and as ham if a message has negative score autolearn = 
> [-5, 5]: autolearn as ham if score is less -5 and as spam if score is 
> more than 5 autolearn = "return function(task) ... end": use the following Lua function to detect if autolearn is needed (function should return 'ham' if learn as ham is needed and string 'spam' if learn as spam is needed, if no learn is needed then a function can return anything including nil) Redis backend is highly recommended for autolearning purposes since it's the only backend with high concurrency level when multiple writers are properly synchronized.

This is outdated and this usage is highly discouraged. The default configuration specifies the correct ways to do it:

```
learn_condition = 'return require("lua_bayes_learn").can_learn';

 # Autolearn sample
 # autolearn {
 #  spam_threshold = 6.0; # When to learn spam (score >= threshold)  #  ham_threshold = -0.5; # When to learn ham (score <= threshold)  #  check_balance = true; # Check spam and ham balance  #  min_balance = 0.9; # Keep diff for spam/ham learns for at least this value  #} ```

In general, it is enough to set something like:

```
autolearn {}
```

in `local.d/classifier-bayes.conf` to enable the modern way to perform autolearning.

I will update docs at some point (maybe)...
--
Users mailing list
Users at lists.rspamd.com
https://lists.rspamd.com/mailman/listinfo/users


More information about the Users mailing list