Commit 06136ac7 authored by Alberto Bertogli's avatar Alberto Bertogli

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

In, ludusrusso comments
that the DNS lookup error handling could be improved by using

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
Pipeline #125866167 passed with stages
in 8 minutes and 40 seconds
......@@ -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