Unify forensic and aggregate report delivery in opendmarc-reports#424
Merged
thegushi merged 1 commit intoJun 20, 2026
Conversation
ReportCommand can be pointed at "opendmarc-reports --forensic" instead of "sendmail -t" to get features a milter can't easily implement in C (SMTP AUTH, SSL/TLS, VERP). But the two delivery paths had drifted: --forensic only applied the StaleMARC check, missing NoReportsList and the suppressions table, and never applied SMTP AUTH/SSL even though the manpage already claimed those settings applied to "both aggregate and forensic reports." - Add skip_reason() and smtp_connect() helpers shared by both the aggregate loop and --forensic mode, so NoReportsList, StaleMARC, the suppressions table, and SMTP AUTH/SSL/StartTLS apply identically regardless of which path is delivering mail. - Give opendmarc-reports --forensic a distinct exit code (2) when every recipient is suppressed, instead of reusing 0 (sent). The milter (opendmarc.c/opendmarc.h: REPORTCMD_EXIT_SUPPRESSED) now logs that case at LOG_INFO rather than treating it as a ReportCommand failure. - Add --archive-dir to save a copy of every outbound report (the full message as handed to SMTP, not just the gzipped XML or AFRF attachment) for later RFC-compliance review. Applies to both modes; suppressed and --test-mode reports are not archived. - Fix opendmarc.conf.sample, which still described NoReportsList's pre-trusteddomainproject#404 two-way semantics; document the ReportCommand handoff to opendmarc-reports --forensic in both the sample and the manpage. - Document no-reports-list and archive-dir in contrib/opendmarc-reports.conf.sample.
3 tasks
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
Test plan