Re: [exim-dev] question about exigrep 'completion' patterns

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: John Jetmore
CC: exim-dev
Subject: Re: [exim-dev] question about exigrep 'completion' patterns
On Tue, 13 Mar 2007, John Jetmore wrote:

> I agree that it will never be in synch in the current method. Heck, I
> only provided the ones that I stumbled across, I didn't even make an
> attempt to get all the current exceptions. My only real feeling is that
> it's nice to have the output displayed in something that is sort of the
> correct timeline. Forcing some of the lines which could otherwise be
> handled correctly to be shown out of line seems less useful. But it's not
> a strong opinion.


However, my patch was crap, I've realized. I had ignored the fact that
some messages arrived yesterday but were still in today's log. So their
"<=" lines were not there, of course.

I've backed out my patch, and instead improved the test. It now reads
like this:

  if (index($_, 'Completed') != -1 ||
      index($_, 'SMTP data timeout') != -1 ||
        (index($_, 'rejected') != -1 &&
          /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d (?:[+-]\d{4} )?)(?:\[\d+\] )?\w{6}\-\w{6}\-\w{2} rejected/o))


In other words, it triggers on "rejected" appearing immediately after
the time and message ID as well as on the other cases. The initial index
test for "rejected" saves doing the complicated pattern match on every
line.

Philip

--
Philip Hazel, University of Cambridge Computing Service.