From 78da72c29f56641b06e57fa72d9828325775832b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 10 Feb 2019 20:50:03 +0100 Subject: ... --- ymir.nix | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/ymir.nix b/ymir.nix index 2d5be241..96a3cd30 100644 --- a/ymir.nix +++ b/ymir.nix @@ -1111,6 +1111,61 @@ in rec { ''; "dkim_signing.conf".text = "enabled = false;"; "neural.conf".text = "enabled = false;"; + "classifier-bayes.conf".text = '' + enable = true; + expire = 8640000; + new_schema = true; + backend = "redis"; + autolearn = true; + + per_user = <= 0.95 + else + cl = 'ham' + in_class = prob <= 0.05 + end + + if in_class then + return false,string.format('already in class %s; probability %.2f%%', + cl, math.abs((prob - 0.5) * 200.0)) + end + end + + return true + end + EOD + ''; }; }; -- cgit v1.2.3