[Mimedefang] swatch script to email you when an error occurs.

Lucas Albers admin at cs.montana.edu
Wed Feb 18 12:05:29 EST 2004


I am paranoid that my mail server will stop working, so I whipped up this
little swatch script to notify me when mimedefang encounters an error,
which might indicate it has stopped working.
I could have it do a restart or similar, but for now I just have it email me.
Someone posted c-code to do similar,but I'm a big fan of only using perl
for my system administration code.
Minor improvements, it could only notify you once or a maximum number of
times when an error occurs, instead of everytime.


Perhaps you could add this to the contrib directory?
-------------------------
watchfor /Milter \(mimedefang\): local socket name
\/var\/spool\/MIMEDefang\/mimedefang.sock unsafe/
mail insert_email_address,subject=swatch detected mimedefang error on
processing
echo red
watchfor / Milter \(mimedefang\): to error state/
echo red
watchfor /Milter \(mimedefang\): write\(D\) returned \-1, expected 5:
Broken pipe/
mail insert_email_address,subject=swatch detected mimedefang error on
processing
echo green
----------------------------

-- 
Luke Computer Science System Administrator
Security Administrator,College of Engineering
Montana State University-Bozeman,Montana



-- 
Luke Computer Science System Administrator
Security Administrator,College of Engineering
Montana State University-Bozeman,Montana



More information about the MIMEDefang mailing list