Selaa lähdekoodia

[Minor] Fix DNS lookup errors

tags/1.4.0
Andrew Lewis 7 vuotta sitten
vanhempi
commit
a9dd24b172
3 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 3
    3
      src/plugins/lua/multimap.lua
  2. 2
    2
      src/plugins/lua/once_received.lua
  3. 2
    2
      src/plugins/lua/rbl.lua

+ 3
- 3
src/plugins/lua/multimap.lua Näytä tiedosto

@@ -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'])

+ 2
- 2
src/plugins/lua/once_received.lua Näytä tiedosto

@@ -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()


+ 2
- 2
src/plugins/lua/rbl.lua Näytä tiedosto

@@ -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


Loading…
Peruuta
Tallenna