Skip to content

Re-design/re-implement parser for AAR header using AR header parser#305

Open
futatuki wants to merge 6 commits into
trusteddomainproject:developfrom
futatuki:develop-fix-aar-parse
Open

Re-design/re-implement parser for AAR header using AR header parser#305
futatuki wants to merge 6 commits into
trusteddomainproject:developfrom
futatuki:develop-fix-aar-parse

Conversation

@futatuki
Copy link
Copy Markdown

Current implementation of the parser for ARC-Authentication-Result (AAR) header is specialized to the intention to aquire IP address from ARC result and has some unresolved issues, including the issue that it would almost fail to aquire it because of the change of specification of ARC.

So I've re-implement it by using, commonize tokenizer/parser for Authentication-Result header, and then adopt it to opendmarc milter for current usage.

futatuki added 6 commits May 13, 2026 10:09
…uthres

* oepndmarc/opendmarc-ar.h
  (ARES_MAXTOKENS): increase value to accept AAR header
* opendmarc/opendmarc-ar.c, openarc/opendmarc-ar.h
  (authres_parse): Renamed from ares_parse, with modification to
   parse AAR header
  (authres_parse): Turn into inline function using authres_parse()
…unction

*opendmarc/opendmarc-ar.c (main): as above
and use it for the buffer size to parse ARCARES/ARES headers.
With this commit, by reusing data structures / functions for the
parser of AR headers, We can parse ARC-AR headers more pricisely now.
- ignore unknown method (to reduce holding results)
- ignore results after result fields are fully filled, but continue parsing
  for syntax check
@futatuki
Copy link
Copy Markdown
Author

I don't have living example message which has AAR header with arc authentication method result with smtp.remote-ip property, because OpenARC does not includes their result of ARC verification in AAR header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant