X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=postfix-logwatch;h=1b89ad6382b35928eccb9bb9e82bce5673c12b41;hb=891b5ce1780e10cd94d230efacf6e8b5cb33a931;hp=92ed62138fe0d37ab30268f40c8e5ccbc3ee67d3;hpb=6afb8e258a5a2a0e7c72c4c25927dde9d1e2ad89;p=postfix-logwatch.git diff --git a/postfix-logwatch b/postfix-logwatch index 92ed621..1b89ad6 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 @@ -4357,7 +4359,8 @@ sub postfix_postscreen { $line =~ /discarding EHLO keywords: / or $line =~ /: discard_mask / or $line =~ /: sq=\d+ cq=\d+ event/ or - $line =~ /: replacing command "/ + $line =~ /: replacing command "/ or + $line =~ /^(DATA|BDAT) without valid RCPT/ ); @@ -4397,14 +4400,11 @@ sub postfix_postscreen { } } - elsif ($line =~ /^NOQUEUE: reject: CONNECT from \[([^]]+)\](?::\d+)?: too many connections/) { - # NOQUEUE: reject: CONNECT from [192.168.0.1]:7197: too many connections - $Counts{'postscreen'}{'reject'}{'Too many connections'}{$1}{$END_KEY}++ if $Collecting{'postscreen'}; - } - - elsif ($line =~ /^reject: connect from \[([^]]+)\](?::\d+)?: (.+)$/) { - # reject: connect from [192.168.0.1]:21225: all screening ports busy - $Counts{'postscreen'}{'reject'}{"\u$2"}{$1}{$END_KEY}++ if $Collecting{'postscreen'}; + elsif ($line =~ /^(NOQUEUE: )?reject: (connect|CONNECT) from \[([^]]+)\](?::\d+)?: (.+)$/) { + # NOQUEUE: reject: CONNECT from [192.168.0.1]:7197: too many connections + # NOQUEUE: reject: CONNECT from [192.168.0.1]:39410: all server ports busy + # reject: connect from [192.168.0.1]:21225: all screening ports busy + $Counts{'postscreen'}{'reject'}{"\u$4"}{$3}{$END_KEY}++ if $Collecting{'postscreen'}; } elsif ($line =~ /^(?:WHITELIST VETO) \[([^]]+)\](?::\d+)?$/) {