|
|
@ -2167,9 +2167,24 @@ public class MessageHelper {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
String[] val = v.split("\\s+");
|
|
|
|
String[] val = v.split("\\s+");
|
|
|
|
if (val.length > 0) {
|
|
|
|
if (val.length > 0) {
|
|
|
|
if ("fail".equals(val[0]))
|
|
|
|
if ("fail".equals(val[0])) {
|
|
|
|
|
|
|
|
if ("dmarc".equals(type)) {
|
|
|
|
|
|
|
|
// dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=example.com
|
|
|
|
|
|
|
|
int s = v.indexOf('(');
|
|
|
|
|
|
|
|
int e = v.indexOf(')');
|
|
|
|
|
|
|
|
if (s > 0 && e > s) {
|
|
|
|
|
|
|
|
Boolean none = null;
|
|
|
|
|
|
|
|
for (String p : v.substring(s + 1, e).split("\\s+")) {
|
|
|
|
|
|
|
|
String[] kv = p.split("=");
|
|
|
|
|
|
|
|
if (kv.length == 2 && "none".equalsIgnoreCase(kv[1]))
|
|
|
|
|
|
|
|
none = (none == null || none) && "none".equalsIgnoreCase(kv[1]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (none != null && none)
|
|
|
|
|
|
|
|
continue; // neutral
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
result = false;
|
|
|
|
result = false;
|
|
|
|
else if ("pass".equals(val[0])) {
|
|
|
|
} else if ("pass".equals(val[0])) {
|
|
|
|
// https://www.rfc-editor.org/rfc/rfc7489#section-3.1.1
|
|
|
|
// https://www.rfc-editor.org/rfc/rfc7489#section-3.1.1
|
|
|
|
if ("dkim".equals(type))
|
|
|
|
if ("dkim".equals(type))
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|