X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/059ec3d9952740285fb1ebf47961b8aca2eb1b4a..19b9dc856cc9406bc685eed974a127f327a42815:/src/src/exigrep.src diff --git a/src/src/exigrep.src b/src/src/exigrep.src index bcd359735..c6ccbfdc5 100644 --- a/src/src/exigrep.src +++ b/src/src/exigrep.src @@ -1,5 +1,5 @@ #! PERL_COMMAND -w -# $Cambridge: exim/src/src/exigrep.src,v 1.1 2004/10/07 10:39:01 ph10 Exp $ +# $Cambridge: exim/src/src/exigrep.src,v 1.3 2005/08/01 13:28:30 ph10 Exp $ use strict; @@ -58,6 +58,11 @@ return $seconds; my (%saved, %id_list, $pattern, $queue_time); sub do_line { + +# Convert syslog lines to mainlog format, as in eximstats. + +if (! /^\\d{4}/) { $_ =~ s/^.*? exim\b.*?: //; } + return unless my($date,$entry) = /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d (?:[+-]\d{4} )?)(.*)/; @@ -81,7 +86,7 @@ if (my($id) = $entry =~ /^(\w{6}\-\w{6}\-\w{2})/) # print it, but in any event, throw away what was saved. if ($entry =~ - /(?:Completed$|rejected (?:by local_scan|by non-SMTP ACL|after DATA))/) + /(?:Completed|rejected (?:by local_scan|by non-SMTP ACL|after DATA))/) { if ($saved{$id} =~ /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d ([+-]\d{4} )?)(\w{6}\-\w{6}\-\w{2})/) {