Repository navigation
Conversation
Draft-09 results stay off the RFC 6376 and DMARC paths, and the signed fixtures keep the CRLF bytes their hashes cover. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Inbound mail can now be checked for DKIM2 (draft-ietf-dkim-dkim2-spec-09) in addition to SPF, RFC 6376 DKIM, and DMARC.
github.com/croessner/dkim2v0.3.3. One verifier is built at startup and reused. The server verifies only; it does not sign.MAIL FROM(""from go-smtp) is sent as<>, and bare addresses are wrapped as<addr>. Local-parts stay case-sensitive.authentication_results.dkim2, next to the existingdkimobject.resultisnonewhen the message has no DKIM2 fields, otherwisepass,fail,temperror, orpermerror. A canceled check istemperrorwith reasonunavailable, so the webhook still gets a value. The signing domain is not included. A passing signature set omits the selector.-enable-dkim2orENABLE_DKIM2.dkim2_results_total(labelsresultandreason, not domain) anddkim2_check_duration_seconds.Messages with no DKIM2 fields return before any DNS lookup. A message that does verify looks up the public key, and, only after every signature proof passes, the draft-09 From-domain policy.
Test plan
go test ./...nonepassagainst a stub key, including a null sender<>permerror/missing_keyMAIL FROMmismatch, local-part case, and an extra recipient reportfail/envelope_mismatchtemperror/unavailableand still returns a resultdkim2.resultisnoneand DMARC is unchangedMade with Cursor