mirror of https://github.com/M66B/FairEmail.git
DMARC viewer improvements
This commit is contained in:
parent
77f75011ca
commit
67527c6513
|
@ -490,7 +490,7 @@
|
||||||
android:description="@string/title_advanced_dmarc_viewer"
|
android:description="@string/title_advanced_dmarc_viewer"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="DMARC"
|
android:label="@string/app_dmarc"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
android:resizeableActivity="true">
|
android:resizeableActivity="true">
|
||||||
|
|
||||||
|
|
|
@ -497,7 +497,7 @@
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="DMARC"
|
android:label="@string/app_dmarc"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
android:resizeableActivity="true">
|
android:resizeableActivity="true">
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,7 @@
|
||||||
android:description="@string/title_advanced_dmarc_viewer"
|
android:description="@string/title_advanced_dmarc_viewer"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="DMARC"
|
android:label="@string/app_dmarc"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
android:resizeableActivity="true">
|
android:resizeableActivity="true">
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,7 @@
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="DMARC"
|
android:label="@string/app_dmarc"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
android:resizeableActivity="true">
|
android:resizeableActivity="true">
|
||||||
|
|
||||||
|
|
|
@ -491,7 +491,7 @@
|
||||||
android:description="@string/title_advanced_dmarc_viewer"
|
android:description="@string/title_advanced_dmarc_viewer"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="DMARC"
|
android:label="@string/app_dmarc"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
android:resizeableActivity="true">
|
android:resizeableActivity="true">
|
||||||
|
|
||||||
|
|
|
@ -300,7 +300,7 @@ public class ActivityDmarc extends ActivityBase {
|
||||||
continue;
|
continue;
|
||||||
if (ConnectionHelper.inSubnet(text, net[0], prefix)) {
|
if (ConnectionHelper.inSubnet(text, net[0], prefix)) {
|
||||||
valid = allow;
|
valid = allow;
|
||||||
because = ip + " in " + p.first;
|
because = (allow ? '+' : '-') + ip + " in " + p.first;
|
||||||
}
|
}
|
||||||
} else if ("a".equals(ip) || ip.startsWith("a:")) {
|
} else if ("a".equals(ip) || ip.startsWith("a:")) {
|
||||||
String domain = (ip.startsWith("a:")
|
String domain = (ip.startsWith("a:")
|
||||||
|
@ -321,13 +321,13 @@ public class ActivityDmarc extends ActivityBase {
|
||||||
if (prefix == null) {
|
if (prefix == null) {
|
||||||
if (text.equals(a.response)) {
|
if (text.equals(a.response)) {
|
||||||
valid = allow;
|
valid = allow;
|
||||||
because = ip + " in " + domain;
|
because = (allow ? '+' : '-') + ip + " in " + domain;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (ConnectionHelper.inSubnet(text, a.response, prefix)) {
|
if (ConnectionHelper.inSubnet(text, a.response, prefix)) {
|
||||||
valid = allow;
|
valid = allow;
|
||||||
because = ip + " in " + domain + "/" + prefix;
|
because = (allow ? '+' : '-') + ip + " in " + domain + "/" + prefix;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -354,13 +354,13 @@ public class ActivityDmarc extends ActivityBase {
|
||||||
if (prefix == null) {
|
if (prefix == null) {
|
||||||
if (text.equals(a.response)) {
|
if (text.equals(a.response)) {
|
||||||
valid = allow;
|
valid = allow;
|
||||||
because = ip + " in " + domain;
|
because = (allow ? '+' : '-') + ip + " in " + domain;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (ConnectionHelper.inSubnet(text, a.response, prefix)) {
|
if (ConnectionHelper.inSubnet(text, a.response, prefix)) {
|
||||||
valid = allow;
|
valid = allow;
|
||||||
because = ip + " in " + domain + "/" + prefix;
|
because = (allow ? '+' : '-') + ip + " in " + domain + "/" + prefix;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -372,7 +372,7 @@ public class ActivityDmarc extends ActivityBase {
|
||||||
}
|
}
|
||||||
} else if ("ptr".equals(ip) || ip.startsWith("ptr:")) {
|
} else if ("ptr".equals(ip) || ip.startsWith("ptr:")) {
|
||||||
valid = false;
|
valid = false;
|
||||||
because = ip + " ptr not supported";
|
because = (allow ? '+' : '-') + ip + " ptr not supported";
|
||||||
}
|
}
|
||||||
if (valid != null)
|
if (valid != null)
|
||||||
break;
|
break;
|
||||||
|
@ -502,13 +502,11 @@ public class ActivityDmarc extends ActivityBase {
|
||||||
spf = lookupSpf(context, lastDomain, extra);
|
spf = lookupSpf(context, lastDomain, extra);
|
||||||
for (Pair<String, DnsHelper.DnsRecord> p : spf) {
|
for (Pair<String, DnsHelper.DnsRecord> p : spf) {
|
||||||
ssb.append(p.first).append(' ')
|
ssb.append(p.first).append(' ')
|
||||||
.append(p.second.response).append("\n");
|
.append(p.second.response).append("\n\n");
|
||||||
if (start == null) {
|
if (start == null)
|
||||||
start = ssb.length();
|
start = ssb.length();
|
||||||
ssb.append("\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ssb.append('\n').append(extra);
|
ssb.append(extra);
|
||||||
if (start != null) {
|
if (start != null) {
|
||||||
ssb.setSpan(new RelativeSizeSpan(HtmlHelper.FONT_SMALL), start, ssb.length(), 0);
|
ssb.setSpan(new RelativeSizeSpan(HtmlHelper.FONT_SMALL), start, ssb.length(), 0);
|
||||||
ssb.append("\n");
|
ssb.append("\n");
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
<string name="app_cake_required">Minimum required storage space: %1$s</string>
|
<string name="app_cake_required">Minimum required storage space: %1$s</string>
|
||||||
<string name="app_updated">Last update: %1$s</string>
|
<string name="app_updated">Last update: %1$s</string>
|
||||||
<string name="app_download">Downloaded from: %1$s</string>
|
<string name="app_download">Downloaded from: %1$s</string>
|
||||||
|
<string name="app_dmarc" translatable="false">DMARC</string>
|
||||||
|
|
||||||
<string name="channel_service">Monitor</string>
|
<string name="channel_service">Monitor</string>
|
||||||
<string name="channel_send">Send</string>
|
<string name="channel_send">Send</string>
|
||||||
|
|
|
@ -490,7 +490,7 @@
|
||||||
android:description="@string/title_advanced_dmarc_viewer"
|
android:description="@string/title_advanced_dmarc_viewer"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="DMARC"
|
android:label="@string/app_dmarc"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
android:resizeableActivity="true">
|
android:resizeableActivity="true">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue