Hi,
I have no idea about monit but I have a piece of code that might do what
you want:
http://u.poolp.org/~gilles/projects/procstated/
However that's just a hack, the proper fix is to provide us with the output
from 'smtpd -dv' so we can fix the corrupt session bug ;-)
Gilles
On Tue, Nov 15, 2011 at 10:09:43PM -0500, Sarah Caswell wrote:
> Hi,
>
> I'm running a mailserver with smtpd (on OpenBSD) for a small group of folks
> and get some (very occasional) crashes - usually just corrupted sessions.
> No big deal, a restart of smtpd is all that it takes.
>
> I'm trying to create a Monit (v 4.10.1) recipe that will automatically
> restart the smtpd process for me, but it just doesn't work.
> I found the recipe below on a Linux list for monitoring services that don't
> write a pidfile.
>
> -----recipe is currently ----
>
> check host localhost with address www.xxx.yyy.zzz
> start program = "/usr/libexec/smtpd -f /etc/mail/smtpd.conf"
> stop program = "pkill smtpd"
> if failed host www.xxx.yyy.zzz port 25 type tcp protocol smtp then restart
>
> --------------
>
> Is anyone here using monit to successfully restart smtpd?
>
> Any info appreciated.
>
> :-)
>
> Sarah
>
> --
> "Go out on a limb. Thats where the fruit is" - Jimmy Carter
>
--
Gilles Chehade
http://www.poolp.org @poolpOrg