Auto-restart spamd if Exim is running

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
888
From time-to-time, spamd just disappears, an unfiltered email streams into people's mail boxes. It happens more with current version than the older versions. I would only want it to restart if Exim was running. /usr/local/etc/rc.d/exim gets spamd running again, but it also seems /usr/bin/spamd -d -c -m 15 works because the spamd tags appear in the incoming email headers after that, and then it also wouldn't interfere with email being downloaded, so users wouldn't get a password prompt in Outlook, as is the case any time Exim goes away while they are checking or downloading E-Mails.

The reason I'm asking here is to make sure that wheel hasn't already been invented before I write a script to check and restart it, or write something in Zabbix to do it. I'll probably check other stuff too such as ClamAV, and if there are any other daemons I should be checking in relation to E-Mail too, such as ClamAV, let me know. Otherwise I'll probably write something like: if exim is running and it's not between this time and that time(some sort of maintenance thing going on at that time); if <some config file exists>; check that daemon is running, if not; start it etc...

Thanks!
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,818
Location
GMT +7.00
Hello,

Actually Directadmin has its own service monitor, which is used for checking services and start them is they are down.
Potentially it can be configured to check spamd as well.

You don't need zabbix for it ;)
 

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
888
I want something that only starts processes if the master process is running. For Zabbix it is built in. I wrote a script and posted a How-To on it here for when I don't want to do it.
 
Top