MailScanner's /usr/sbin/update_spammassassin doesn't
restartspamd
Mark Sapiro
mark at msapiro.net
Sun Nov 16 23:02:01 GMT 2008
Alex Broens wrote:
>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
It doesn't seem to make much difference. Here are the log messages from
/etc/init.d/spamd restart
Nov 16 13:06:01 sbh16 spamd[10751]: spamd: server killed by SIGTERM,
shutting down
Nov 16 13:06:13 sbh16 spamd[11237]: spamd: server started on port
783/tcp (running version 3.2.5)
Nov 16 13:06:13 sbh16 spamd[11237]: spamd: server pid: 11237
Nov 16 13:06:13 sbh16 spamd[11237]: spamd: server successfully spawned
child process, pid 11246
Nov 16 13:06:13 sbh16 spamd[11237]: spamd: server successfully spawned
child process, pid 11247
and here are the ones from
kill -s SIGHUP `cat /var/run/spamd.pid`
Nov 16 14:40:15 sbh16 spamd[11237]: spamd: server hit by SIGHUP,
restarting
Nov 16 14:40:15 sbh16 spamd[11237]: spamd: child 11247 killed
successfully
Nov 16 14:40:15 sbh16 spamd[11237]: spamd: child 11246 killed
successfully
Nov 16 14:40:24 sbh16 spamd[12643]: spamd: server started on port
783/tcp (running version 3.2.5)
Nov 16 14:40:24 sbh16 spamd[12643]: spamd: server pid: 12643
Nov 16 14:40:24 sbh16 spamd[12643]: spamd: server successfully spawned
child process, pid 12647
Nov 16 14:40:24 sbh16 spamd[12643]: spamd: server successfully spawned
child process, pid 12648
Perhaps there is some savings, but it appears to be minimal.
--
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