Re: *nice* maillog output

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

 



On Tue, 2004-06-22 at 15:25, Craig Tinson wrote:
> this is probably asking a bit much.. but no harm in asking..
> 
> I currently have a spare 14" monitor connected to the mail server so I 
> can monitor whats going on..
> 
> it is permanently running the following:
> 
> tail -f /var/log/maillog | grcat conf.log

> this is more info than I need and just clutters up (and wraps around) on 
> the 14" monitor..
> 
> is there an obvious/easy way to trim it.. for example:
> 
> Jun 22 - (20:19:26) Mail From: <someone@xxxxxxxxxxxxxx> to 
> <craig@xxxxxxxxxx> (Clean)
> Jun 22 - (20:20:30) Mail From: <someone@xxxxxxxxxxxxxx> to 
> <craig@xxxxxxxxxx> (Spam)
> 
> colored and columned?
> 
> I know this is asking a bit much.. but thought I'd ask...
> 
> Cheers
> 
> Craig
> 

You could pipe it through grep and strip out stuff you don't want
displayed.

For example:

tail -f /var/log/maillog |grep -v spamd | grcat conf.log

Will strip any line that has spamd in it from the stream and pass the
rest along to your other script for display.

Other than that you would need to write a script that would parse the
data and reformat it to the way you want it to look.  But I think the
grep -v option might be a very quick way to reduce the amount of stuff
that you don't want displayed.


-- 
Scot L. Harris
webid@xxxxxxxxxx

I came to MIT to get an education for myself and a diploma for my mother. 



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux