logreport giving dates in 1969 on exim logs

Francis J. Lacoste francis.lacoste at Contre.COM
Fri Dec 21 02:09:25 CET 2001


On Mon, Dec 17, 2001 at 11:30:53AM -0500, Joe Patterson wrote:
> When I run an exim log through
> 
> 'bin/lr_run lr_log2report /tmp/error email exim'
> 
> I get a *very* long report, starting in 1969.  Since I wasn't using exim in
> 1969, I suspect this is in error.  :)  

Indeed, it seems like an error :-)

[...]

> 
> email all lr_tag-20011217111154-20253 exim2dlf warning Use of uninitialized
> value in subtraction (-) at
> /root/projects/logreport/libexec/lire/email/exim2dlf line 198, <> line 8180.
> 
> This error repeats many times.  The first line number doesn't change, the
> second one does.
> 
> It seems that the second line numbers correspond to log entries such as:
> 
> 2001-12-15 06:38:01 16DoRz-0003Jq-00 == excursionpilot at charter.net
> T=remote_smtp defer (-44): retry time not reached for any host
> 
> Could it be that that "-44" is causing problems?
> 

No, the problem is related to the fact that this is the first
information we have about this message in that log file. More precisely,
there is no => line (which starts a message delivery) with the same
queue identifier in the file. This happens for delivery that are
splitted across the log rotation. (A delivery starts, the log file is
rotated, the delivery ends after the rotation.)

> I'm using the version from lire-full-20011205.tar.gz.  Anyone else
> experienced this?  Any thoughts on what might be the cause?  Anything I
> could do to fix it?
> 

I'm including a patch which fixes that problem.

-- 
Francis J. Lacoste
francis at Contre.COM
-------------- next part --------------
=== cd /home/francis/src/logreport/lire-unstable/email/script/
=== /usr/bin/cvs diff -u exim2dlf.in

Index: exim2dlf.in
===================================================================
RCS file: /cvsroot/logreport/service/email/script/exim2dlf.in,v
retrieving revision 1.16
diff -u -u -r1.16 exim2dlf.in
--- exim2dlf.in	2001/11/13 22:29:28	1.16
+++ exim2dlf.in	2001/12/21 01:07:59
@@ -88,6 +88,7 @@
 		     # Exim specific
 		     tos	=> {},
 		    };
+    $msgs{$qid}{time} ||= $time;
 
     die "too short for an Exim line\n"
       if length $line < 38;
@@ -110,8 +111,6 @@
 sub parse_rcpt {
     my ( $time, $line ) = @_;
     local $_ = $line;	# For regex matching
-
-    $msgs{$qid}{'time'} = $time;
 
     ($msgs{$qid}{size}) = /\sS=([0-9]+)/;
     my ($host) = /\sH=(\S+)/;
=== Exit status: 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.logreport.org/pipermail/questions/attachments/20011220/adb700cd/attachment.bin 


More information about the Questions mailing list