mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 02:37:16 +00:00
DMARC: small improvements
This commit is contained in:
parent
9ba8ff451a
commit
668f24a637
1 changed files with 22 additions and 1 deletions
|
@ -216,7 +216,6 @@ public class ActivityDmarc extends ActivityBase {
|
|||
case "aspf":
|
||||
case "p":
|
||||
case "sp":
|
||||
case "pct":
|
||||
case "fo":
|
||||
if (feedback && policy_published) {
|
||||
eventType = xml.next();
|
||||
|
@ -224,10 +223,32 @@ public class ActivityDmarc extends ActivityBase {
|
|||
String text = xml.getText();
|
||||
if (text == null)
|
||||
text = "<null>";
|
||||
if ("adkim".equals(name) || "aspf".equals(name))
|
||||
if ("r".equals(text))
|
||||
text = "relaxed";
|
||||
else if ("s".equals(text))
|
||||
text = "strict";
|
||||
ssb.append(name).append('=')
|
||||
.append(text).append(' ');
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "pct":
|
||||
if (feedback && policy_published) {
|
||||
eventType = xml.next();
|
||||
if (eventType == XmlPullParser.TEXT) {
|
||||
String text = xml.getText();
|
||||
if (text == null)
|
||||
text = "<null>";
|
||||
Integer pct = Helper.parseInt(text);
|
||||
if (pct == null)
|
||||
ssb.append(name).append('=')
|
||||
.append(text).append(' ');
|
||||
else
|
||||
ssb.append(text).append("% ");
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case "source_ip":
|
||||
case "count":
|
||||
|
|
Loading…
Reference in a new issue