And to add my 2p/2c, check our multitail as an alternative to tail. It adds
the ability to split the screen into multiple sections and, possibly more
interestingly, allows colour coding and highlighting and has built-in
support for regex log item filtering. 

The default highlighting rule are OK for general use, but you can easily add
new ones through /etc/multitail.conf once the package is installed. I would
share mine, but the spamdyke/qmail stuff is all over the place and
intermixed with things others won't want, and the resulting file is a bit of
a mess. But if anybody really wants it just email me.

Rpmforge has a multitail RPM for Centos/RedHat etc.

(Christoph: check out /root/shall.sh which I put there for you. But be sure
to open the ssh window to a large size -- full screen even - when running
it)


> -----Original Message-----
> From: spamdyke-users-boun...@spamdyke.org [mailto:spamdyke-users-
> boun...@spamdyke.org] On Behalf Of Sam Clippinger
> Sent: 06 December 2013 17:34
> To: spamdyke users
> Subject: Re: [spamdyke-users] Basic script writing help please
> 
> If it were me, I would probably do it this way instead:
>       tail -f */spamdyke |\
>       sed -e "/^$/d" -e "/==$/d" -e "/TIMEOUT/d" -e "/ERROR/d" -e
> "/BLACKLIST_NAME/d" -e "/RDNS/d" -e "/RBL/d" |\
>       awk '{ print $6 " " $8 " " $10 " " $12 " " $14 }'
> 
> That way, there's only one copy of sed running continuously instead of 15.
> Using awk would also let you reorder the different fields or change the
> spacing between them if you want to.  You could also easily modify it to
> produce CSV format (or whatever) as needed.
> 
> -- Sam Clippinger
> 
> 
> 
> 
> On Dec 6, 2013, at 11:08 AM, Lutz Petersen wrote:
> 
> >
> >
> > We use a Script that contains this (using QMail and Spamdyke):
> >
> >
> >
> > tail -f */spamdyke |\
> >     sed -u '/^$/d'|\
> >     sed -u '/TIMEOUT/d'|\
> >     sed -u '/RDNS_MISS/d'|\
> >     sed -u '/==$/d'|\
> >     sed -u '/ERROR/d'|\
> >     sed -u '/FILTER/d'|\
> >     sed -u 's/^.*\]: //'|\
> >     sed -u 's/from://'|\
> >     sed -u 's/to://'|\
> >     sed -u 's/origin_ip://'|\
> >     sed -u 's/origin_rdns: //'|\
> >     sed -u '/BLACKLIST_NAME/d'|\
> >     sed -u 's/ auth:.*$//'|\
> >     sed -u '/RDNS/d' |\
> >     sed -u '/RBL/d'
> >
> >


_______________________________________________
spamdyke-users mailing list
spamdyke-users@spamdyke.org
http://www.spamdyke.org/mailman/listinfo/spamdyke-users

Reply via email to