From 4a0bb98bef3e80e02d6f995988244266eb8893bf Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 12 Nov 2021 15:59:49 +0000 Subject: [Minor] Add analysis logging --- lualib/lua_scanners/cloudmark.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lualib/lua_scanners') diff --git a/lualib/lua_scanners/cloudmark.lua b/lualib/lua_scanners/cloudmark.lua index 18cacc2d6..bfea884cb 100644 --- a/lualib/lua_scanners/cloudmark.lua +++ b/lualib/lua_scanners/cloudmark.lua @@ -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)) -- cgit v1.2.3