1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-07 17:47:14 +00:00

courier: Extend TODO for DNS error handling on Go >= 1.13

In https://github.com/albertito/chasquid/issues/4, ludusrusso comments
that the DNS lookup error handling in the SMTP courier could be improved
by using DNSError.IsNotFound.

That is true, but unfortunately it was only added in Go 1.13, and we are
currently trying to support Go 1.11 since that's what in Debian stable.

So this patch updates the TODO to note this, so that when we can use a
newer Go version, we improve this code.
This commit is contained in:
Alberto Bertogli
2020-03-12 21:46:21 +00:00
parent 150976b905
commit 6641d858ad

View File

@@ -260,7 +260,7 @@ func lookupMXs(tr *trace.Trace, domain string) ([]string, error) {
// Unfortunately, go's API doesn't let us easily distinguish between
// them. For now, if the error is permanent, we assume it's because
// there was no MX and fall back, otherwise we return.
// TODO: Find a better way to do this.
// TODO: Use dnsErr.IsNotFound once we can use Go >= 1.13.
dnsErr, ok := err.(*net.DNSError)
if !ok {
tr.Debugf("MX lookup error: %v", err)