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

Alex Broens ms-list at alexb.ch
Sun Nov 16 21:40:13 GMT 2008


On 11/16/2008 10:27 PM, Mark Sapiro wrote:
> /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?

dunno about the MS patch but suggest you HUP spamd so it only reloads 
the rules instead of having to restart completely

Alex



More information about the MailScanner mailing list