Skip to content

opendkim: insert A-R and DKIM-Signature headers at index 0 (issue #24)#346

Merged
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:issue-24-insheader-index
May 25, 2026
Merged

opendkim: insert A-R and DKIM-Signature headers at index 0 (issue #24)#346
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:issue-24-insheader-index

Conversation

@thegushi
Copy link
Copy Markdown
Collaborator

Summary

  • RFC 8601 sections 4 and 7.1 explicitly require Authentication-Results to be inserted before the MTA's Received header
  • SpamAssassin and other verifiers use the position of AR headers relative to trusted Received headers to determine trust
  • All dkimf_insheader() calls used index 1 (insert after the first header); changed to 0 (prepend before all headers) across all 7 call sites: Authentication-Results, DKIM-Signature, VBR-Info, and X-OpenDKIM

Credit to @glts (original PR #126) and @fanto666 for the patch.

Fixes #24

…steddomainproject#24)

RFC 8601 sections 4 and 7.1 require Authentication-Results to be
inserted before the MTA's Received header.  SpamAssassin and other
verifiers also rely on this ordering to determine which AR headers
can be trusted.

Change all dkimf_insheader() calls from index 1 to index 0 so that
Authentication-Results, DKIM-Signature, VBR-Info, and X-OpenDKIM
headers are prepended before existing headers rather than inserted
after the first one.

Patch originally by @glts (PR trusteddomainproject#126), credit also to @fanto666.

Fixes trusteddomainproject#24
@thegushi thegushi merged commit f6a44a2 into trusteddomainproject:develop May 25, 2026
1 check passed
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