You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Magnus Anderson <ma...@sonic2000.org> on 2007/07/29 13:56:43 UTC

Reporting spam with Spmassassin-run instead of sa-learn

At the moment I run sa-learn for learning new messages as spam/ham. The
problem with this is that it just reports to bayes, not razor2, pyzor, dcc
or spamcop.

It is stated in the spamassassin-run manual that spamassassin-run is for
reporting to these places, and to use sa-learn only if I want to report to
bayes locally.

My problem is that I use a DB for user preferences and different bays DBs
for every user. This works with sa-learn by specifying "-u <username>", but
I can't seem to find this option in the spamassassin command. It defaults as
"root" for me.

So basicly, I want to run the "spamassassin --revoke/--report" commands as a
specific username. How can I do that?
-- 
View this message in context: http://www.nabble.com/Reporting-spam-with-Spmassassin-run-instead-of-sa-learn-tf4165350.html#a11850845
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Reporting spam with Spmassassin-run instead of sa-learn

Posted by bg...@idcomm.com.
Magnus Anderson wrote:
> 
> 
> Martin Schütte wrote:
>> Magnus Anderson schrieb:
>>> So basicly, I want to run the "spamassassin --revoke/--report" commands
>>> as a
>>> specific username. How can I do that?
>> man su
>>
>> For example: su vscan -c "spamassassin --report ${train_dir_sa_spam}/*"
>> (Make sure the user has permission to read the mails.)
>>
> 
> The user is not exisiting on the system itself, just inside CommuniGate that
> I run.
> When I run now I run like "sa-learn --spam --no-sync -u username@domain.com
> /system-path-to-mbox"
> 
> Sorry if I wasn't explaining myself correctly.
>

This can be done with the spamd/spamc tell feature. Adding -l to spamd's
command line and -C report/revoke for learning through spamc. A
report/revoke will do the appropriate bayes stuff even tho the man page
isn't clear that it does bayes in addition to the various reporting methods.


Re: Reporting spam with Spmassassin-run instead of sa-learn

Posted by Martin Schütte <li...@mschuette.name>.
Magnus Anderson schrieb:
> The user is not exisiting on the system itself, just inside CommuniGate that
> I run.
> When I run now I run like "sa-learn --spam --no-sync -u username@domain.com
> /system-path-to-mbox"

AFAIK you cannot tell "spamassassin" to use another bayes DB.

So I see three other options:
- Patch spamassassin and add a new option ;)

- Learn the messages twice: with sa-learn and with spamassassin. That
will leave you with an additional DB in ~root/.spamassassin.

- Use symlinks (ln -s /userdir/with/bayesDb ~root/.spamassassin) to link
the user's DB into root's spamassassin directory.

-- 
Martin

Re: Reporting spam with Spmassassin-run instead of sa-learn

Posted by Magnus Anderson <ma...@sonic2000.org>.


Martin Schütte wrote:
> 
> Magnus Anderson schrieb:
>> So basicly, I want to run the "spamassassin --revoke/--report" commands
>> as a
>> specific username. How can I do that?
> 
> man su
> 
> For example: su vscan -c "spamassassin --report ${train_dir_sa_spam}/*"
> (Make sure the user has permission to read the mails.)
> 

The user is not exisiting on the system itself, just inside CommuniGate that
I run.
When I run now I run like "sa-learn --spam --no-sync -u username@domain.com
/system-path-to-mbox"

Sorry if I wasn't explaining myself correctly.

-- 
View this message in context: http://www.nabble.com/Reporting-spam-with-Spmassassin-run-instead-of-sa-learn-tf4165350.html#a11851371
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Reporting spam with Spmassassin-run instead of sa-learn

Posted by Martin Schütte <li...@mschuette.name>.
Magnus Anderson schrieb:
> So basicly, I want to run the "spamassassin --revoke/--report" commands as a
> specific username. How can I do that?

man su

For example: su vscan -c "spamassassin --report ${train_dir_sa_spam}/*"
(Make sure the user has permission to read the mails.)

-- 
Martin

Re: Reporting spam with Spmassassin-run instead of sa-learn

Posted by Magnus Anderson <ma...@sonic2000.org>.

Matt Kettler-3 wrote:
> 
> Matt Kettler wrote:
>> su -c "username" spamassassin --revoke...
>>
>>
>>   
> Erk, that should be su "username" -c "spamassassin --revoke".. Pardon my
> error.
> 

Please read my reply to Martin Schütte earlier.
-- 
View this message in context: http://www.nabble.com/Reporting-spam-with-Spmassassin-run-instead-of-sa-learn-tf4165350.html#a11931540
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Reporting spam with Spmassassin-run instead of sa-learn

Posted by Matt Kettler <mk...@verizon.net>.
Matt Kettler wrote:
> Magnus Anderson wrote:
>   
>> At the moment I run sa-learn for learning new messages as spam/ham. The
>> problem with this is that it just reports to bayes, not razor2, pyzor, dcc
>> or spamcop.
>>
>> It is stated in the spamassassin-run manual that spamassassin-run is for
>> reporting to these places, and to use sa-learn only if I want to report to
>> bayes locally.
>>
>> My problem is that I use a DB for user preferences and different bays DBs
>> for every user. This works with sa-learn by specifying "-u <username>", but
>> I can't seem to find this option in the spamassassin command. It defaults as
>> "root" for me.
>>
>> So basicly, I want to run the "spamassassin --revoke/--report" commands as a
>> specific username. How can I do that?
>>   
>>     
> su -c "username" spamassassin --revoke...
>
>
>   
Erk, that should be su "username" -c "spamassassin --revoke".. Pardon my
error.




Re: Reporting spam with Spmassassin-run instead of sa-learn

Posted by Matt Kettler <mk...@verizon.net>.
Magnus Anderson wrote:
> At the moment I run sa-learn for learning new messages as spam/ham. The
> problem with this is that it just reports to bayes, not razor2, pyzor, dcc
> or spamcop.
>
> It is stated in the spamassassin-run manual that spamassassin-run is for
> reporting to these places, and to use sa-learn only if I want to report to
> bayes locally.
>
> My problem is that I use a DB for user preferences and different bays DBs
> for every user. This works with sa-learn by specifying "-u <username>", but
> I can't seem to find this option in the spamassassin command. It defaults as
> "root" for me.
>
> So basicly, I want to run the "spamassassin --revoke/--report" commands as a
> specific username. How can I do that?
>   
su -c "username" spamassassin --revoke...