mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-19 05:38:31 +00:00
Removed provider from SOA record
This commit is contained in:
parent
a58dda43c2
commit
538177ee52
1 changed files with 4 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue