Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 in this directory. But I already have a 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 file. Which rules are applied?

share|improve this question

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 (

"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."


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

Your Answer


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.