Open mars90226 opened 5 years ago
You're mostly right. This should still be an error when "l=" wasn't used in the signature.
Ah, yes. When the whole body is not actually ended with CRLF and there isn't l=
in signature, OpenDKIM should throw syntax error. Otherwise, OpenDKIM should not care about CRLF at the end of body.
OpenDKIM will only receive message body with length specified in DKIM signature (
l=
), and reply SMFIS_SKIP to MTA. Thus, the body does not have to be ended with CRLF and should not triggerCRLF at end of body missing
if CRLF is not exist.According to the section 3.7 of RFC6376,
In addition to that, the "simple" and "relaxed" body canonicalization algorithm both suggest that if body is not empty and have no trailing CRLF, a CRLF is added. So, OpenDKIM should just append a CRLF to the body if body doesn't end with CRLF.
I suggest that this if-else block should be replaced by the if block.