Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I use amavisd-new 2.6.5 and SpamAssassin 3.2.2 (on ubuntu 12.04). I just ran for the first time the sa-update command. I see that there is new files in */var/lib/spamassassin/3.003002/updates_spamassassin_org/* . And a local.cf in this directory. But I already have a local.cf in the /etc/spamassassin/ .

Which configuration is loaded?

Edit : I found this in /usr/sbin/spamd :

my $DEF_RULES_DIR   = '/usr/share/spamassassin';
my $LOCAL_RULES_DIR = '/etc/spamassassin';
my $LOCAL_STATE_DIR = '/var/lib/spamassassin';

Old rules are in /usr/share/spamassassin and new rules in /var/lib/spamassassin . And in these 3 directories, there is a local.cf file. Which rules are applied?

share|improve this question

2 Answers 2

The configuration that is specified by the script that starts spamassassin will be the script that is loaded.

share|improve this answer
    
I add an edit part in my question. I still don't understand which rules are loaded now. –  Mr.King Apr 10 '13 at 11:57
    
What is happening, is usually the update procedure brings down files that need to be updated, then the rules remain there, if the local .cf has changed, it should be moved by spamassassin itself to the /etc directory. Try running sa-update -D that way you can see the steps that it runs through. –  NickW Apr 10 '13 at 12:05
up vote 0 down vote accepted

Yes! I found my own answer!

In the spamassassin documentation (http://wiki.apache.org/spamassassin/WritingRules):

"When you upgrade SA (and you should do so somewhat regularly), all the existing rules in /usr/share/spamassassin will be deleted and replaced by the new default ruleset."

Thanks!

share|improve this answer
    
Nice to see you found a definitive answer! –  NickW Apr 15 '13 at 11:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.