diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-27 13:39:14 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-27 13:39:14 +0000 |
commit | 2b9068e5f79b444977c007eff37c9749d1e3b3bb (patch) | |
tree | e1dbf13719d7169ee1d2c2b3c08247ac0cfe178c | |
parent | bf384868ac5d6054c7c9544d21a6e47c3d3998ac (diff) | |
download | rspamd-2b9068e5f79b444977c007eff37c9749d1e3b3bb.tar.gz rspamd-2b9068e5f79b444977c007eff37c9749d1e3b3bb.zip |
[Fix] Fix placement of RDNS checks
-rw-r--r-- | src/plugins/lua/once_received.lua | 24 |
1 files changed, 12 insertions, 12 deletions
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 |