summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-04-03 09:37:46 +0200
committerErich Eckner <git@eckner.net>2019-04-03 09:37:46 +0200
commita695036604fb9dc899ae4bac66881514801a681b (patch)
tree1a91dbd30ffbbb3f4cbd5bcd2585463a89d177f4
parent249e20de3a6b3aaf4141711ce0e4c119e3c1f73e (diff)
downloadlogwatch-overrides-a695036604fb9dc899ae4bac66881514801a681b.tar.xz
courier: zdkimResults new
-rw-r--r--courier22
1 files changed, 22 insertions, 0 deletions
diff --git a/courier b/courier
index b175d01..e2549d2 100644
--- a/courier
+++ b/courier
@@ -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";