X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=postfix-logwatch;h=827dfe0d968806e7a7b4d322b86cdfa0b5271e93;hb=ced6e6fcbf1a025419e8ee9f940e5022ed440532;hp=3e4a6731a6685275ee73ac95f07e988b1463df2a;hpb=af564700c95b53f3c2c6f111c1a8b5fd32575728;p=postfix-logwatch.git diff --git a/postfix-logwatch b/postfix-logwatch index 3e4a673..827dfe0 100644 --- a/postfix-logwatch +++ b/postfix-logwatch @@ -66,7 +66,9 @@ my $re_QID_s = qr/[A-Z\d]+/; my $re_QID_l = qr/(?:NOQUEUE|[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ\d]+)/; our $re_QID; -our $re_DSN = qr/(?:(?:\d{3})?(?: ?\d\.\d\.\d)?)/; +# The enhanced status codes can contain two-digit (or more) numbers; +# for example, "550 5.7.23". +our $re_DSN = qr/(?:(?:\d{3})?(?: ?\d+\.\d+\.\d+)?)/; our $re_DDD = qr/(?:(?:conn_use=\d+ )?delay=-?[\d.]+(?:, delays=[\d\/.]+)?(?:, dsn=[\d.]+)?)/; #MODULE: ../Logreporters/Utils.pm @@ -1378,8 +1380,17 @@ sub print_summary_report (\@) { $$divisor == $Totals{$keyname} ? 100.00 : $Totals{$keyname} * 100 / $$divisor; } else { - push @{$lines[$cur_level]}, - sprintf "$fmt %-23s $extra\n", $total, $desc, commify ($Totals{$keyname}); + my $new_line; + if ($extra eq '') { + $new_line = sprintf("$fmt %-23s \n", $total, $desc); + } + else { + $new_line = sprintf("$fmt %-23s $extra\n", + $total, + $desc, + commify ($Totals{$keyname})); + } + push @{$lines[$cur_level]}, $new_line } } } @@ -1847,7 +1858,7 @@ sub postfix_policy_spf($) { # KeyboardInterrupt $line =~ /^Read line: "/ or $line =~ /^Found the end of entry$/ or - $line =~ /^Config: {/ or + $line =~ /^Config: \{/ or $line =~ /^spfcheck: pyspf result/ or $line =~ /^Starting$/ or $line =~ /^Normal exit$/ or