BIMI: check DMARC policy

This commit is contained in:
M66B
2021-07-18 13:38:13 +02:00
parent 76ed2d766d
commit 273d7e0dd2
2 changed files with 40 additions and 13 deletions

View File

@@ -3001,4 +3001,20 @@ public class MessageHelper {
return true;
}
static Map<String, String> getKeyValues(String value) {
Map<String, String> values = new HashMap<>();
if (TextUtils.isEmpty(value))
return values;
String[] params = value.split(";");
for (String param : params) {
String[] kv = param.split("=");
if (kv.length != 2)
continue;
values.put(kv[0].trim().toLowerCase(), kv[1].trim());
}
return values;
}
}