public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Rspamd] Remove per_user settings as they were pretty much useless, some minor changes to bayes"
e2ed2eab
data/conf/rspamd/local.d/statistic.conf | 48 +++------------------------------
1 file changed, 4 insertions(+), 44 deletions(-)
Diff
diff --git a/data/conf/rspamd/local.d/statistic.conf b/data/conf/rspamd/local.d/statistic.conf
index 98db7a99..4867f78a 100644
--- a/data/conf/rspamd/local.d/statistic.conf
+++ b/data/conf/rspamd/local.d/statistic.conf
@@ -1,29 +1,13 @@
classifier "bayes" {
tokenizer {
- name = "osb";
+ name = "osb";
}
-
+ autolearn = false;
backend = "redis";
- name = "per_domain_bayes";
min_tokens = 11;
- min_learns = 20;
+ min_learns = 5;
new_schema = true;
- expiry = 50d;
- per_user = <<EOD
-return function(task)
- local rcpt = task:get_recipients(1)
-
-if rcpt then
- one_rcpt = rcpt[1]
- if one_rcpt['domain'] then
- return one_rcpt['domain']
- end
-end
-
-return nil
-end
-EOD
-
+ expire = 2592000;
statfile {
symbol = "BAYES_HAM";
spam = false;
@@ -32,28 +16,4 @@ EOD
symbol = "BAYES_SPAM";
spam = true;
}
- learn_condition =<<EOD
-return function(task, is_spam, is_unlearn)
- local prob = task:get_mempool():get_variable('bayes_prob', 'double')
-
- if prob then
- local in_class = false
- local cl
- if is_spam then
- cl = 'spam'
- in_class = prob >= 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
}