Added recognizing Rackspace

master
M66B 3 weeks ago
parent 9e3ffeab3f
commit 57efb73f4c

@ -94,6 +94,7 @@ public class EmailProvider implements Parcelable {
public boolean alt;
public List<String> domain;
public List<String> mx;
public List<String> txt;
public int order;
public String type;
public int keepalive;
@ -261,6 +262,10 @@ public class EmailProvider implements Parcelable {
if (mx != null)
provider.mx = Arrays.asList(mx.split(","));
String txt = xml.getAttributeValue(null, "txt");
if (txt != null)
provider.txt = Arrays.asList(txt.split(","));
provider.order = getAttributeIntValue(xml, "order", Integer.MAX_VALUE);
provider.keepalive = getAttributeIntValue(xml, "keepalive", 0);
provider.noop = getAttributeBooleanValue(xml, "noop", false);
@ -489,6 +494,29 @@ public class EmailProvider implements Parcelable {
Log.w(ex);
}
List<DnsHelper.DnsRecord> txt = new ArrayList<>();
try {
intf.onStatus("TXT " + domain);
txt.addAll(Arrays.asList(DnsHelper.lookup(context, domain, "txt")));
} catch (Throwable ex) {
Log.w(ex);
}
for (DnsHelper.DnsRecord record : txt)
if (!TextUtils.isEmpty(record.response)) {
String target = record.response.toLowerCase(Locale.ROOT);
EntityLog.log(context, "TXT target=" + target);
for (EmailProvider provider : providers) {
if (provider.enabled && provider.txt != null)
for (String t : provider.txt)
if (target.matches(t)) {
EntityLog.log(context, "From TXT record=" + domain);
candidates.add(provider);
break;
}
}
}
try {
List<DnsHelper.DnsRecord> records = new ArrayList<>();
try {

@ -2410,9 +2410,10 @@
starttls="false" />
</provider>
<provider
name="Reagan.com"
name="Rackspace"
domain="reagan\\.com"
link="https://www.reagan.com/support-outlook-express">
link="https://www.reagan.com/support-outlook-express"
txt=".*include\:emailsrvr\.com.*">
<imap
host="secure.emailsrvr.com"
port="993"

Loading…
Cancel
Save