diff options
author | Erich Eckner <git@eckner.net> | 2020-04-07 09:38:01 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-04-07 09:38:01 +0200 |
commit | 62dcef14edf09feb4cd0ed0250a3855901b9f9ac (patch) | |
tree | c082bf546847f441da1df40e5b12d0e9109c23c7 | |
parent | ac9a8945284f9fd4e6a721c3010eedef01fd43fc (diff) | |
download | logwatch-overrides-62dcef14edf09feb4cd0ed0250a3855901b9f9ac.tar.xz |
courier: recognize more zdkim stuff
-rw-r--r-- | courier | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -377,6 +377,7 @@ my $To; my $User; my $service; my %zdkimResults; +my %zdkimErrors; while (defined($ThisLine = <STDIN>)) { chomp $ThisLine; @@ -577,6 +578,10 @@ while (defined($ThisLine = <STDIN>)) { $result .= ", dkim: ".$dkimResult; }; $zdkimResults{$domain}{substr $result, 2}++; + } elsif ( (my $domain, my $result) = ($ThisLine =~ /^zdkimfilter\[[0-9]+\]:id=\S+: (\S+) (pass only because \S+)$/ ) ) { + $zdkimResults{$domain}{$result}++; + } elsif ( (my $zdkimError) = ($ThisLine =~ /^zdkimfilter\[[0-9]+\]:(Cannot sign message: no authenticated sender, empty or disabled RELAYCLIENT, and no default_domain)$/ ) ) { + $zdkimErrors{$zdkimError}++; } elsif ( ( $ThisLine =~ /^Initialized the \S+ python filter$/ ) or ( $ThisLine =~ /^Debugging filter invoked:$/ ) or @@ -753,6 +758,13 @@ if ( ( $Detail >= 0 ) and (keys %Failed) and (!$Tables)) { print "$out\n"; } +if ( ( $Detail >= 0 ) and (keys %zdkimErrors) and (!$Tables)) { + print "\nzdkim errors:\n"; + foreach my $zdkimError (sort keys %zdkimErrors) { + print " ".$zdkimErrors{$zdkimError}." Time(s): ".$zdkimError."\n"; + } +} + if ( ( $Detail >= 5 ) and (keys %DeSu) and (!$Tables) ) { my ($out, $nmb, $size) = recprint1 ( \%DeSu, 2, [ "From", "To" ], [0,0], 2, undef, \%DeSuSz); @@ -766,7 +778,6 @@ if ( ( $Detail >= 5 ) and (keys %DeSuTbl) and ($Tables)) { print $out; } - if ( ( $Detail >= 5 ) and (keys %zdkimResults)) { print "\nzdkim results:\n"; foreach my $domain (sort keys %zdkimResults) { |