#!/bin/sh
COUNT=`ps -ax | grep -v grep | grep -c spamd`
if [ $COUNT -eq 0 ]; then
#the command used to start spamd
/usr/bin/spamd -d -c -m 5
sleep 3
COUNT=`ps -ax | grep -v grep | grep -c spamd`
if [ $COUNT -eq 0 ]; then
echo -e "Subject: spamd is downnnspamd is downn.
" | /usr/sbin/exim your@email.com
fi
fi
exit 0;