[Dovecot] Director mailserver health monitoring script

Brad Davidson brandond at uoregon.edu
Fri Aug 20 00:01:56 EEST 2010


Timo et al;

The last bit of functionality that the Dovecot director is missing
compared to our existing load balancers is mailserver health monitoring.
As I understand it, if a mailserver goes down, Dovecot does not take any
action to route connections around the offline node, and will keep
trying to proxy clients to it. Since we're hoping to cut over to
Directors soon, but don't want to lose any functionality, I've hacked up
a script that:

* Polls the local director for a list of mailservers
* Performs health checks against a list of ports on each mailserver
* Disables or enables mailservers (by altering the vhost count) as
necessary

I've published the script on github in hopes that it might be useful to
others:
http://github.com/brandond/poolmon/

Maybe someday Dovecot will do something like this internally and I won't
need the script any more, but for now I'm pretty happy with it.

-Brad


More information about the dovecot mailing list