From 0802c342c390d72c784eecffe54d3e67cf51ce0d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 26 Feb 2021 14:23:40 +0100 Subject: courier: show errors on different detail levels --- courier | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/courier b/courier index 730ef63..caaeeb3 100644 --- a/courier +++ b/courier @@ -455,9 +455,6 @@ while (defined($ThisLine = )) { $ThisLine = $'; } if (( $Msg ) = ( $ThisLine =~ /^msg=(.*)/ )) { } - if (( $Msg ) = ($ThisLine =~ /451 4.7.1 Greylisting in action, please come back in /)) { - next; - } $ThisLine =~ s/^: //; @@ -476,6 +473,19 @@ while (defined($ThisLine = )) { my $Reason = $ThisLine; $Reason = $Msg if defined $Msg; + if ($Detail < 5) { + if (($Reason =~ /^456 Address temporarily unavailable.$/) or + ($Reason =~ /^451 4.7.1 Greylisting in action,/) or + ($Reason =~ /^"502 ESMTP command error",cmd/)) { + next; + } + } + if ($Detail == 0) { + if (! ($Reason =~ /^"534 SIZE=Message too big\./)) { + next; + } + } + $ErrorMsgs{$Reason}{$Host}{$From || "-"}{$To || "-"}++ if not $Tables; my $TblReason = MakeTblReason($Reason) if $Tables; $ErrorTbl{$TblReason}{$Host}++ if $Tables; -- cgit v1.2.3-54-g00ecf