[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unknown User message in sendmail maillog.



On Wed, Feb 05, 2003 at 12:48:19PM -0600, Tim Hart wrote:
> In this version of his quick hack, he does actually call back to the array
> if you will notice.  The code first searches for the User unknown line, then
> captures the id of the call to sendmail, then greps the file (actually where
> the call back to the array occurs) for other lines with the same id.  I
> think the second version of his quick hack threw only relevent lines into a
> hash, but I'm speaking from memory and not actually looking at it.

Exactly, but every time I try to optimize much more than that, I don't
seem to get the same results.  Of course, I think I only stared at the
script for a total of maybe 15 minutes so far.  :-)

Slurping everything into an array just made it simpler to use grep()
on the array later.  Unfortunately, using grep() on *every* line made
the script a couple of orders of magnitude slower than it needed to
be...  (At the moment, /var/log/maillog* on the mail server here is
over a quarter million lines.)

Steve
-- 
steve@silug.org           | Southern Illinois Linux Users Group
(618)398-7360             | See web site for meeting details.
Steven Pritchard          | http://www.silug.org/

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.