]> source.dussan.org Git - rspamd.git/commitdiff
Check for [ip.address]-style HELO and suppress lookups
authorAndrew Lewis <nerf@judo.za.org>
Fri, 31 Jan 2014 15:00:24 +0000 (17:00 +0200)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 1 Feb 2014 15:20:22 +0000 (07:20 -0800)
Conflicts:
src/plugins/lua/rbl.lua

src/plugins/lua/rbl.lua

index 0dcc48e7b5d2d429f3011270e913fbceb914da23..ac3074fbd4bad9f79e507cfd385aa0be66c7f8b2 100644 (file)
@@ -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