[imp] function to check if mail server is down

Rick Irvine irvine@purdue.edu
Fri, 30 Aug 2002 09:44:11 -0500 (EST)


On Thu, 29 Aug 2002, Chuck Hagenbuch wrote:

> Quoting Jie Gao <J.Gao@isu.usyd.edu.au>:
> 
> > It would be good to have a function to check if the imap/pop server is
> > up at user login and give an appropriate message instead of just saying
> > the user has entered a wrong login name or password.
> 
> If you can supply a patch that doesn't affect performance adversely, that'd
> be great.
> 
> -chuck

Would this be better run as a script launched from cron?  Maybe every 5-10
minutes a script could see if the IMAP port is responding.

Currently I'm pondering doing either this or running Mon to monitor the IMAP/s
ports, the SMTP ports, the MySQL database, and anything else I can think of
between now and then.  Mon lets you write your own response scripts, so you
could decide whether it shuts off your IMP pages or merely puts up a "The
server is down" message in the motd.

- Rick