Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions reports/opendmarc-reports.8.in
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,27 @@ Print version number and exit.
The script checks the
.I suppressions
database table before sending each report. If the destination RUA/RUF
address, or its domain, appears in that table the report is silently
skipped. The table is also checked at the domain level, so adding a bare
domain name (e.g.
address, or its domain, appears in that table the report is skipped. The
table is also checked at the domain level, so adding a bare domain name
(e.g.
.IR example.com )
suppresses all reports for that domain regardless of their destination
address. Applies to both aggregate and forensic modes.
.PP
Skips caused by the suppressions table or by
.I --stale-check
are always written to standard error, even without
.IR --verbose ,
since these come from dynamic or external sources the operator may not be
expecting. Skips caused by
.B NoReportsList
or
.I --skipdomains
are not, since those are operator-curated and the operator already knows
what they contain; pass
.I --verbose
to see those as well.
.PP
The table is loaded once at startup and is not queried per-message, so
changes take effect on the next run. If the table does not exist (e.g. on
a pre-migration install) the check is skipped and a notice is written to
Expand Down
21 changes: 17 additions & 4 deletions reports/opendmarc-reports.in
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,18 @@ sub noreports_skip
return 0;
}

# StaleMARC and the suppressions DB are dynamic/external sources that can
# silently drop reports the operator wasn't expecting, so skips they cause
# are always worth printing. NoReportsList is operator-curated -- the
# operator already knows what's in it -- so it stays --verbose-only to
# avoid flooding output when it's used heavily.
sub loud_skip
{
my ($reason) = @_;

return $reason eq "StaleMARC" || $reason eq "suppression DB";
}

# Returns the reason a destination address should be skipped (for logging),
# or undef if it should be sent to. Combines every suppression source so
# the result -- and therefore the recipients who actually get mail -- is
Expand Down Expand Up @@ -688,7 +700,7 @@ if ($forensic)
if (defined($reason))
{
print STDERR "$progname: --forensic: skipping report for $reported_domain ($reason)\n"
if $verbose;
if $verbose || loud_skip($reason);
exit($EXIT_SUPPRESSED);
}
}
Expand Down Expand Up @@ -728,7 +740,7 @@ if ($forensic)
@rcpts = grep {
my $reason = skip_reason($_);
print STDERR "$progname: --forensic: skipping $_ ($reason)\n"
if defined($reason) && $verbose;
if defined($reason) && ($verbose || loud_skip($reason));
!defined($reason);
} @rcpts;

Expand Down Expand Up @@ -1035,7 +1047,8 @@ foreach (@$domainset)
my $domain_reason = domain_skip_reason($domain);
if (defined($domain_reason))
{
print STDERR "$progname: skipping $domain ($domain_reason)\n" if $verbose;
print STDERR "$progname: skipping $domain ($domain_reason)\n"
if $verbose || loud_skip($domain_reason);
next;
}

Expand Down Expand Up @@ -1632,7 +1645,7 @@ foreach (@$domainset)
if (defined($reason))
{
print STDERR "$progname: skipping $domain report to $repdest ($reason)\n"
if $verbose;
if $verbose || loud_skip($reason);
next;
}
}
Expand Down
Loading