diff options
Diffstat (limited to 'courier')
-rw-r--r-- | courier | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -376,6 +376,7 @@ my $ThisLine; my $To; my $User; my $service; +my %zdkimResults; while (defined($ThisLine = <STDIN>)) { chomp $ThisLine; @@ -537,6 +538,7 @@ while (defined($ThisLine = <STDIN>)) { ( $ThisLine =~ /^userdbshadow: entry not found$/ ) or ( $ThisLine =~ /^FAIL, all modules rejected$/ ) or ( $ThisLine =~ /^Authenticated: / ) or + ( $ThisLine =~ /^password matches successfully$/ ) or ( $ThisLine =~ /^cram: challenge=\S+, response=\S+$/ ) ) { # Ignore @@ -560,6 +562,15 @@ while (defined($ThisLine = <STDIN>)) { $Stoppfilter++; } elsif ( $ThisLine =~ /^pythonfilter greylist reject/ ) { $GreylistReject++; + } elsif ( (my $results, my $domain) = ($ThisLine =~ /^zdkimfilter\[[0-9]+\]:id=\S+: verified:( [^(]+ )\(id=[^@]*\@(\S+), .*$/ ) ) { + my $result = ""; + if ( (my $spfResult) = ($results =~ / spf=([^ ,]+)[ ,]/ )) { + $result .= ", spf: ".$spfResult; + }; + if ( (my $dkimResult) = ($results =~ / dkim=([^ ,]+)[ ,]/ )) { + $result .= ", dkim: ".$dkimResult; + }; + $zdkimResults{$domain}{substr $result, 2}++; } elsif ( ( $ThisLine =~ /^Initialized the \S+ python filter$/ ) or ( $ThisLine =~ /^Debugging filter invoked:$/ ) or @@ -750,6 +761,17 @@ if ( ( $Detail >= 5 ) and (keys %DeSuTbl) and ($Tables)) { } +if ( ( $Detail >= 5 ) and (keys %zdkimResults)) { + print "\nzdkim results:\n"; + foreach my $domain (sort keys %zdkimResults) { + print " ".$domain.":\n"; + foreach my $result (sort keys %{ $zdkimResults{$domain} }) { + print " ".$result." - ".$zdkimResults{$domain}{$result}." Time(s)\n"; + } + } +} + + if (keys %OtherList) { print "\n**Unmatched Entries**\n"; |