diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-15 15:56:38 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-15 16:24:15 +0100 |
commit | 01ef5c03a62209a307b9ae355993c78fc909acbc (patch) | |
tree | e1bd21b18722763dce2a476958e7269a74b3bfd5 /src/plugins/lua/clustering.lua | |
parent | 612020039653739f93e64cf5389abbed031bceeb (diff) | |
download | rspamd-01ef5c03a62209a307b9ae355993c78fc909acbc.tar.gz rspamd-01ef5c03a62209a307b9ae355993c78fc909acbc.zip |
[Feature] Use verdict instead of the plain action in plugins
Diffstat (limited to 'src/plugins/lua/clustering.lua')
-rw-r--r-- | src/plugins/lua/clustering.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/lua/clustering.lua b/src/plugins/lua/clustering.lua index d6c78ef79..2711c0658 100644 --- a/src/plugins/lua/clustering.lua +++ b/src/plugins/lua/clustering.lua @@ -186,18 +186,18 @@ local function clusterting_filter_cb(task, rule) end local function clusterting_idempotent_cb(task, rule) - local action = task:get_action() + local verdict = lua_util.get_task_verdict(task) local score - if action == 'no action' then + if verdict == 'ham' then score = rule.ham_mult - elseif action == 'reject' then + elseif verdict == 'spam' then score = rule.spam_mult - elseif action == 'add header' or action == 'rewrite subject' then + elseif verdict == 'junk' then score = rule.junk_mult else - rspamd_logger.debugm(N, task, 'skip rule %s, action=%s', - rule.name, action) + rspamd_logger.debugm(N, task, 'skip rule %s, verdict=%s', + rule.name, verdict) return end |