Skip to content

feat: record VERP envelope senders in forensic report archive copies - #435

Merged
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:feat/forensic-archive-verp-preamble
Jun 22, 2026
Merged

feat: record VERP envelope senders in forensic report archive copies#435
thegushi merged 1 commit into
trusteddomainproject:developfrom
thegushi:feat/forensic-archive-verp-preamble

Conversation

@thegushi

Copy link
Copy Markdown
Collaborator

Summary

  • --verp only changes the SMTP envelope (MAIL FROM); it leaves no trace in the message itself, so an archived copy (--archive-dir) of a forensic report gave no way to confirm whether, or how, VERP fired for a given send.
  • Archived forensic-report copies are now prefixed with a few # comment lines recording the envelope sender(s) actually used: the full recipient -> VERP-address mapping when --verp is on, or the plain --report-email address otherwise.
  • Deliberately not styled as RFC822 headers -- archive_report()'s purpose is to capture the message exactly as handed to SMTP, and inventing header lines that were never really part of it would misrepresent that more than a non-standard comment preamble does.
  • The message actually transmitted over SMTP is completely unchanged; only the local archive copy gets the preamble.

Test plan

  • perl -c syntax check on the regenerated opendmarc-reports
  • Standalone dry-run of the preamble-building logic confirms correct per-recipient VERP mapping when --verp is on, and the single static address when it's off

VERP only changes the SMTP envelope (MAIL FROM); it leaves no trace in
the message itself, so an archived copy (--archive-dir) of a forensic
report gave no way to confirm whether, or how, VERP fired for a given
send -- not even by comparing against what the recipient's own server
might stamp as Return-Path, since that's only ever visible to them.

Archived forensic-report copies are now prefixed with a few "#" comment
lines recording the envelope sender(s) actually used: the full recipient
-> VERP-address mapping when --verp is on, or the plain --report-email
address otherwise. This is deliberately not styled as RFC822 headers,
since archive_report()'s purpose is to capture the message exactly as
handed to SMTP, and inventing header lines that were never really part
of it would misrepresent that more than a non-standard comment preamble
does. The message actually transmitted over SMTP is unchanged.
@thegushi
thegushi merged commit db07e8f into trusteddomainproject:develop Jun 22, 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