You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Jean-Edouard Babin <ra...@gmail.com> on 2008/01/17 13:06:23 UTC

Problem with sa-learn and virtual user

Hi,
My mail system use virtual user.
I use spamd like this
spamd --virtual-config-dir=/srv/spamassassin/%d/%l -x -u dovecot -c -i
127.0.0.1 -d -r /var/run/spamd.pid
I run spamc with
/usr/pkg/bin/spamc -u ${recipient} -f -e ...

This work fine, each user can use it's own sa config.

But i would like to be able to run sa-learn for spefic users

I tryed sa-lean --username user@domaine.tld --spam files

But as I can see with debug (-D) it use bayes file of the unix user running
the command.

So i'm wondering how i sould do, I'm especially wondering how sa-learn can
now that it should use /srv/spamassassin/%d/%l for bayes file but did not
find the answer.

Re: Problem with sa-learn and virtual user

Posted by Jean-Edouard Babin <ra...@gmail.com>.
On Jan 17, 2008 2:31 PM, Matt Kettler <mk...@verizon.net> wrote:

> Jean-Edouard Babin wrote:
> > Hi,
> >
> > My mail system use virtual user.
> > I use spamd like this
> > spamd --virtual-config-dir=/srv/spamassassin/%d/%l -x -u dovecot -c -i
> > 127.0.0.1 <http://127.0.0.1> -d -r /var/run/spamd.pid
> > I run spamc with
> > /usr/pkg/bin/spamc -u ${recipient} -f -e ...
> >
> > This work fine, each user can use it's own sa config.
> >
> > But i would like to be able to run sa-learn for spefic users
> >
> > I tryed sa-lean --username user@domaine.tld <ma...@domaine.tld>
> > --spam files
> >
> > But as I can see with debug (-D) it use bayes file of the unix user
> > running the command.
> Yes, the --username in sa-learn *ONLY* works with SQL backends, as per
> the docs.
>

Yes thanks, that what i see in the doc after upgrading


> >
> > So i'm wondering how i sould do, I'm especially wondering how sa-learn
> > can now that it should use /srv/spamassassin/%d/%l for bayes file but
> > did not find the answer.
> >
> you'd have to use the --dbpath option to over-ride SA's default idea of
> where the bayes database lives.
>

Ok, -p seem to be fine also, but it's of course a less automatic solution.

thanks,

Re: Problem with sa-learn and virtual user

Posted by Matt Kettler <mk...@verizon.net>.
Jean-Edouard Babin wrote:
> Hi,
>
> My mail system use virtual user.
> I use spamd like this
> spamd --virtual-config-dir=/srv/spamassassin/%d/%l -x -u dovecot -c -i 
> 127.0.0.1 <http://127.0.0.1> -d -r /var/run/spamd.pid 
> I run spamc with
> /usr/pkg/bin/spamc -u ${recipient} -f -e ...
>
> This work fine, each user can use it's own sa config.
>
> But i would like to be able to run sa-learn for spefic users
>
> I tryed sa-lean --username user@domaine.tld <ma...@domaine.tld> 
> --spam files
>
> But as I can see with debug (-D) it use bayes file of the unix user 
> running the command.
Yes, the --username in sa-learn *ONLY* works with SQL backends, as per 
the docs.
>
> So i'm wondering how i sould do, I'm especially wondering how sa-learn 
> can now that it should use /srv/spamassassin/%d/%l for bayes file but 
> did not find the answer.
>
you'd have to use the --dbpath option to over-ride SA's default idea of 
where the bayes database lives.


Re: Problem with sa-learn and virtual user

Posted by Jonathan Armitage <jo...@hepworthband.co.uk>.
Jean-Edouard Babin wrote:
> On Jan 17, 2008 1:38 PM, Jonathan Armitage <jo...@hepworthband.co.uk>
> wrote:
> 
>> Jean-Edouard Babin wrote:
>>> But i would like to be able to run sa-learn for spefic users
>>>
>>> I tryed sa-lean --username user@domaine.tld --spam files
>>>
>>> But as I can see with debug (-D) it use bayes file of the unix user
>> running
>>> the command.
>>>
>> Try su - username -c "sa-learn --spam spamdir"
>>
>> Jon
>>
> 
> User are virtual.
> 
I think there is another way, but can't remember offhand.

Look back through the mailing list. It was discussed a few months ago.

Jon