From 6d5db1e04e28e255356ad206adac4948b5092c1b Mon Sep 17 00:00:00 2001 From: "Kako, Chang" <49464540+kakochang@users.noreply.github.com> Date: Thu, 12 Jan 2023 14:12:01 +0800 Subject: [PATCH] [Fix] received: filtering of artificial header --- rules/headers_checks.lua | 2 +- src/plugins/lua/once_received.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/headers_checks.lua b/rules/headers_checks.lua index d88847003..7a02bc2eb 100644 --- a/rules/headers_checks.lua +++ b/rules/headers_checks.lua @@ -42,7 +42,7 @@ local rcvd_cb_id = rspamd_config:register_symbol{ local nreceived = fun.reduce(function(acc, rcvd) return acc + 1 end, 0, fun.filter(function(h) - return not h['artificial'] + return not h['flags']['artificial'] end, received)) for k,v in pairs(cnts) do diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua index 0fe738d63..04e2168c1 100644 --- a/src/plugins/lua/once_received.lua +++ b/src/plugins/lua/once_received.lua @@ -44,7 +44,7 @@ local function check_quantity_received (task) local nreceived = fun.reduce(function(acc, _) return acc + 1 end, 0, fun.filter(function(h) - return not h['artificial'] + return not h['flags']['artificial'] end, recvh)) local function recv_dns_cb(_, to_resolve, results, err) -- 2.39.5