You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Evan Platt <ev...@espphotography.com> on 2006/01/19 19:59:46 UTC
sa-learn done as root.
Hello all.. Novice SA Admin here (well, none of my users complain - wait..
I have none, just me). I recently read something that says sa-learn is
learned for the user who runs sa-learn. I've always run sa-learn as root.
Is there a easy way to copy the contents of what's been learned from root
to my user?
I did read through the sa-learn doc, but maybe the way I'm wording it
isn't how it's worded in the docs.
Thanks.
Evan
Re: sa-learn done as root.
Posted by Evan Platt <ev...@espphotography.com>.
On Thu, January 19, 2006 11:21 am, Jim Maul wrote:
> I dont know what version of SA the OP is running but note that 2.64 has
> no -u parameter so you can not pass the username on the command line.
D'Oh. Forgot that part. 3.1.0. :)
Evan
Re: sa-learn done as root.
Posted by Jim Maul <jm...@elih.org>.
Mike Jackson wrote:
>> Hello all.. Novice SA Admin here (well, none of my users complain -
>> wait..
>> I have none, just me). I recently read something that says sa-learn is
>> learned for the user who runs sa-learn. I've always run sa-learn as root.
>> Is there a easy way to copy the contents of what's been learned from root
>> to my user?
>>
>> I did read through the sa-learn doc, but maybe the way I'm wording it
>> isn't how it's worded in the docs.
>
> If it's saved in an SQL database, I imagine you could do a simple UPDATE
> query to change the username, like...
>
> UPDATE bayes_vars SET username='username' WHERE username='root';
>
> (Apologies if that's MySQL-specific. It's what I use.)
>
> If you're not using SQL, you could follow the instructions to do a
> backup and restore of the database, which would go something like this...
>
> sa-learn --backup > /tmp/file.txt
> sa-learn -u username --restore=/tmp/file.txt
>
> Then, in the future, just add "-u username" to your sa-learn command
> line to learn as the desired username rather than root.
>
>
I dont know what version of SA the OP is running but note that 2.64 has
no -u parameter so you can not pass the username on the command line.
-Jim
Re: sa-learn done as root.
Posted by Evan Platt <ev...@espphotography.com>.
On Thu, January 19, 2006 11:14 am, Mike Jackson wrote:
> If it's saved in an SQL database, I imagine you could do a simple UPDATE
> query to change the username, like...
>
> UPDATE bayes_vars SET username='username' WHERE username='root';
>
> (Apologies if that's MySQL-specific. It's what I use.)
I don't use SQL for SA - is there an advantage (ie speed) in doing so, or
a disadvantage?
> If you're not using SQL, you could follow the instructions to do a backup
> and restore of the database, which would go something like this...
>
> sa-learn --backup > /tmp/file.txt
> sa-learn -u username --restore=/tmp/file.txt
>
> Then, in the future, just add "-u username" to your sa-learn command line
> to
> learn as the desired username rather than root.
It doesn't appear that I'm using SQL, as I don't see any database entries.
Running the --backup command, and then grepping the file.txt, I see:
v 3 db_version # this must be the first line!!!
v 412 num_spam
v 2145 num_nonspam
t 1 0 1122461946 43da1d3f27
t 1 0 1111629865 803e78e189
t 1 0 1111743100 e670eeddbf
t 2 0 1122630499 d607b2b6db
t 0 1 1104779201 860d2c6001
<SNIP>
so I assume that's correct.
Thanks again.
Evan
Re: sa-learn done as root.
Posted by Mike Jackson <mj...@barking-dog.net>.
> Hello all.. Novice SA Admin here (well, none of my users complain - wait..
> I have none, just me). I recently read something that says sa-learn is
> learned for the user who runs sa-learn. I've always run sa-learn as root.
> Is there a easy way to copy the contents of what's been learned from root
> to my user?
>
> I did read through the sa-learn doc, but maybe the way I'm wording it
> isn't how it's worded in the docs.
If it's saved in an SQL database, I imagine you could do a simple UPDATE
query to change the username, like...
UPDATE bayes_vars SET username='username' WHERE username='root';
(Apologies if that's MySQL-specific. It's what I use.)
If you're not using SQL, you could follow the instructions to do a backup
and restore of the database, which would go something like this...
sa-learn --backup > /tmp/file.txt
sa-learn -u username --restore=/tmp/file.txt
Then, in the future, just add "-u username" to your sa-learn command line to
learn as the desired username rather than root.