Native DKIM: align with auth results header

pull/215/head
M66B 7 months ago
parent e5f21d6f1a
commit 9be5d1b385

@ -3516,10 +3516,23 @@ class Core {
boolean aligned = helper.isAligned(context, signers, message.return_path, message.smtp_from, message.from);
if (aligned)
message.dmarc = true;
else if (message.dmarc != null)
else if (message.dmarc != null) {
boolean found = false;
String asigner = helper.getSigner(authentication);
String adomain = UriHelper.getRootDomain(context, asigner);
if (adomain != null)
for (String signer : signers) {
String sdomain = UriHelper.getRootDomain(context, signer);
if (adomain.equalsIgnoreCase(sdomain)) {
found = true;
break;
}
}
if (!found)
message.dmarc = false;
}
}
}
if (message.size == null && message.total != null)
message.size = message.total;
@ -4690,10 +4703,23 @@ class Core {
boolean aligned = helper.isAligned(context, signers, message.return_path, message.smtp_from, message.from);
if (aligned)
message.dmarc = true;
else if (message.dmarc != null)
else if (message.dmarc != null) {
boolean found = false;
String asigner = helper.getSigner(authentication);
String adomain = UriHelper.getRootDomain(context, asigner);
if (adomain != null)
for (String signer : signers) {
String sdomain = UriHelper.getRootDomain(context, signer);
if (adomain.equalsIgnoreCase(sdomain)) {
found = true;
break;
}
}
if (!found)
message.dmarc = false;
}
}
}
// Borrow reply name from sender name
if (message.from != null && message.from.length == 1 &&

Loading…
Cancel
Save