From: Vsevolod Stakhov Date: Fri, 27 Dec 2013 13:54:00 +0000 (+0000) Subject: Several fixes to hfilter module. X-Git-Tag: 0.6.6~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c1866666fc1adf5bfb57f21eed7f1b89ffec79e;p=thirdparty%2Frspamd.git Several fixes to hfilter module. --- diff --git a/conf/lua/hfilter.lua b/conf/lua/hfilter.lua index 8fb8a1e749..b680611437 100644 --- a/conf/lua/hfilter.lua +++ b/conf/lua/hfilter.lua @@ -192,7 +192,7 @@ local function hfilter(task) -- Check's HELO local checks_hello_found = false - if helo then + if helo then -- Regexp check HELO for regexp,weight in pairs(checks_hello) do if check_regexp(helo_lower, regexp) then @@ -212,7 +212,9 @@ local function hfilter(task) end --FQDN check HELO - check_host(task, helo, 'HELO', ip, hostname) + if ip then + check_host(task, helo, 'HELO', ip, hostname) + end end -- @@ -239,7 +241,7 @@ local function hfilter(task) end else task:insert_result('HFILTER_HOSTNAME_NOPTR', 1.00) - if not checks_hello_found then + if ip and not checks_hello_found then task:get_resolver():resolve_ptr(task:get_session(), task:get_mempool(), ip, hfilter_hostname_ptr) end end