mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-07 20:27:02 +01:00
fe01e850a8
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
38 lines
1.7 KiB
Diff
38 lines
1.7 KiB
Diff
--- 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,
|