X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Feximstats.src;h=88eb69fe83b3d849b59d3c965cd5139704340f28;hb=7c5214ecc29b8fc23e15030db8207e3ff2cb4fc6;hp=539c756d7aacb7327852e965fcd977b5095638b0;hpb=e2f7a0d23192ebd03b783db210dd1ff4bf774bba;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/eximstats.src b/src/src/eximstats.src index 539c756d7..88eb69fe8 100644 --- a/src/src/eximstats.src +++ b/src/src/eximstats.src @@ -1,5 +1,5 @@ #!PERL_COMMAND -w -# $Cambridge: exim/src/src/eximstats.src,v 1.12 2007/01/22 15:14:01 steve Exp $ +# $Cambridge: exim/src/src/eximstats.src,v 1.13 2007/01/31 16:52:12 ph10 Exp $ # Copyright (c) 2001 University of Cambridge. # See the file NOTICE for conditions of use and distribution. @@ -260,6 +260,9 @@ # 2006-11-27 V1.52 Steve Campbell # Tally any reject message containing SpamAssassin. # +# 2007-01-31 V1.53 Philip Hazel +# Allow for [pid] after date in log lines +# # # # For documentation on the logfile format, see @@ -558,7 +561,7 @@ use vars qw($WEEK $DAY $HOUR $MINUTE); @days_per_month = (0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334); $gig = 1024 * 1024 * 1024; -$VERSION = '1.52'; +$VERSION = '1.53'; # How much space do we allow for the Hosts/Domains/Emails/Edomains column headers? $COLUMN_WIDTHS = 8; @@ -1821,7 +1824,7 @@ sub generate_parser { $length = length($_); next if ($length < 38); - next unless /^(\\d{4}\\-\\d\\d-\\d\\d\\s(\\d\\d):(\\d\\d):\\d\\d( [-+]\\d\\d\\d\\d)?)/o; + next unless /^(\\d{4}\\-\\d\\d-\\d\\d\\s(\\d\\d):(\\d\\d):\\d\\d( [-+]\\d\\d\\d\\d)?)( \\[\\d+\\])?/o; ($tod,$m_hour,$m_min) = ($1,$2,$3); @@ -1834,6 +1837,12 @@ sub generate_parser { $extra = 0; } + # PH - watch for PID added after the timestamp. + if (defined($5)) { + $extra += length($5); + next if ($length < 38 + $extra); + } + $id = substr($_, 20 + $extra, 16); $flag = substr($_, 37 + $extra, 2);