Skip to content

opendkim: don't add A-R header in sign-only mode when sender unresolvable (issue #130)#345

Merged
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:issue-130-sign-only-ar-header
May 25, 2026
Merged

opendkim: don't add A-R header in sign-only mode when sender unresolvable (issue #130)#345
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:issue-130-sign-only-ar-header

Conversation

@thegushi
Copy link
Copy Markdown
Collaborator

Summary

  • In mlfi_eoh(), when the message sender can't be determined or parsed, opendkim was unconditionally setting mctx_addheader = TRUE and inserting an Authentication-Results: ... dkim=permerror (bad message/signature format) header
  • In sign-only mode (Mode s), no A-R headers should ever be added - that's verification output
  • Fix: guard both sites with (conf->conf_mode & DKIMF_MODE_VERIFIER) != 0 so the BADFORMAT A-R header is only inserted when verification is active

Fixes #130

…able (issue trusteddomainproject#130)

When the message sender can't be determined or parsed, opendkim was
unconditionally setting mctx_addheader/mctx_headeronly and inserting an
Authentication-Results header with dkim=permerror.  In sign-only mode
(Mode s) this is wrong - no A-R headers should be added.

Guard both sites in mlfi_eoh() with a DKIMF_MODE_VERIFIER check so
the BADFORMAT A-R header is only inserted when verification is active.

Fixes trusteddomainproject#130
@thegushi thegushi merged commit d1b5a38 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