LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   spamassassin sa-update does not update the rules in /usr/share/spamassassin (http://www.linuxquestions.org/questions/linux-server-73/spamassassin-sa-update-does-not-update-the-rules-in-usr-share-spamassassin-807843/)

Ladowny 05-14-2010 10:46 AM

spamassassin sa-update does not update the rules in /usr/share/spamassassin
 
Hi

I have spamassassin installed some time ago. It's debian package version, default install, just enabled it in /etc/default/spamassassin and also enabled sa-update cron job.

The cronjob executes just fine and updates rules in /var/lib/spamassassin/3.002005/updates_spamassassin_org - the problem is that spamassassin uses rules from /usr/share/spamassassin .

the manual for sa-update says
Quote:

/By default, sa-update (and spamassassin) expect to find updates in the /var/lib/spamassassin/<spamassassin version> directory,
Which seems to be true true for sa-update only

I solved the problem by copying rules from /var/lib/spamassassin/3.002005/updates_spamassassin_org to /usr/share/spamassassin , but I'm looking for a neat solution that would automate the update process. I'd rather not use script to copy files, as at some point this may break my spamassassin install if they change something I cannot forsee now.

bathory 05-14-2010 11:07 AM

Quote:

I solved the problem by copying rules from /var/lib/spamassassin/3.002005/updates_spamassassin_org to /usr/share/spamassassin ,
Wrong move.
If spamassassin finds /var/lib/spamassassin/<version-number>/updates_spamassassin_org it uses that instead of /usr/share/spamassassin
So don't touch anything. You may delete /usr/share/spamassassin if you want.

Regards

Ladowny 05-14-2010 12:01 PM

Thanks. Wasn't sure if I can delete that, but now I did and SA works fine. For some reason new installation of SA Debian package creates this folder but rules in it are not updated.

Just checked on a Suse box and it looks the same. Is there a way of finding out which rules is SA actually using ? Mine was using the ones from /usr/share/spamassassin/ untill I deleted the folder

bathory 05-14-2010 03:10 PM

Quote:

Is there a way of finding out which rules is SA actually using ? Mine was using the ones from /usr/share/spamassassin/ untill I deleted the folder
You can use:
Code:

spamassassin -D --lint
How did you know that SA used the rules from /usr/share/spamassassin before?


All times are GMT -5. The time now is 05:05 PM.