summaryrefslogtreecommitdiff
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
parent13b685f963e9313409f8350f718bac411829a5e7 (diff)
Exigrep patch to allow it to handle syslog files.
-rw-r--r--doc/doc-txt/ChangeLog4
-rw-r--r--src/src/exigrep.src7
2 files changed, 9 insertions, 2 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 2846c96b6..e61046715 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.183 2005/08/01 13:20:28 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.184 2005/08/01 13:28:30 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -11,6 +11,8 @@ TK/01 Added the "success_on_redirect" address verification option. See
PH/01 Added support for SQLite, basic code supplied by David Woodhouse.
+PH/02 Patch to exigrep to allow it to work on syslog lines.
+
Exim version 4.52
-----------------
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} )?)(.*)/;