Arsnael commented on code in PR #2446:
URL: https://github.com/apache/james-project/pull/2446#discussion_r1796751225
##########
server/protocols/protocols-smtp-dkim/src/main/java/org/apache/james/smtpserver/DKIMHook.java:
##########
@@ -165,7 +205,9 @@ public Config(boolean forceCRLF, boolean signatureRequired,
Optional<Domain> onl
DKIMCheckNeeded dkimCheckNeeded() {
return onlyForSenderDomain
- .map(DKIMCheckNeeded::onlyForSenderDomain)
+ .map(domain -> DKIMCheckNeeded.or(
+ DKIMCheckNeeded.onlyForSenderDomain(domain),
+ DKIMCheckNeeded.onlyForHeaderFromDomain(domain)))
Review Comment:
Complexifies a bit the code but ok I think.
However I ain't sure how to test it in DKIMHookIntegrationTest. Would need a
different smtpserver.xml file? Thought maybe doing like in
CertificateReloadTest with the temporary server config reload... but makes the
test structure more complex, maybe there is a better way? But maybe not. Wasn't
sure ! But I might go with it later
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]