diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-15 15:29:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-15 15:29:16 +0000 |
commit | fc406133889dc128f44e351c3198994c2e8d1b8e (patch) | |
tree | cc0f27bd13b999c210d0baa85c4e1b4775136d7b /src/plugins/lua | |
parent | 9e517e2fc15cb56dc48059fa3c80a4fb96e838b6 (diff) | |
parent | a9dd24b1723ab920039b930791ef154a4476f30b (diff) | |
download | rspamd-fc406133889dc128f44e351c3198994c2e8d1b8e.tar.gz rspamd-fc406133889dc128f44e351c3198994c2e8d1b8e.zip |
Merge pull request #1131 from fatalbanana/dns
[Minor] Fix DNS lookup errors
Diffstat (limited to 'src/plugins/lua')
-rw-r--r-- | src/plugins/lua/multimap.lua | 6 | ||||
-rw-r--r-- | src/plugins/lua/once_received.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/rbl.lua | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index 6d33cace8..9783e99cb 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -527,9 +527,9 @@ local function multimap_callback(task, rule) if rt == 'ip' then match_rule(rule, ip) else - local cb = function (_, _, results, err) - if err then - rspamd_logger.errx(task, 'DNS lookup failed: %s', err) + local cb = function (_, to_resolve, results, err) + if err and (err ~= 'requested record is not found' and err ~= 'no records with this name') then + rspamd_logger.errx(task, 'error looking up %s: %s', to_resolve, err) end if results then task:insert_result(rule['symbol'], 1, rule['map']) diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua index 5cce56f62..8c7ed0777 100644 --- a/src/plugins/lua/once_received.lua +++ b/src/plugins/lua/once_received.lua @@ -31,8 +31,8 @@ local function check_quantity_received (task) local recvh = task:get_received_headers() local function recv_dns_cb(_, to_resolve, results, err) - if err then - rspamd_logger.errx(task, 'DNS lookup error: %s', err) + if err and (err ~= 'requested record is not found' and err ~= 'no records with this name') then + rspamd_logger.errx(task, 'error looking up %s: %s', to_resolve, err) end task:inc_dns_req() diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index 3308d0e5c..b1d35afc4 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -62,8 +62,8 @@ end local function rbl_cb (task) local function gen_rbl_callback(rule) return function (_, to_resolve, results, err) - if err then - rspamd_logger.errx(task, 'DNS lookup error: %s', err) + if err and (err ~= 'requested record is not found' and err ~= 'no records with this name') then + rspamd_logger.errx(task, 'error looking up %s: %s', to_resolve, err) end if not results then return end |