Skip to content

feat: add --report-body-file to customize aggregate report mail body#437

Merged
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:feat/report-body-file
Jun 27, 2026
Merged

feat: add --report-body-file to customize aggregate report mail body#437
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:feat/report-body-file

Conversation

@thegushi

Copy link
Copy Markdown
Collaborator

Summary

  • Adds --report-body-file=file to opendmarc-reports, replacing the hardcoded plain-text body of outgoing aggregate (RUA) report emails ("This is a DMARC aggregate report for / generated at ") with the contents of a file.
  • Supports %DOMAIN% and %DATE% token substitution in the custom body; the %DATE% value matches the message's own Date: header.
  • The file is read once at startup, not per recipient.
  • Works as a CLI flag or via the existing generic key = value config-file loader in opendmarc-reports.conf (no special-casing needed there).
  • Default behavior (no flag set) is unchanged.
  • Documented in --help usage text and the man page.

Test plan

  • perl -c reports/opendmarc-reports (generated from the .in template) — syntax OK
  • perl -c clean on the other report scripts (no regressions)
  • Standalone test of the %DOMAIN%/%DATE% substitution logic
  • Man page renders correctly via mandoc

Lets operators replace the hardcoded plain-text body of RUA report
emails with the contents of a file, with %DOMAIN%/%DATE% token
substitution. Falls back to the existing boilerplate text when unset,
so default behavior is unchanged. Works from the command line or
opendmarc-reports.conf via the existing generic key=value loader.
@thegushi thegushi merged commit 3968b72 into trusteddomainproject:develop Jun 27, 2026
2 checks 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