On Mon, Jan 05, 2009 at 03:53:22PM +0530, ram wrote:

> 
> On Sun, 2009-01-04 at 13:48 -0500, Victor Duchovni wrote:
> > On Sun, Jan 04, 2009 at 08:33:12PM +0530, Ramprasad wrote:
> > 
> > > My logfiles are approx 1.5 GB each, if we rotate twice a day
> > > grep sender.*recipient $logfile is really much much  faster than  grep
> > > -i sender.*recipient $logfile
> > > IMHO grep would  not count as lousy code ( on linux )
> > 
> > Use "egrep -i", and make sure you have "LANG=C" in the environment (or
> > equivalent). Doing case-insensitive Unicode matches is likely much more
> > painful than ASCII matches.
> > 
> 
> Thanks that made *a lot* of difference
> with "env LANG=C" grep -i works fine. 

I am glad my crystal ball is still in working order. :-)

> Still I think a log in lowercase would be a nice feature to have. We
> also put the entries into a DB and generate statistics. Every logparser
> script has to take care to convert to lowercase. Even if performance is
> not an issue, it would be a lot neater to log in lowercase

Sorry, there are lots of reasons why this is a bad idea. If you want to
downcase particular fields in log entries you import into your database,
go ahead. Do not downcase all log content, some of the data is case-sensitive
in ways that matter (message-ids, remote "." response transaction ids, 
logged message content in header/body check reject messages, ...)

-- 
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majord...@postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Reply via email to