You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by micah anderson <mi...@riseup.net> on 2020/05/16 14:16:50 UTC

spamc learning/reporting

Hi,

I noticed a few oddities with 'spamc':

1. I cannot pass a full email address to -u, if I pass 'user' it works,
but if I pass 'user@example.com' it fails. How do people handle this
with multiple domains?

2. I cannot pass -C report and -L spam at the same time. If I do, I get
this message:

spamc: Learning excludes reporting to collaborative filtering databases

and an exit code 64, which is:

EX_USAGE        64  command line usage error

however, there is nothing in the manual that says these cannot both be
passed, and it seems like I should be able to do both at once, instead
of having to invoke spamc twice, once to adjust the bayes, and once to
report to pyzor/razor.


-- 
        micah

Re: spamc learning/reporting

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 16.05.20 10:16, micah anderson wrote:
>I noticed a few oddities with 'spamc':
>
>1. I cannot pass a full email address to -u, if I pass 'user' it works,
>but if I pass 'user@example.com' it fails. How do people handle this
>with multiple domains?

i guess this needs proper option for spamd, "-q", "-Q", "--ldap-config",
"--setuid-with-ldap" or "--virtual-config-dir=dir"
see man spamd

>2. I cannot pass -C report and -L spam at the same time. If I do, I get
>this message:
>
>spamc: Learning excludes reporting to collaborative filtering databases
>
>and an exit code 64, which is:
>
>EX_USAGE        64  command line usage error
>
>however, there is nothing in the manual that says these cannot both be
>passed, and it seems like I should be able to do both at once, instead
>of having to invoke spamc twice, once to adjust the bayes, and once to
>report to pyzor/razor.

this is unfortunate. 
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Honk if you love peace and quiet.

Re: spamc learning/reporting

Posted by micah anderson <mi...@riseup.net>.
RW <rw...@googlemail.com> writes:

>> 2. I cannot pass -C report and -L spam at the same time. If I do, I
>> get this message:
>> 
>> spamc: Learning excludes reporting to collaborative filtering
>> databases
>> 
>> and an exit code 64, which is:
>> 
>> EX_USAGE        64  command line usage error
>> 
>> however, there is nothing in the manual that says these cannot both be
>> passed, and it seems like I should be able to do both at once, instead
>> of having to invoke spamc twice, once to adjust the bayes, and once to
>> report to pyzor/razor.
>
> With  'spamassassin -r', reporting implies automatically training
> Bayes (controlled by bayes_learn_during_report). IIWY I'd check that -C
> report doesn't do the same thing.

But `spamassassin -r` is different than `spamc -C report` isn't it?

I've been staring at the spamc code, but I'm not skilled enough here to
understand if -C report means it also learns.

I'd really like to know if I'm feeding the bayes database, or just
pyzor.


-- 
        micah

Re: spamc learning/reporting

Posted by RW <rw...@googlemail.com>.
On Sat, 16 May 2020 10:16:50 -0400
micah anderson wrote:

> Hi,
> 
> I noticed a few oddities with 'spamc':
> 
> 1. I cannot pass a full email address to -u, if I pass 'user' it
> works, but if I pass 'user@example.com' it fails. How do people
> handle this with multiple domains?

One way of doing it is to specify 

  spamd  --virtual-config-dir=<pattern>

this tells spamd how to parse the username to find a virtual home
directory that is treated like ~/.spamassassin is for unix users. 

I've not tried it with SQL.   

> 2. I cannot pass -C report and -L spam at the same time. If I do, I
> get this message:
> 
> spamc: Learning excludes reporting to collaborative filtering
> databases
> 
> and an exit code 64, which is:
> 
> EX_USAGE        64  command line usage error
> 
> however, there is nothing in the manual that says these cannot both be
> passed, and it seems like I should be able to do both at once, instead
> of having to invoke spamc twice, once to adjust the bayes, and once to
> report to pyzor/razor.

With  'spamassassin -r', reporting implies automatically training
Bayes (controlled by bayes_learn_during_report). IIWY I'd check that -C
report doesn't do the same thing.

Re: spamc learning/reporting

Posted by "@lbutlr" <kr...@kreme.com>.

> On 17 May 2020, at 10:07, Grant Taylor <gt...@tnetconsulting.net> wrote:
> 
> On 5/16/20 8:16 AM, micah anderson wrote:
>> 1. I cannot pass a full email address to -u, if I pass 'user' it works, but if I pass 'user@example.com' it fails. How do people handle this with multiple domains?
> 
> It's been about 15 years, but I'd swear that I had full email address working like that.  Though I was pulling the entries from an SQL database.

It does work, but you have to tell spamc/spamd about the database, otherwise -u/--username is looking for a local user with a normal home folder.



-- 
'There's a kind of magic in masks. Masks conceal one face, but reveal
	another. The one that only comes out in darkness. I bet you could
	do just what you liked, behind a mask...?' —Maskerade



Re: spamc learning/reporting

Posted by Grant Taylor <gt...@tnetconsulting.net>.
On 5/16/20 8:16 AM, micah anderson wrote:
> 1. I cannot pass a full email address to -u, if I pass 'user' it works, 
> but if I pass 'user@example.com' it fails. How do people handle this 
> with multiple domains?

It's been about 15 years, but I'd swear that I had full email address 
working like that.  Though I was pulling the entries from an SQL database.



-- 
Grant. . . .
unix || die