diff --git a/feature/autodiscovery/autoconfig/src/main/kotlin/app/k9mail/autodiscovery/autoconfig/MxLookupAutoconfigDiscovery.kt b/feature/autodiscovery/autoconfig/src/main/kotlin/app/k9mail/autodiscovery/autoconfig/MxLookupAutoconfigDiscovery.kt index 55521c6ee1c..71fa8950b3e 100644 --- a/feature/autodiscovery/autoconfig/src/main/kotlin/app/k9mail/autodiscovery/autoconfig/MxLookupAutoconfigDiscovery.kt +++ b/feature/autodiscovery/autoconfig/src/main/kotlin/app/k9mail/autodiscovery/autoconfig/MxLookupAutoconfigDiscovery.kt @@ -11,6 +11,7 @@ import app.k9mail.core.common.net.Domain import com.fsck.k9.logging.Timber import java.io.IOException import okhttp3.OkHttpClient +import org.minidns.dnsname.InvalidDnsNameException class MxLookupAutoconfigDiscovery internal constructor( private val mxResolver: SuspendableMxResolver, @@ -69,6 +70,9 @@ class MxLookupAutoconfigDiscovery internal constructor( } catch (e: IOException) { Timber.d(e, "Failed to get MX record for domain: %s", domain.value) null + } catch (e: InvalidDnsNameException) { + Timber.d(e, "Invalid DNS name for domain: %s", domain.value) + null } }