mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-12-11 13:56:27 +08:00
17 lines
490 B
Sieve
17 lines
490 B
Sieve
if eval "!t.SPAM_TRAP && !t.TRUSTED_REPLY" {
|
|
|
|
# Classification parameters
|
|
# min_token_hits: 2
|
|
# min_tokens: 11
|
|
# min_prob_strength: 0.05
|
|
# min_learns: 200
|
|
|
|
let "bayes_result" "bayes_classify('spamdb/token-lookup', body_and_subject, [2, 11, 0.05, 200])";
|
|
if eval "!is_empty(bayes_result)" {
|
|
if eval "bayes_result > 0.7" {
|
|
let "t.BAYES_SPAM" "1";
|
|
} elsif eval "bayes_result < 0.5" {
|
|
let "t.BAYES_HAM" "1";
|
|
}
|
|
}
|
|
}
|