]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add analysis logging
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 12 Nov 2021 15:59:49 +0000 (15:59 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 12 Nov 2021 15:59:49 +0000 (15:59 +0000)
lualib/lua_scanners/cloudmark.lua

index 18cacc2d60e0c9abb127386dafa7c9eb2f12c139..bfea884cb234627f58aa0daddc73de2eae4ca40f 100644 (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))