From 538177ee5240286d1edf889c03056fc9a7013c6f Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 14 Nov 2021 19:21:03 +0100 Subject: [PATCH] Removed provider from SOA record --- .../java/eu/faircode/email/EmailProvider.java | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EmailProvider.java b/app/src/main/java/eu/faircode/email/EmailProvider.java index a36389d20d..a6ba66ff03 100644 --- a/app/src/main/java/eu/faircode/email/EmailProvider.java +++ b/app/src/main/java/eu/faircode/email/EmailProvider.java @@ -320,25 +320,16 @@ public class EmailProvider implements Parcelable { Log.w(ex); } - try { - // Primary DNS server - DnsHelper.DnsRecord[] soa = DnsHelper.lookup(context, domain, "soa"); - if (soa.length > 0) - records.add(soa[0]); - } catch (Throwable ex) { - Log.w(ex); - } - for (DnsHelper.DnsRecord record : records) if (!TextUtils.isEmpty(record.name)) { String target = record.name.toLowerCase(Locale.ROOT); - EntityLog.log(context, "MX/SOA target=" + target); + EntityLog.log(context, "MX target=" + target); for (EmailProvider provider : providers) { if (provider.enabled && provider.mx != null) for (String mx : provider.mx) if (target.matches(mx)) { - EntityLog.log(context, "From MX/SOA domain=" + domain); + EntityLog.log(context, "From MX domain=" + domain); candidates.add(provider); break; } @@ -346,7 +337,7 @@ public class EmailProvider implements Parcelable { String mxparent = UriHelper.getParentDomain(context, target); String pdomain = UriHelper.getParentDomain(context, provider.imap.host); if (mxparent.equalsIgnoreCase(pdomain)) { - EntityLog.log(context, "From MX/SOA host=" + provider.imap.host); + EntityLog.log(context, "From MX host=" + provider.imap.host); candidates.add(provider); break; } @@ -959,7 +950,7 @@ public class EmailProvider implements Parcelable { public boolean starttls; // Scores: - // 0 from MX/SOA record + // 0 from MX record // 10 from port scan // +2 trusted host // +1 trusted DNS name