From: Vsevolod Stakhov Date: Sat, 27 Feb 2016 13:39:14 +0000 (+0000) Subject: [Fix] Fix placement of RDNS checks X-Git-Tag: 1.2.0~156 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2b9068e5f79b444977c007eff37c9749d1e3b3bb;p=rspamd.git [Fix] Fix placement of RDNS checks --- diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua index 0b64bca8c..671ebd98d 100644 --- a/src/plugins/lua/once_received.lua +++ b/src/plugins/lua/once_received.lua @@ -69,23 +69,23 @@ local function check_quantity_received (task) end end + local task_ip = task:get_ip() + + -- Here we don't care about received + if not task:get_hostname() and task_ip then + + task:get_resolver():resolve_ptr({task = task, + name = task_ip:to_string(), + callback = recv_dns_cb + }) + return + end + local recvh = task:get_received_headers() if recvh and #recvh <= 1 then local ret = true local r = recvh[1] - local task_ip = task:get_ip() - - -- Here we don't care about received - if not task:get_hostname() and task_ip then - rspamd_logger.infox(task, 'hui') - task:get_resolver():resolve_ptr({task = task, - name = task_ip:to_string(), - callback = recv_dns_cb - }) - return - end - if not r then return end