By user12625760 on Nov 27, 2008
I finally got around to adding dependancies to the smtp (mail) server I am using on my home server so that it depends on both spamassassin and the clam anti virus services. While there is probably a way to do this using individual commands it was much quicker to export the XML edit that and reimport it having added these lines:
<dependency name='spamd' grouping='require_all' restart_on='error' type='service'> <service_fmri value='svc:/network/spamd'/> </dependency> <dependency name='clam' grouping='require_all' restart_on='error' type='service'> <service_fmri value='svc:/network/clam'/> </dependency>
Having refreshed the service and restarted I, it now shows as depending on the other two services:
: pearson FSS 3 $; svcs -d cswexim STATE STIME FMRI online Nov_24 svc:/network/loopback:default online Nov_24 svc:/milestone/name-services:default online Nov_24 svc:/system/filesystem/local:default online Nov_24 svc:/network/clam:default online Nov_26 svc:/network/spamd:default : pearson FSS 4 $;
and any failure of the dependant services results in cswexim being restarted after the dependant service restarts. Depressingly I had found that small amounts of spam could sneak through thanks to exim not depending on spamassasin.