mirror of https://github.com/M66B/FairEmail.git
DMARC: added support for a records
This commit is contained in:
parent
f5503e86d2
commit
f6e80d917d
|
@ -296,8 +296,24 @@ public class ActivityDmarc extends ActivityBase {
|
|||
because = ip + " in " + p.first;
|
||||
break;
|
||||
}
|
||||
} else if ("mx".equals(ip))
|
||||
} else if ("a".equals(ip))
|
||||
try {
|
||||
// TODO: <domain>/<prefix-length>
|
||||
DnsHelper.DnsRecord[] as =
|
||||
DnsHelper.lookup(context, p.first, "a");
|
||||
for (DnsHelper.DnsRecord a : as)
|
||||
if (text.equals(a.response)) {
|
||||
valid = true;
|
||||
because = ip + " in " + p.first;
|
||||
break;
|
||||
}
|
||||
if (valid)
|
||||
break;
|
||||
} catch (UnknownHostException ignored) {
|
||||
}
|
||||
else if ("mx".equals(ip))
|
||||
try {
|
||||
// TODO: <domain>/<prefix-length>
|
||||
DnsHelper.DnsRecord[] mxs =
|
||||
DnsHelper.lookup(context, p.first, "mx");
|
||||
for (DnsHelper.DnsRecord mx : mxs) {
|
||||
|
|
Loading…
Reference in New Issue