MailScanner's /usr/sbin/update_spammassassin doesn't restart spamd

Mark Sapiro mark at msapiro.net
Sun Nov 16 21:27:00 GMT 2008


/usr/sbin/update_spamassassin runs sa-update and possibly sa-compile
and then reloads MailScanner, but if the site is using spamd, it seems
that spamd should be restarted and isn't.

I made the following change to /usr/sbin/update_spamassassin.

--- /usr/sbin/update_spamassassin.orig  2008-11-01 12:07:02.000000000
-0700
+++ /usr/sbin/update_spamassassin       2008-11-16 13:07:58.000000000
-0800
@@ -28,6 +28,11 @@

 /etc/init.d/MailScanner reload >>$LOGFILE 2>&1

+# If spamd is running, restart it
+if [ -n "$(pidof spamd)" ] ; then
+  /etc/init.d/spamd restart >>$LOGFILE 2>&1
+fi
+
 rm -f $LOGFILE

 exit 0


Is this the right thing to do?

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the MailScanner mailing list