aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Teplynin <mike@teplynin.com>2024-12-13 20:20:15 +0300
committerMike Teplynin <mike@teplynin.com>2024-12-13 20:20:15 +0300
commit77d6ef226a0388de7872b1aca4230418a2597837 (patch)
tree65a01f3187dda143bfcac872f307c4ea43ce77b6
parentb0cbe7074ad8f6eae254108c4776ff638a09658f (diff)
downloadrspamd-77d6ef226a0388de7872b1aca4230418a2597837.tar.gz
rspamd-77d6ef226a0388de7872b1aca4230418a2597837.zip
Skipping check_received function for ip address if RBL use botch checks, 'from' and 'received'
-rw-r--r--src/plugins/lua/rbl.lua4
1 files 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