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

Re: Monitor daemon for exim4 logs



Monique Y. Mudama wrote on Dec, 15:

[...]

> > Would anybody have recommendations of lightweight monitors for exim4
> > logs, something appropriate to a standalone machine with a single
> > user ?

[...]

> Not a daemon, but I have this in my crontab:

> @daily  /usr/sbin/exim4 -bp | /usr/bin/mail -e -s "exim queue `date`" user

> You could do the same thing with greater frequency.

Excellent idea. It does the trick for me. I just elaborated slightly to send 
mail only if there are messages on the queue.

Thanks a lot for the suggestion, Monique !
Paulo

#!/bin/sh
# Alerts if messages pending on exim queue
# $Id: eximchk,v 1.1 2005/12/19 19:06:47 paulo Exp $

PATH=/bin:/usr/bin:/usr/sbin
user=root

nmsg=`exim4 -bpc`
if [ "$nmsg" != "0" ]
then
    exim4 -bp | mail -s "$nmsg message(s) on exim queue `date`" $user
fi

exit 0



Reply to: