Bob Proulx wrote: > if grep -q "error: syswrite()" /var/log/spamd.log; then > echo "your mailserver is down" | mail -s " pls check server ip > 216.185.xxx.xxx " [EMAIL PROTECTED] > exit 1 > fi > exit 0
Oh, and after I sent that previous message I realized I should have asked another question. I assume you are collecting logs from other machines. Because if the mail server is down then you won't be able to use mail, which uses the mail server, to notify you of the problem. Bob