You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Dan Mahoney, System Admin" <da...@prime.gushi.org> on 2010/06/28 19:53:38 UTC
Re: [sa-list] Re: Learning and reporting with spamc in a single
step?
On Mon, 28 Jun 2010, Karsten Bräckelmann wrote:
> On Sun, 2010-06-27 at 16:52 -0400, Dan Mahoney, System Admin wrote:
>> Can spamc do this, or must it be forked to "tee" or something.
>>
>> Ideally I'd like to both report and learn in a single step (such as in a
>> pipe from alpine). I note that spamassassin -r also has the option to
>> learn (by default!), but spamc doesn't for some reason. Or if it does,
>> the manpage neglects to mention it.
>
> Hmm, man spamc shows -L learn type and -C report type right next to each
> other. Yours doesn't?
It shows them top to bottom, but does not say whether they're exclusive or
not. As for the usage summary...
%spamc -V
SpamAssassin Client version 3.2.3
compiled with SSL support (OpenSSL 0.9.7e-p1 25 Oct 2004)
SYNOPSIS
spamc [options] < message
is less than helpful in determining which options work together.
> If you actually can use both options at the same time, I don't know.
> Maybe you wanna try it, and let us know. :)
I wonder what the logs show (or are supposed to show) during these
operations.
-Dan
--
"You're a daddy. I'm a mommy. She's our baby. Deal with it."
-Cali, 11/7/02, about 1:35 AM
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144 AIM: LarpGM
Site: http://www.gushi.org
---------------------------
Re: Learning and reporting with spamc in a single step?
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Mon, 2010-06-28 at 13:53 -0400, Dan Mahoney, System Admin wrote:
> On Mon, 28 Jun 2010, Karsten Bräckelmann wrote:
> > If you actually can use both options at the same time, I don't know.
> > Maybe you wanna try it, and let us know. :)
Ah, having spamc talk to netcat just showed it nicely. Both -L and -C do
use the same TELL command, with a difference in the Set header. While -L
learn is Set: local only, -C report is Set: local,remote.
So, yes, reporting with spamc -C does work the same as spamassassin -r
does. Both also do Bayes training. A quick glimpse through the spamd
code confirms this, btw.
However, as can be trivially observed by just trying it and providing
*both* options, -C and -L, results in an error. Exit code 64, EX_USAGE,
command line usage error.
No need to anyway, as -C report includes -L learn.
> I wonder what the logs show (or are supposed to show) during these
> operations.
Maybe... Try it and watch your logs?
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}