]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] external_services - spamassassin - fix result matching 3958/head
authorCarsten Rosenberg <c.rosenberg@heinlein-support.de>
Fri, 15 Jan 2021 14:21:57 +0000 (15:21 +0100)
committerCarsten Rosenberg <c.rosenberg@heinlein-support.de>
Fri, 4 Jun 2021 13:54:20 +0000 (15:54 +0200)
lualib/lua_scanners/spamassassin.lua

index d50b37483d2c8356ee6003e88666df7430eb5a8a..3facdf3410c465c3107723b242510de005801943 100644 (file)
@@ -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")