Commit 6641d858 authored by Alberto Bertogli's avatar Alberto Bertogli

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.
parent 150976b9
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment