From 77d6ef226a0388de7872b1aca4230418a2597837 Mon Sep 17 00:00:00 2001 From: Mike Teplynin Date: Fri, 13 Dec 2024 20:20:15 +0300 Subject: Skipping check_received function for ip address if RBL use botch checks, 'from' and 'received' --- src/plugins/lua/rbl.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index 8126e9c8f..a5c8346c8 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -693,12 +693,12 @@ local function gen_rbl_callback(rule) for pos, rh in ipairs(received) do if check_conditions(rh, pos) then - if rh.real_ip ~= from_ip then + if rh.real_ip ~= from_ip or (rh.real_ip == from_ip and not rule.from) then add_dns_request(task, rh.real_ip, false, true, requests_table, 'received', whitelist) else - lua_util.debugm(N, task, 'Received IP same as From IP, skipping extra check') + lua_util.debugm(N, task, 'rbl %s; skip check_received for %s: Received IP same as From IP and will be checked only in check_from function', rule.symbol, rh.real_ip) end end end -- cgit v1.2.3