On Thu, Aug 03, 2006 at 12:21:07AM +0100, Mike Bostock wrote: > > I use a default build of sa (i.e. I change absolutely no config > > variables) and the default definitions dir is /usr/share/spamassassin > > running sa-update puts new definitions in *its* default of > > /var/lib/spamassasin/<version number>/updates_spamassassin_org/ > > > Now, am I missing something here? Should I then manually transfer these > > updates to $DEF_RULES_DIR or should I have set $DEF_RULES_DIR to be the > > default path for sa-update and if so how when the path changes with each > > update?
Theo writes: > Nope. You should read http://wiki.apache.org/spamassassin/RuleUpdates :) ...and the wiki says: | After sa-update completes, do I have to move the files somewhere | for them to be used? | No. By default, sa-update and the SpamAssassin modules use the same | location for updates. This means that after a successful update run, | the new rules are available for use. ... Well, this is not entirely true. It is not the SpamAssassin modules that sets a default value for LOCAL_STATE_DIR => '/var/lib' in the SA object, but it is the application program that does it: the spamassassin, sa-update and spamd. Which means that other application programs like amavisd-new or other callers of SA modules won't see the rules updates in /var/lib/spamassasin unless explicitly configured to do so ... ... which is unfortunate, as it would probably not be difficult to change Mail::SpamAssassin to provide a suitable default for LOCAL_STATE_DIR. Please consider this a feature request. Currently, one has two choices: - tell sa-update to place updates in the usual rules directory (which is probably the easiest way): # sa-update --updatedir /usr/local/share/spamassassin - or patch the application. For amavisd-new one may apply: --- amavisd~ Mon Apr 3 16:32:34 2006 +++ amavisd Thu Aug 3 15:13:19 2006 @@ -14562,2 +14562,3 @@ stop_at_threshold => 0, + LOCAL_STATE_DIR => '/var/lib', # DEF_RULES_DIR => '/usr/local/share/spamassassin', Mark