Browse Source

[Fix]: ASN: dns cb func should also return in case of an error

tags/3.0
Jan-Philipp Benecke 2 years ago
parent
commit
7117a1f315
No account linked to committer's email address
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/plugins/lua/asn.lua

+ 2
- 0
src/plugins/lua/asn.lua View File

@@ -71,6 +71,8 @@ local function asn_check(task)
if dns_err and (dns_err ~= 'requested record is not found' and dns_err ~= 'no records with this name') then
rspamd_logger.errx(task, 'error querying dns "%s" on %s: %s',
req_name, serv, dns_err)
task:insert_result(options['symbol'] .. '_FAIL', 1, string.format('%s:%s', req_name, dns_err))
return
end
if not (results and results[1]) then
rspamd_logger.infox(task, 'cannot query ip %s on %s: no results',

Loading…
Cancel
Save