From f4fd91dff440a8bbeb1d2e65af5981fa7da08e57 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Fri, 31 Jan 2014 17:00:24 +0200 Subject: [PATCH] Check for [ip.address]-style HELO and suppress lookups Conflicts: src/plugins/lua/rbl.lua --- src/plugins/lua/rbl.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index 0dcc48e7b..ac3074fbd 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -77,6 +77,14 @@ local function rbl_cb (task) task:inc_dns_req() end + local helo = task:get_helo() + if helo and string.sub(helo,1,1) ~= '[' then + for k,rbl in pairs(rbls) do + if rbl['helo'] then + task:get_resolver():resolve_a(task:get_session(), task:get_mempool(), helo .. '.' .. rbl['rbl'], rbl_dns_cb, k) + end + end + end local sender_dns = task:get_hostname() if sender_dns ~= nil and sender_dns ~= 'unknown' then for k,rbl in pairs(rbls) do -- 2.39.5