commit 7e86036: [Minor] external_services - spamassassin - fix result matching
Carsten Rosenberg
c.rosenberg at heinlein-support.de
Thu Nov 4 20:21:04 UTC 2021
Author: Carsten Rosenberg
Date: 2021-01-15 15:21:57 +0100
URL: https://github.com/rspamd/rspamd/commit/7e86036a5c271dcaf69892bab826b9a3c29a987e (refs/pull/3958/head)
[Minor] external_services - spamassassin - fix result matching
---
lualib/lua_scanners/spamassassin.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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")
More information about the Commits
mailing list