aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_scanners
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-11-04 20:18:07 +0000
committerGitHub <noreply@github.com>2021-11-04 20:18:07 +0000
commitf013732a5102e3aebb37e5163c427a8e72657807 (patch)
tree708cdf7deafb3ae27e91141dea9c7ad9109a1655 /lualib/lua_scanners
parent28b6b571cf68b4fa6c40ae5ef44fcae0637b29a7 (diff)
parent7e86036a5c271dcaf69892bab826b9a3c29a987e (diff)
downloadrspamd-f013732a5102e3aebb37e5163c427a8e72657807.tar.gz
rspamd-f013732a5102e3aebb37e5163c427a8e72657807.zip
Merge pull request #3958 from HeinleinSupport/lua_scanners/spamassassin
[Minor] external_services - spamassassin - fix result matching
Diffstat (limited to 'lualib/lua_scanners')
-rw-r--r--lualib/lua_scanners/spamassassin.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/lua_scanners/spamassassin.lua b/lualib/lua_scanners/spamassassin.lua
index d50b37483..3facdf341 100644
--- a/lualib/lua_scanners/spamassassin.lua
+++ b/lualib/lua_scanners/spamassassin.lua
@@ -162,7 +162,7 @@ local function spamassassin_check(task, content, digest, rule)
local spam_score
for s in header:gmatch("[^\r\n]+") do
if string.find(s, 'X%-Spam%-Status: %S+, score') then
- local pattern_symbols = "X%-Spam%-Status: %S+, score%=(%d+%.%d+) .* tests=(.*,)( +%S+).*"
+ local pattern_symbols = "X%-Spam%-Status: %S+, score%=(%d+%.%d+) .* tests=(.*,)(%s*%S+).*"
spam_score = string.gsub(s, pattern_symbols, "%1")
lua_util.debugm(rule.N, task, '%s: spamd Spam line: %s', rule.log_prefix, spam_score)
symbols = string.gsub(s, pattern_symbols, "%2%3")