fix: standardize X-Mailer, version string, and forensic relay tracing#429
Merged
thegushi merged 2 commits intoJun 21, 2026
Merged
Conversation
opendmarc-reports already labels aggregate reports with X-Mailer: opendmarc-reports v<version>. The milter's own AFRF failure-report path used User-Agent instead, so the two report types disagreed on which header identifies the generating software. Standardize both on X-Mailer.
opendmarc-reports' $version used the plain release version with no git-describe logic, while the milter's DMARCF_VERSION already includes a dirty-build hash suffix; identical dev builds reported different version strings depending on which program authored a report. configure.ac now AC_SUBST's DMARCF_VERSION for use in opendmarc-reports.in. Also: --forensic mode relays the milter-composed message via Net::SMTP without ever picking up a Received: header, unlike the direct sendmail -t path which gets one for free from the local MTA. Prepend a single Received: line identifying the relay hop, added before archiving so --archive-dir captures what was actually sent.
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
User-Agent: %s/%s;opendmarc-reportsalready usedX-Mailer: opendmarc-reports v<version>for aggregate reports. Both now useX-Mailer, the established email convention for identifying generating software.opendmarc-reports'$versionused the plain release version with no git-describe logic, while the milter'sDMARCF_VERSIONalready runsgit describe --tags --dirtyat configure time. Identical dev builds reported different version strings depending on which program authored the report.configure.acnowAC_SUBSTsDMARCF_VERSIONfor use inopendmarc-reports.in.opendmarc-reports --forensicrelays the milter-composed message viaNet::SMTPdirectly to the configured server, completely untouched -- unlike the directsendmail -tpath, which picks up a normalReceived:header for free from the local MTA. There was previously no way to tell, from the message itself, whether a forensic report went out via the milter directly or was relayed throughopendmarc-reports. A singleReceived: by <host> (opendmarc-reports v<version>) via forensic relay; <date>line is now prepended before sending, added before the message is archived via--archive-dirso the archived copy matches what was actually sent, and applied identically regardless of--verp(VERP only rewrites the SMTP envelope sender per recipient; it never touches message content, so this doesn't interact with it).Test plan
make+make check: 0 warnings, 0 errors, all 11 test programs passbuild-config.h'sDMARCF_VERSIONand the generatedreports/opendmarc-reports's$versionnow resolve to the identical git-describe string on a dirty dev buildperl -c reports/opendmarc-reports: syntax OKReceived:line renders correctly ahead of a sample forensic message