diff options
Diffstat (limited to 'src/plugins/lua/rbl.lua')
-rw-r--r-- | src/plugins/lua/rbl.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index b2ccf8699..8126e9c8f 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -689,12 +689,17 @@ local function gen_rbl_callback(rule) local received_total = #received local check_conditions = gen_check_rcvd_conditions(rule, received_total) + local from_ip = task:get_from_ip() for pos, rh in ipairs(received) do if check_conditions(rh, pos) then - add_dns_request(task, rh.real_ip, false, true, - requests_table, 'received', - whitelist) + if rh.real_ip ~= from_ip 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') + end end end |