|
|
@ -3504,22 +3504,10 @@ class Core {
|
|
|
|
|
|
|
|
|
|
|
|
if (native_dkim && !BuildConfig.PLAY_STORE_RELEASE) {
|
|
|
|
if (native_dkim && !BuildConfig.PLAY_STORE_RELEASE) {
|
|
|
|
List<String> signers = helper.verifyDKIM(context);
|
|
|
|
List<String> signers = helper.verifyDKIM(context);
|
|
|
|
message.signedby = (signers.size() == 0 ? null : TextUtils.join(",", signers));
|
|
|
|
message.signedby = (signers.isEmpty() ? null : TextUtils.join(",", signers));
|
|
|
|
if (Boolean.TRUE.equals(message.dkim)) {
|
|
|
|
message.dkim = !signers.isEmpty();
|
|
|
|
if (signers.size() == 0)
|
|
|
|
message.dmarc = Boolean.TRUE.equals(message.dmarc) ||
|
|
|
|
message.dkim = false;
|
|
|
|
helper.isAligned(context, signers, message.return_path, message.from);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (message.from != null)
|
|
|
|
|
|
|
|
for (Address from : message.from) {
|
|
|
|
|
|
|
|
String domain = UriHelper.getEmailDomain(((InternetAddress) from).getAddress());
|
|
|
|
|
|
|
|
if (domain != null && signers.contains(domain)) {
|
|
|
|
|
|
|
|
message.dkim = true;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!Boolean.TRUE.equals(message.dkim))
|
|
|
|
|
|
|
|
message.dmarc = message.dkim;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (message.size == null && message.total != null)
|
|
|
|
if (message.size == null && message.total != null)
|
|
|
@ -4668,22 +4656,10 @@ class Core {
|
|
|
|
|
|
|
|
|
|
|
|
if (native_dkim && !BuildConfig.PLAY_STORE_RELEASE) {
|
|
|
|
if (native_dkim && !BuildConfig.PLAY_STORE_RELEASE) {
|
|
|
|
List<String> signers = helper.verifyDKIM(context);
|
|
|
|
List<String> signers = helper.verifyDKIM(context);
|
|
|
|
message.signedby = (signers.size() == 0 ? null : TextUtils.join(",", signers));
|
|
|
|
message.signedby = (signers.isEmpty() ? null : TextUtils.join(",", signers));
|
|
|
|
if (Boolean.TRUE.equals(message.dkim)) {
|
|
|
|
message.dkim = !signers.isEmpty();
|
|
|
|
if (signers.size() == 0)
|
|
|
|
message.dmarc = Boolean.TRUE.equals(message.dmarc) ||
|
|
|
|
message.dkim = false;
|
|
|
|
helper.isAligned(context, signers, message.return_path, message.from);
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (message.from != null)
|
|
|
|
|
|
|
|
for (Address from : message.from) {
|
|
|
|
|
|
|
|
String domain = UriHelper.getEmailDomain(((InternetAddress) from).getAddress());
|
|
|
|
|
|
|
|
if (domain != null && signers.contains(domain)) {
|
|
|
|
|
|
|
|
message.dkim = true;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!Boolean.TRUE.equals(message.dkim))
|
|
|
|
|
|
|
|
message.dmarc = message.dkim;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Borrow reply name from sender name
|
|
|
|
// Borrow reply name from sender name
|
|
|
|