2

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?

Mr.King
  • 41
  • 6

2 Answers2

0

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

NickW
  • 10,263
  • 1
  • 20
  • 27
  • 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
0

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!

Mr.King
  • 41
  • 6