[Mimedefang] MIMEDefang and monit
mimedefang at rana.at
mimedefang at rana.at
Tue Aug 10 10:20:52 EDT 2010
I'm using MIMEDefang and monit on Debian lenny, all up-to-date.
From time to time spamassassin, clamav and MIMEDefang stop working
without any hints in the logfiles.
After all I started using monit. No proplems with spamassassin and
clamav, but the MIMEDefang process wasn't started again.
The startup-script for MIMEDefang will start 2 processes, mimedefang
and mimedefang-multiplexor, and I believe, that's the problem, because
the mimedefang-multiplexor still keeps running, while mimedefang
crashed.
It seems to me that monit parses the output of the startup-script and
therefor doesn't restart MIMEDefang properly (manually restart or
stop/start no problem).
As I understood from the man-pages of monit, it first tries to stop
the process, than start it again, so something like:
invoke-rc.d mimedefang stop (Debian style!)
invoke-rc-d mimedefang start
or
/etc/init.d/mimedefang start
/etc/init.d/mimedefang stop
If I do it manually (with killed mimedefang but running
mimedefang-multiplexor it shows the following:
# invoke-rc.d mimedefang stop
Shutting down mimedefang: /etc/init.d/mimedefang: line 307: kill: (9820) - No such process /usr/bin/mimedefang: no process killed [FAILED]
Shutting down mimedefang-multiplexor: [ OK ]
I think the "[ OK ]"-Message prevents monit to trigger the
start-up-script.
Killing both processes (and child-processes) make monit work like
expected.
monit-configuration for mimedefang:
check process mimedefang-milter with pidfile /var/spool/MIMEDefang/mimedefang.pid
start = "/etc/init.d/mimedefang start"
stop = "/etc/init.d/mimedefang stop"
if failed unix /var/spool/MIMEDefang/mimedefang.sock then start
logentries:
Aug 7 19:25:46 e1 monit[9355]: 'mimedefang-milter' process is not running
Aug 7 19:25:46 e1 monit[9355]: 'mimedefang-milter' trying to restart
Aug 7 19:25:46 e1 monit[9355]: 'mimedefang-milter' start: /etc/init.d/mimedefang
Aug 7 19:25:46 e1 monit[9355]: 'mimedefang-milter' failed to start
Tried changing the monit-configuration to:
check file mimedefang.sock with PATH /var/spool/MIMEDefang
if changed timestamp then exec "/etc/monit/scripts/mimedefang-restart"
but that doesn't work either (reasonable):
Aug 7 18:50:47 e1 monit[9119]: 'mimedefang.sock' is not regular file
Aug 7 18:50:47 e1 monit[9119]: 'mimedefang.sock' trying to restart
Is there another idea without the possible rewriting of the
startup-script /etc/init.d/mimedefang or does anyone have a working
configuration for monit and MIMEDefang (possibly especially for
Debian)?
Thanks in advance
Christian
More information about the MIMEDefang
mailing list