From 8753ea2be61d886de220b7ceff77d98c179dc22c Mon Sep 17 00:00:00 2001 From: Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com> Date: Mon, 12 Aug 2024 10:05:08 +0200 Subject: [PATCH] [Rspamd] Fix bayes config (#6000) * [Rspamd] Fix bayes config Add hint about classifier name, and add missing learn_condition * Update statistic.conf --- data/conf/rspamd/local.d/statistic.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/conf/rspamd/local.d/statistic.conf b/data/conf/rspamd/local.d/statistic.conf index 1ca3e0822b..baa3f1c20d 100644 --- a/data/conf/rspamd/local.d/statistic.conf +++ b/data/conf/rspamd/local.d/statistic.conf @@ -1,12 +1,14 @@ 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 { name = "osb"; } backend = "redis"; min_tokens = 11; min_learns = 5; - new_schema = true; - expire = 2592000; + expire = 7776000; statfile { symbol = "BAYES_HAM"; spam = false;