From: Andrew Lewis Date: Fri, 31 Jan 2014 15:00:24 +0000 (+0200) Subject: Check for [ip.address]-style HELO and suppress lookups X-Git-Tag: 0.6.8~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f4fd91dff440a8bbeb1d2e65af5981fa7da08e57;p=rspamd.git Check for [ip.address]-style HELO and suppress lookups Conflicts: src/plugins/lua/rbl.lua --- 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