-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenDKIM handles Authentication-Results parsing badly (no CFWS handling), and thus ignores valid auth headers. #186
Comments
It seems that the regular expression(PCRE) above is not enough if we want to parse CFWS as RFC5322 says, because
|
As far as I read opendkim/opendkim-ar.c, it seems it can handle Actually I built opendkim-ar test program from develop branch after
Both of samples could be parsed correctly. As there is no difference in |
@futatuki good catch on the OBS syntax! And thank you for your work to verify. I would be happy to invest some rare round-tuit time to duplicate your effort, and apply it to the failing examples I've seen. |
(NOTE: this is similar to OpenARC issue # 163 )
Various RFC-compliant DKIM and ARC softwares produce headers that OpenDKIM does not understand. I've tracked down the issue to lack of RFC compliance in OpenDKIM header parsing. This issue report provides a few sample headers that OpenDKIM doesn't like, then describes the challenge in some specificity.
SUMMARY OF TWO KEY PARSE ISSUES
SAMPLES CAUSING TROUBLE (ALL are RFC-compliant headers)
Produced by OpenDKIM on my own server. (Problem: the comment is standard CFWS and breaks parsing)
Produced by DKIM on a popular hosting service (not sure what SW they use) (Problem: the AuthServe-ID is dot-atom)
etc.
DISCUSSION OF THE ISSUE
AFAIK (from experience -- see above -- and code examination), OpenDKIM parsing is not RFC-compatible with CFWS. What's that?
Authentication-Results header definition ABNF make many references to RFC 5322 CFWS -- Folding White Space and Comments -- which is essentially folded white space plus any amount of [ \t\n] white space plus optional, nestable, () comments which can contain any text at all other than "(", ")" or "\".
Here are ABNF references in the RFC's:
As a dev, that sounds complex to me. I searched for some help towards a functioning implementation. To get us started, here is a regexp definition for CFWS, extracted from http://www.watersprings.org/pub/id/draft-seantek-mail-regexen-01.html#rfc.section.3.2
NOTE: The equivalent issue is found in OpenARC. Solve one and we can solve them both.
The text was updated successfully, but these errors were encountered: