Browse Source

[Rspamd] Fix bayes config (#6000)

* [Rspamd] Fix bayes config

Add hint about classifier name, and add missing learn_condition

* Update statistic.conf
Dmitriy Alekseev 1 year ago
parent
commit
8753ea2be6
1 changed files with 4 additions and 2 deletions
  1. 4 2
      data/conf/rspamd/local.d/statistic.conf

+ 4 - 2
data/conf/rspamd/local.d/statistic.conf

@@ -1,12 +1,14 @@
 classifier "bayes" {
 classifier "bayes" {
+    # name = "custom";  # 'name' parameter must be set if multiple classifiers are defined
+    learn_condition = 'return require("lua_bayes_learn").can_learn';
+    new_schema = true;
     tokenizer {
     tokenizer {
       name = "osb";
       name = "osb";
     }
     }
     backend = "redis";
     backend = "redis";
     min_tokens = 11;
     min_tokens = 11;
     min_learns = 5;
     min_learns = 5;
-    new_schema = true;
-    expire = 2592000;
+    expire = 7776000;
     statfile {
     statfile {
       symbol = "BAYES_HAM";
       symbol = "BAYES_HAM";
       spam = false;
       spam = false;