summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2005-08-01 13:28:30 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2005-08-01 13:28:30 +0000
commit395ff96dec2b7ef473ffb5dd39b79b62d1661eee (patch)
tree9d6441f707126f3722ca4d9c4f6b4cec38e5dcf4 /src
parent13b685f963e9313409f8350f718bac411829a5e7 (diff)
Exigrep patch to allow it to handle syslog files.
Diffstat (limited to 'src')
-rw-r--r--src/src/exigrep.src7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/src/exigrep.src b/src/src/exigrep.src
index e824bb41c..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.2 2004/12/21 11:28:38 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} )?)(.*)/;