A simple tcp monitor ?
lunatech: One problem with any auto-fix script is what if it goes berserk?  What if your mail server is dying because of overload and the auto-fix keep restarting it?  The overload will never clear out.  If you go with the auto-fix solution, remember to add a throttle to the number of times it restarts a service.