]> source.dussan.org Git - rspamd.git/commitdiff
[Feature] Set the default limit for classifier
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 19 Apr 2016 14:08:44 +0000 (15:08 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 19 Apr 2016 14:08:44 +0000 (15:08 +0100)
We now disallow statistics to be used unless at least 200 learns has
been performed for the specified classifier

conf/statistic.conf

index 3315fe4b44c026c7a4e1b5a7af7f5a78d96587fc..697f1ccefb73346a973f5256ff9b6861d859c6fe 100644 (file)
@@ -19,8 +19,7 @@
 #  - and -
 # http://rspamd.com/rspamd_statistics/bayes.ham.sqlite
 
-classifier {
-    type = "bayes";
+classifier "bayes" {
     tokenizer {
         name = "osb";
     }
@@ -30,6 +29,8 @@ classifier {
     min_tokens = 11;
     backend = "sqlite3";
     languages_enabled = true;
+    min_learns = 200;
+
     statfile {
         symbol = "BAYES_HAM";
         path = "${DBDIR}/bayes.ham.sqlite";
@@ -40,6 +41,7 @@ classifier {
         path = "${DBDIR}/bayes.spam.sqlite";
         spam = true;
     }
-    .include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/statistic.conf"
-    .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/statistic.conf"
 }
+
+.include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/statistic.conf"
+.include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/statistic.conf"