Re: sa-update (sa v 3.1.4)
On Thu, 8/3/2006 11:01:09 -0400 Theo Van Dinter wrote: > > On Thu, Aug 03, 2006 at 10:15:47AM -0400, Will Nordmeyer wrote: > > If I run sa-update without any other parameters, it'll create an update > > dir put the updates in it and spamassassin will use the generated > > updates dir by default (do I need to restart SA, or does sa-update > > handle that?). > > Yes. As for restart, sa-update won't do that for you. > > > If I use the --updatedir parameter I have to go into SA and rewrite it > > to use my updatedir. > > Or otherwise include the new config files in some other way ala in > /etc/mail/spamassassin/local.cf (or a similarly named file): > > include /where/I/want/updates/to/be/channel.cf > > I forgot to mention this in my previous mail, sorry. > > > If I use --updatedir and point it to the SA default rules dir, I'm > > screwed. > > Not screwed, but you'll break some parts of SpamAssassin, yes. The > default rules directory is meant to be written to during installation > and that's it. In the end, you can do what you want with it, but if you > remove critical files, you shouldn't expect things to work correctly. > > > Have I summarized sa-update usage properly? > > Your intimating that sa-update sucks, where IMHO the problems described > here are with its usage and an expectation that the software in general > should DWIM as opposed to DWIS. > > In general, if you don't like how something works, feel free to open a > ticket and provide a patch. :) > Not my intent at all Theo... Just trying to distill it down to something easy. And that is - if you run sa-update and let it make all the decisions about update dirs/etc. Then the updates are easy, simple and everybody happily plays well together. And (to me) yeah - I'm screwed if I decide my update dir is the same as my default rules dir - not because sa-update sucks at all... but because I didn't differentiate between DEFAULT rules and UPDATES. My apologies - sa-update is a wonderful feature, I was quite pleased when I saw it added...
Re: sa-update (sa v 3.1.4)
On Thu, Aug 03, 2006 at 08:56:42AM -0700, Bret Miller wrote: > The Mail::SpamAssassin module doc in 3.1.4 doesn't list local_state_dir > as an option for Mail::SpamAssassin->new. Should it? Is that how an app > is supposed to pass this information? Gah! /me continues cursing JM's addition of local_state_dir So apparently (unbeknownst to me until just now) there isn't a local_state_dir override option that can be passed in, you'd have to set the LOCAL_STATE_DIR macro which will get used ala: '__local_state_dir__/spamassassin/__version__', (where __local_state_dir__ == LOCAL_STATE_DIR, for now) I'll see if I can fix that for 3.1.5 via bug 4952. /me grumbles some more -- Randomly Generated Tagline: "Do not marry a person that you know that you can live with; only marry someone that you cannot live without." - Unknown pgpAsrkLVJsuE.pgp Description: PGP signature
RE: sa-update (sa v 3.1.4)
> On Thu, Aug 03, 2006 at 03:28:05PM +0200, Mark Martinec wrote: > > 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. > > True. > > > 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 ... > > You would want to make sure that the third party application you're > running supports the version of SA you're using, yes. local_state_dir > was an API change from 3.1.0, unfortunately, but it's been known about > for several months now. The Mail::SpamAssassin module doc in 3.1.4 doesn't list local_state_dir as an option for Mail::SpamAssassin->new. Should it? Is that how an app is supposed to pass this information? Bret
Re: sa-update (sa v 3.1.4)
On Thu, Aug 03, 2006 at 03:33:59PM +0100, Mike Bostock wrote: > OK Now I am really confused. Do I assume that SpamAssassin looks in > /var/lib/spamassassin// for rules definitions and not > /usr/share/spamassassin? Right -- if the update directory exists, SA will use that instead of the default rules directory. -- Randomly Generated Tagline: "It was entirely possible to read a Russian novel during the pause between stepping on the gas and feeling any semblance of forward motion." - Unknown about the AMC Gremlin pgpaJjwPdxdwV.pgp Description: PGP signature
Re: sa-update (sa v 3.1.4)
On Thu, Aug 03, 2006 at 10:15:47AM -0400, Will Nordmeyer wrote: > If I run sa-update without any other parameters, it'll create an update > dir put the updates in it and spamassassin will use the generated > updates dir by default (do I need to restart SA, or does sa-update > handle that?). Yes. As for restart, sa-update won't do that for you. > If I use the --updatedir parameter I have to go into SA and rewrite it > to use my updatedir. Or otherwise include the new config files in some other way ala in /etc/mail/spamassassin/local.cf (or a similarly named file): include /where/I/want/updates/to/be/channel.cf I forgot to mention this in my previous mail, sorry. > If I use --updatedir and point it to the SA default rules dir, I'm > screwed. Not screwed, but you'll break some parts of SpamAssassin, yes. The default rules directory is meant to be written to during installation and that's it. In the end, you can do what you want with it, but if you remove critical files, you shouldn't expect things to work correctly. > Have I summarized sa-update usage properly? Your intimating that sa-update sucks, where IMHO the problems described here are with its usage and an expectation that the software in general should DWIM as opposed to DWIS. In general, if you don't like how something works, feel free to open a ticket and provide a patch. :) -- Randomly Generated Tagline: "There's not much you can do to ruin strips of marinated boneless chicken breast sauteed with onions and green peppers." - the Center for Science in the Public Interest about Chicken Fajitas pgp01Ap3UD8VG.pgp Description: PGP signature
Re: sa-update (sa v 3.1.4)
Theo, > > to change Mail::SpamAssassin to provide a suitable default > > for LOCAL_STATE_DIR. Please consider this a feature request. > > http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4952 :) Appreciated! > > # sa-update --updatedir /usr/local/share/spamassassin > > Warning: This will break your installation -- there are files in > def_rules_dir that aren't in the updates, and sa-update will be > happy to delete all of the files in the directory for you. > local_state_dir and def_rules_dir are not interchangeable. Ouch, thanks. Sorry for spreading false suggestions. Mark
Re: sa-update (sa v 3.1.4)
In your message regarding Re: sa-update (sa v 3.1.4) dated Thu, 3 Aug 2006 15:16:42 +0100, Obantec Support said that ... >OS- - Original Message - >OS- From: "Theo Van Dinter" <[EMAIL PROTECTED]> >OS- To: >OS- Sent: Thursday, August 03, 2006 3:01 PM >OS- Subject: Re: sa-update (sa v 3.1.4) >OS- Hi Theo >OS- your right i just ran sa-update and it updated the >OS- /var/lib/spamassassin/3.001003 folder files. >OS- Mark OK Now I am really confused. Do I assume that SpamAssassin looks in /var/lib/spamassassin// for rules definitions and not /usr/share/spamassassin? -- Mike
Re: sa-update (sa v 3.1.4)
- Original Message - From: "Theo Van Dinter" <[EMAIL PROTECTED]> To: Sent: Thursday, August 03, 2006 3:01 PM Subject: Re: sa-update (sa v 3.1.4) Hi Theo your right i just ran sa-update and it updated the /var/lib/spamassassin/3.001003 folder files. Mark
Re: sa-update (sa v 3.1.4)
On Thu, Aug 03, 2006 at 10:01:26 -0400 Theo Van Dinter <[EMAIL PROTECTED]> wrote: > Generally speaking, unless the defaults don't work for you for some > reason, stick with the defaults. > So, what I'm concluding is... If I run sa-update without any other parameters, it'll create an update dir put the updates in it and spamassassin will use the generated updates dir by default (do I need to restart SA, or does sa-update handle that?). If I use the --updatedir parameter I have to go into SA and rewrite it to use my updatedir. If I use --updatedir and point it to the SA default rules dir, I'm screwed. Have I summarized sa-update usage properly?
Re: sa-update (sa v 3.1.4)
On Thu, Aug 03, 2006 at 02:47:28PM +0100, Obantec Support wrote: > i am using sa3.1.3 and first run of sa-update --updatedr > /var/lib/spamassassin got me > > drwxr-xr-x 3 root root 4096 Jul 22 14:18 /var/lib/spamassassin/3.001003 > which contains > drwxr-xr-x 2 root root 4096 Jul 22 14:18 updates_spamassassin_org > -rw-r--r-- 1 root root 2151 Jul 22 14:18 updates_spamassassin_org.cf This is what happens if you don't pass updatedir (updates go into /var/lib/spamassassin/). So I think your statement is incorrect (about using updatedir). > run today sa-update --updatedr /var/lib/spamassassin > > drwxr-xr-x 3 root root 4096 Jul 22 14:18 3.001003 > drwxr-xr-x 2 root root 4096 Aug 3 14:38 updates_spamassassin_org > -rw-r--r-- 1 root root 2151 Aug 3 14:38 updates_spamassassin_org.cf As above, this is what you get if you use updatedir. > i.e. put the udates above the current version directory. > once the 3.001003 is created should i add it to the updatedr path? I don't understand why you're using updatedir. By aiming at a different directory than the default, SpamAssassin won't find the new rules unless you somehow tell SpamAssassin to look there (which requires code changes). Generally speaking, unless the defaults don't work for you for some reason, stick with the defaults. -- Randomly Generated Tagline: The descent to Hades is the same from every place. -- Anaxagoras pgpnqBG2lv6ay.pgp Description: PGP signature
Re: sa-update (sa v 3.1.4)
On Thu, Aug 03, 2006 at 03:28:05PM +0200, Mark Martinec wrote: > 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. True. > 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 ... You would want to make sure that the third party application you're running supports the version of SA you're using, yes. local_state_dir was an API change from 3.1.0, unfortunately, but it's been known about for several months now. > ... 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. http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4952 :) > - tell sa-update to place updates in the usual rules directory > (which is probably the easiest way): > > # sa-update --updatedir /usr/local/share/spamassassin Warning: This will break your installation -- there are files in def_rules_dir that aren't in the updates, and sa-update will be happy to delete all of the files in the directory for you. local_state_dir and def_rules_dir are not interchangeable. -- Randomly Generated Tagline: "Security is mostly a superstition. It does not exist in nature, nor do the children of men as a whole experience it. Avoiding danger is no safer in the long run than outright exposure. Life is either a daring adventure, or nothing." - Helen Keller pgpUPhz5mCEKE.pgp Description: PGP signature
Re: sa-update (sa v 3.1.4)
- Original Message - From: "Mark Martinec" <[EMAIL PROTECTED]> To: Sent: Thursday, August 03, 2006 2:28 PM Subject: Re: sa-update (sa v 3.1.4) > 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//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 > Hi i am using sa3.1.3 and first run of sa-update --updatedr /var/lib/spamassassin got me drwxr-xr-x 3 root root 4096 Jul 22 14:18 /var/lib/spamassassin/3.001003 which contains drwxr-xr-x 2 root root 4096 Jul 22 14:18 updates_spamassassin_org -rw-r--r-- 1 root root 2151 Jul 22 14:18 updates_spamassassin_org.cf run today sa-update --updatedr /var/lib/spamassassin and it created drwxr-xr-x 3 root root 4096 Jul 22 14:18 3.001003 drwxr-xr-x 2 root root 4096 Aug 3 14:38 updates_spamassassin_org -rw-r--r-- 1 root root 2151 Aug 3 14:38 updates_spamassassin_org.cf i.e. put the udates above the current version directory. once the 3.001003 is created should i add it to the updatedr path? Mark -- Obantec Support
Re: sa-update (sa v 3.1.4)
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//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
Re: sa-update (sa v 3.1.4)
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 Right. > running sa-update puts new definitions in *its* default of > /var/lib/spamassasin//updates_spamassassin_org/ Right. > 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? Nope. You should read http://wiki.apache.org/spamassassin/RuleUpdates :) -- Randomly Generated Tagline: Two wrongs don't make a right, but three lefts do. pgptKna91w2iz.pgp Description: PGP signature