summaryrefslogtreecommitdiff
path: root/network/opendmarc/patches/ticket205.patch
diff options
context:
space:
mode:
Diffstat (limited to 'network/opendmarc/patches/ticket205.patch')
-rw-r--r--network/opendmarc/patches/ticket205.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/network/opendmarc/patches/ticket205.patch b/network/opendmarc/patches/ticket205.patch
new file mode 100644
index 0000000000..11089408dc
--- /dev/null
+++ b/network/opendmarc/patches/ticket205.patch
@@ -0,0 +1,38 @@
+--- opendmarc-1.3.2/reports/opendmarc-reports.in 2017-02-16 16:15:01.000000000 +0100
++++ opendmarc-1.3.2_fix/reports/opendmarc-reports.in 2017-02-26 10:43:46.697335371 +0100
+@@ -157,6 +157,7 @@
+ print STDERR "\t--keepfiles keep xml files (in local directory)\n";
+ print STDERR "\t -n synonym for --test\n";
+ print STDERR "\t--nodomain=name omit a report for named domain\n";
++ print STDERR "\t--skipdomains=file list of domains to omit a report for\n";
+ print STDERR "\t--noupdate don't record report transmission\n";
+ print STDERR "\t--report-email reporting contact [$repemail]\n";
+ print STDERR "\t--report-org reporting organization [$repdom]\n";
+@@ -173,6 +174,19 @@
+ # set locale
+ setlocale(LC_ALL, 'C');
+
++sub loadskipdomains
++{
++ die "Could not open domains file $_[1]" unless open FILE,"<",$_[1];
++ while (my $line = <FILE>)
++ {
++ $line =~ s/\s*#.*//;
++ $line =~ s/^\s+//;
++ $line =~ s/\s+//;
++ push(@skipdomains, $line);
++ }
++ close FILE;
++}
++
+ # parse command line arguments
+ my $opt_retval = &Getopt::Long::GetOptions ('day!' => \$daybound,
+ 'dbhost=s' => \$dbhost,
+@@ -186,6 +200,7 @@
+ 'keepfiles' => \$keepfiles,
+ 'n|test' => \$testmode,
+ 'nodomain=s' => \@skipdomains,
++ 'skipdomains=s' => \&loadskipdomains,
+ 'report-email=s' => \$repemail,
+ 'report-org=s' => \$repdom,
+ 'smtp-server=s' => \$smtp_server,