You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by micah <mi...@riseup.net> on 2007/09/16 01:46:02 UTC

sa-compile require a restart afterwards?

I've recently begun running sa-compile in a cronjob after running sa-
update. Its not clear to me if I need to perform a restart of spamd after 
a compile has completed, is this necessary? 

If so, I'm looking for ideas for detecting if there are actually any 
updates from sa-update, and then *only* churning the sa-compile if there 
were updates. As I have it now, I'm running a sa-compile no matter what, 
which is a bit of a waste in and of itself, but if I also have to restart 
spamd then I'm potentially letting some messages sneak through while the 
restart happens. I'd like to minimize this as much as possible.

Micah


Re: sa-compile require a restart afterwards?

Posted by micah <mi...@riseup.net>.
* Daryl C. W. O'Shea <sp...@dostech.ca> [070915 19:26]:
> micah wrote:
>> If so, I'm looking for ideas for detecting if there are actually any 
>> updates from sa-update, and then *only* churning the sa-compile if there 
>> were updates. As I have it now, I'm running a sa-compile no matter what, 
>> which is a bit of a waste in and of itself, but if I also have to restart 
>> spamd then I'm potentially letting some messages sneak through while the 
>> restart happens. I'd like to minimize this as much as possible.
>
> I'd image that the (quite brief) sa-update perldoc will be quite 
> enlightening and answer your question.

I guess I need to change my cronjob to be:

0 2 * * * sa-update --gpgkey D1C035168C1EBC08464946DA258CDB3ABDE9DC10 --channel saupdates.openprotect.com --channel update s.spamassassin.org && sa-compile &>/dev/null && /etc/init.d/spamassassin restart &>/dev/null

Micah

Re: sa-compile require a restart afterwards?

Posted by "Daryl C. W. O'Shea" <sp...@dostech.ca>.
micah wrote:
> I've recently begun running sa-compile in a cronjob after running sa-
> update. Its not clear to me if I need to perform a restart of spamd after 
> a compile has completed, is this necessary?

Yes.  Just like SA doesn't constantly re-read all the rules (or check to 
see if they were modified), it doesn't constantly check to see if the 
rules were re-compiled.


> If so, I'm looking for ideas for detecting if there are actually any 
> updates from sa-update, and then *only* churning the sa-compile if there 
> were updates. As I have it now, I'm running a sa-compile no matter what, 
> which is a bit of a waste in and of itself, but if I also have to restart 
> spamd then I'm potentially letting some messages sneak through while the 
> restart happens. I'd like to minimize this as much as possible.

I'd image that the (quite brief) sa-update perldoc will be quite 
enlightening and answer your question.

Daryl