Skip to content

Commit

Permalink
helo: reduce DNS timeout to avoid crash (#3257)
Browse files Browse the repository at this point in the history
  • Loading branch information
lnedry authored Dec 14, 2023
1 parent 82ec0cf commit 4d15ee7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/helo.checks.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; disable checks or reject for each test if you are worried about strictness

;dns_timeout=30
;dns_timeout=28

[check]
; match_re=true
Expand Down
2 changes: 1 addition & 1 deletion plugins/helo.checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ exports.get_a_records = async function (host) {
err.code = dns.TIMEOUT;
this.logerror(err);
throw err;
}, (this.cfg.main.dns_timeout || 30) * 1000);
}, (this.cfg.main.dns_timeout || 28) * 1000);

// fully qualify, to ignore any search options in /etc/resolv.conf
if (!/\.$/.test(host)) host = `${host}.`;
Expand Down

0 comments on commit 4d15ee7

Please sign in to comment.