]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
output rep if present
authorFrancois Lesueur <flesueur@alwaysdata.com>
Thu, 4 Sep 2025 08:35:03 +0000 (10:35 +0200)
committerFrancois Lesueur <flesueur@alwaysdata.com>
Thu, 4 Sep 2025 08:35:03 +0000 (10:35 +0200)
lualib/lua_scanners/dcc.lua

index 84b82cccd0235cd53dfc20f95cd36a39129abb00..0fd7eacb1193978f898b40a967a42cd9d81ed91f 100644 (file)
@@ -188,9 +188,11 @@ local function dcc_check(task, content, digest, rule)
             -- Accept decision, only expected decision since query is with grey-off no-reject
             local opts = {}
             local score = 0.0
+            local rep_orig = nil
             if info then
               info = info:lower()
               local rep = info:match('rep=(%d+)')
+              rep_orig = rep
 
               -- Adjust reputation if available
               if rep then
@@ -239,6 +241,9 @@ local function dcc_check(task, content, digest, rule)
             end
 
             if #opts > 0 and score > 0 then
+              if rep_orig then
+                opts[#opts + 1] = string.format('%s=%s', "rep", rep_orig .. "%")
+              end
               task:insert_result(rule.symbol_bulk,
                   score,
                   opts)