Skip to content

feat: add IgnoreMailTo option to suppress history recording by recipient#393

Merged
thegushi merged 8 commits into
trusteddomainproject:developfrom
thegushi:feat/ignore-mail-to
May 30, 2026
Merged

feat: add IgnoreMailTo option to suppress history recording by recipient#393
thegushi merged 8 commits into
trusteddomainproject:developfrom
thegushi:feat/ignore-mail-to

Conversation

@thegushi
Copy link
Copy Markdown
Collaborator

Closes #319. Original patch by Dirk Stöcker (openSUSE ticket208 / PR #381, which was closed in favour of this cleaner implementation).

What it does

Adds IgnoreMailTo, a comma-separated config option analogous to the existing IgnoreMailFrom. Messages whose To: header contains any listed address are not written to the history file and therefore generate no aggregate reports.

Primary use case — loop prevention: if your domain's rua= or ruf= address also receives mail through the filter, DMARC report messages sent to it will be processed as normal traffic and may trigger further reports. Adding the address to IgnoreMailTo breaks the loop at the earliest point.

Example

IgnoreMailTo  dmarc-reports@example.com

Implementation

Follows the exact same pattern as IgnoreMailFrom / conf_ignoredomains: comma-separated list parsed at config load time into conf_ignorereceivers, checked in mlfi_eom() before the history file write. No changes to report delivery or the milter verdict.

thegushi and others added 8 commits May 29, 2026 13:38
- Add attribution to policy_published.domain fix (trusteddomainproject#270): independently
  patched by Eneas U. de Queiroz for openSUSE, submitted by Dirk Stöcker
- Add attribution to opendmarc_tld_read_file memory leak fix (trusteddomainproject#347):
  independently patched by Juri Haberland for openSUSE, submitted by
  Dirk Stöcker
- Add attribution to domain case normalization fix (trusteddomainproject#351): independently
  patched by Dirk Stöcker for openSUSE
- Document failure report Subject line fix (trusteddomainproject#391): written by Juri
  Haberland, submitted by Dirk Stöcker
- Document failure report hostname in body (trusteddomainproject#389): written by Juri
  Haberland, submitted by Dirk Stöcker
- Document IgnoreAuthenticatedClients logging (trusteddomainproject#387): written by Juri
  Haberland, submitted by Dirk Stöcker
- Document --skipdomains option (trusteddomainproject#383): written by Dirk Stöcker

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Converts the 25-line shell script to a proper Perl .in template,
consistent with every other script in reports/.

- Reads HistoryFile from opendmarc.conf using a real parser (no
  grep/sed), so users who configure a non-default path get correct
  behaviour automatically
- --history-file=path overrides the config for command-line flexibility
- --conf=file selects an alternate opendmarc.conf
- Falls back to /var/run/opendmarc.dat when HistoryFile is not set
- Uses open(pipe) instead of shell redirection to avoid injection risk
- --verbose and --version consistent with other reporting tools

Closes trusteddomainproject#358.
Adds a comma-separated IgnoreMailTo config option analogous to
IgnoreMailFrom.  Messages addressed to any listed address are not
written to the history file and generate no aggregate reports.  The
primary use case is loop prevention: a domain whose rua=/ruf= address
also receives mail through the filter can suppress report traffic from
being treated as reportable.

Original patch by Dirk Stöcker (openSUSE ticket208 / PR trusteddomainproject#381).
@thegushi thegushi changed the base branch from master to develop May 30, 2026 02:36
@thegushi thegushi closed this May 30, 2026
@thegushi thegushi reopened this May 30, 2026
@thegushi thegushi merged commit 8ab3ce7 into trusteddomainproject:develop May 30, 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.

Add NoReportsList option to suppress report delivery to known-bad destinations

1 participant