Mailing List Archive

Re: question about exigrep 'completion' patterns
On Tue, 6 Mar 2007, John Jetmore wrote:

>
> While playing with exigrep this morning I received several lines like this
> at the end of output:
>
> +++ 1HOI5v-0002oe-9F not completed +++
> 2007-03-05 12:43:02 1HOI5v-0002oe-9F SMTP data timeout (message abandoned)
> on connection from (evvlinlwtp-rt-03.qccinc.com) [216.135.32.188] F=<ADDR>
>
> +++ 1HOJ1t-0003rx-8m not completed +++
> 2007-03-05 14:28:58 1HOJ1t-0003rx-8m rejected from <ADDR> H=(j5tlj91)
> [216.135.33.90]: message too big: read=36099481 max=31457280
>
> Should these be marked as completed because exim is indicating that it is
> not going to do anything further with the messages?

Probably, yes. This is clearly an oversight. Some suitable wording such
as "abandoned" or "rejected" might be better than "completed". How to
decide, however? Search for "rejected", I suppose.

--
Philip Hazel University of Cambridge Computing Service
Get the Exim 4 book: http://www.uit.co.uk/exim-book

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: question about exigrep 'completion' patterns [ In reply to ]
On Tue, 6 Mar 2007, John Jetmore wrote:

> +++ 1HOI5v-0002oe-9F not completed +++
> 2007-03-05 12:43:02 1HOI5v-0002oe-9F SMTP data timeout (message abandoned)
> on connection from (evvlinlwtp-rt-03.qccinc.com) [216.135.32.188] F=<ADDR>
>
> +++ 1HOJ1t-0003rx-8m not completed +++
> 2007-03-05 14:28:58 1HOJ1t-0003rx-8m rejected from <ADDR> H=(j5tlj91)
> [216.135.33.90]: message too big: read=36099481 max=31457280
>
> Should these be marked as completed because exim is indicating that it is
> not going to do anything further with the messages?

I have committed a patch that now shows them as "not accepted" - this is
determined by the lack of a "<=" line.

Philip

--
Philip Hazel, University of Cambridge Computing Service.

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: question about exigrep 'completion' patterns [ In reply to ]
On Tue, 13 Mar 2007, John Jetmore wrote:

> I think I didn't explain myself very well. My point wasn't that the
> wording for the "not completed" section was poor, but that those lines
> didn't belong in that section at all. exigrep already includes exceptions
> for that type of message (one with which Exim is logically "finished",
> but which does not contain a "Completed" line. Specifically:
>
> if (index($_, 'Completed') != -1 ||
> (index($_, 'rejected') != -1 &&
> /rejected (?:by local_scan|by non-SMTP ACL|after DATA)/o))

So it does. That looks like a previous hack that caught some specific
cases. The problem is that keeping this list of patterns up-to-date is
not something that is going to happen. So there will always be cases
that it misses. Now that I've thought of the cunning "missing <= line"
trick, I'm more inclined to shorten the above pattern back to just
"Completed", and leave everything else to the new code that will list
such messages as "not accepted".

But of course you are free to argue with me... :-)

--
Philip Hazel University of Cambridge Computing Service
Get the Exim 4 book: http://www.uit.co.uk/exim-book

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: question about exigrep 'completion' patterns [ In reply to ]
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.

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##