Browse Source

[Minor] Add analysis logging

tags/3.2
Vsevolod Stakhov 2 years ago
parent
commit
4a0bb98bef
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      lualib/lua_scanners/cloudmark.lua

+ 6
- 1
lualib/lua_scanners/cloudmark.lua View File

@@ -107,7 +107,7 @@ local function cloudmark_config(opts)
log_spamcause = true,
symbol_fail = 'CLOUDMARK_FAIL',
symbol = 'CLOUDMARK_CHECK',
symbol_spam = 'CLOUDMARK_SPAM'
symbol_spam = 'CLOUDMARK_SPAM',
}

cloudmark_conf = lua_util.override_defaults(cloudmark_conf, opts)
@@ -215,6 +215,11 @@ local function parse_cloudmark_reply(task, rule, body)
return
end

if obj.analysis then
-- Report analysis string
rspamd_logger.infox(task, 'cloudmark report string: %s', obj.analysis)
end

local score = tonumber(obj.score) or 0
if score >= rule.score_threshold then
task:insert_result(rule.symbol_spam, 1.0, tostring(score))

Loading…
Cancel
Save