You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Marc Ferguson <ma...@fergytech.net> on 2008/05/11 09:13:28 UTC

How do I Test SpamAssassin

Hi,

I looked on the wiki to see how do I test my installation of
spamassassin.  I'm confused because it's not really giving me a method
that works right out-of-the-box.  It looks like the preferred method is
The GTUBE.  Based on that page it looks like I would use an external
mail client, such as Gmail, Yahoo, or anything else besides my local
desktop email client - and send mail to myself making sure a specific
68-byte string is in the body of the email.

My results have been that Gmail won't send it because their spam filter
recognizes it.  I've tried Yahoo and they did the same thing.  I'm a
regular user and I'm trying to apply this to my evolution application.
Thanks for any clarification.

Marc F.

Re: How do I Test SpamAssassin

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
> > > I am a total newb to spamassassin and some network tools you mentioned
> > > so I don't know how to do what you suggested.  I looked up spamc and I
> > > see it's the client to spamd, but I didn't understand fully what I read.
> > 
> > By this I assume that you are using "spamassassin" directly and not
> > "spamc".  (That's okay.  I use "spamassassin" directly too. :-)  The
> > two are almost the same thing in functionality.  In which case you can
> > translate that instruction into feed the message into spamassassin.

I seriously hope Marc is simply using the provided SA Junk plugin. :)
In which case he actually does use spamc. But does *not* need to know
about how spamc/d interacts, or about command line options.


> > You can also tell if spamassassin is working by the presence of X-Spam
> > headers in the processed messages.  If the header is there then
> > spamassassin is processing the message.  If not then it isn't.

Unfortunately, this does not apply. Evolution does not alter the already
fetched mail that merely is being processed with local (client!)
filters. These headers are not being added.

Keep in mind we are talking SA usage by the *MUA*.


> > One very large lever is the Bayes engine.  But it needs 200 spam
> > messages and 200 non-spam messages before it will have enough history
> > to add to the scoring.  You can see how many messages have been
> > processed using sa-learn like this:
> > 
> >   sa-learn --dump magic
> 
> Not top replying is goiing to be a tough thing to get used to.  I did
> the magic dump and this is my result.

Thanks! Please keep it up. :)  And btw, while moving the cursor down the
mail, you can reply inline where appropriate and snip unnecessary
parts. ;)

> [marc@localhost ~]$ sa-learn --dump magic
> 0.000          0          3          0  non-token data: bayes db
> version
> 0.000          0       1312          0  non-token data: nspam
> 0.000          0        693          0  non-token data: nham

Bayes works.

  guenther


-- 
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; }}}


Re: How do I Test SpamAssassin

Posted by Marc Ferguson <ma...@fergytech.net>.
On Fri, 2008-05-16 at 22:10 -0600, Bob Proulx wrote:

> Please don't top-post.  It makes it much harder to read.
> 
> Marc Ferguson wrote:
> > Arvid Ephraim Picciani wrote:
> > > just use spamc and feed a message manually, unless you want to
> > > test your MTA, in which case you need to check the manual of your
> > > mta.  You can as well just send a message to yourself using telnet
> > > from your home computer. a properly setup spamfilter will match
> > > XBL, no matter the content of your message.
> >
> > I am a total newb to spamassassin and some network tools you mentioned
> > so I don't know how to do what you suggested.  I looked up spamc and I
> > see it's the client to spamd, but I didn't understand fully what I read.
> 
> By this I assume that you are using "spamassassin" directly and not
> "spamc".  (That's okay.  I use "spamassassin" directly too. :-)  The
> two are almost the same thing in functionality.  In which case you can
> translate that instruction into feed the message into spamassassin.
> 
> You can also tell if spamassassin is working by the presence of X-Spam
> headers in the processed messages.  If the header is there then
> spamassassin is processing the message.  If not then it isn't.
> 
> > Besides testing to see if spamassassin is working I wanted to increase
> > the filters.  I don't know if i'm saying it right.  Mail does go to my
> > junk box but i'd like more mail in my junkbox.  I do not have full
> > control over my mail server.  Thanks.
> 
> One very large lever is the Bayes engine.  But it needs 200 spam
> messages and 200 non-spam messages before it will have enough history
> to add to the scoring.  You can see how many messages have been
> processed using sa-learn like this:
> 
>   sa-learn --dump magic
> 
> Bob
> 
> 

Not top replying is goiing to be a tough thing to get used to.  I did
the magic dump and this is my result.

[marc@localhost ~]$ sa-learn --dump magic
0.000          0          3          0  non-token data: bayes db version
0.000          0       1312          0  non-token data: nspam
0.000          0        693          0  non-token data: nham
0.000          0     112435          0  non-token data: ntokens
0.000          0 1180964576          0  non-token data: oldest atime
0.000          0 1210998882          0  non-token data: newest atime
0.000          0 1210992306          0  non-token data: last journal
sync atime
0.000          0          0          0  non-token data: last expiry
atime
0.000          0          0          0  non-token data: last expire
atime delta
0.000          0          0          0  non-token data: last expire
reduction count
[marc@localhost ~]$ 

Marc F.

Re: How do I Test SpamAssassin

Posted by Bob Proulx <bo...@proulx.com>.
Please don't top-post.  It makes it much harder to read.

Marc Ferguson wrote:
> Arvid Ephraim Picciani wrote:
> > just use spamc and feed a message manually, unless you want to
> > test your MTA, in which case you need to check the manual of your
> > mta.  You can as well just send a message to yourself using telnet
> > from your home computer. a properly setup spamfilter will match
> > XBL, no matter the content of your message.
>
> I am a total newb to spamassassin and some network tools you mentioned
> so I don't know how to do what you suggested.  I looked up spamc and I
> see it's the client to spamd, but I didn't understand fully what I read.

By this I assume that you are using "spamassassin" directly and not
"spamc".  (That's okay.  I use "spamassassin" directly too. :-)  The
two are almost the same thing in functionality.  In which case you can
translate that instruction into feed the message into spamassassin.

You can also tell if spamassassin is working by the presence of X-Spam
headers in the processed messages.  If the header is there then
spamassassin is processing the message.  If not then it isn't.

> Besides testing to see if spamassassin is working I wanted to increase
> the filters.  I don't know if i'm saying it right.  Mail does go to my
> junk box but i'd like more mail in my junkbox.  I do not have full
> control over my mail server.  Thanks.

One very large lever is the Bayes engine.  But it needs 200 spam
messages and 200 non-spam messages before it will have enough history
to add to the scoring.  You can see how many messages have been
processed using sa-learn like this:

  sa-learn --dump magic

Bob

Re: How do I Test SpamAssassin

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 16.05.08 21:22, Marc Ferguson wrote:
> I am a total newb to spamassassin and some network tools you mentioned
> so I don't know how to do what you suggested.  I looked up spamc and I
> see it's the client to spamd, but I didn't understand fully what I read.
> 
> Besides testing to see if spamassassin is working I wanted to increase
> the filters.  I don't know if i'm saying it right.  Mail does go to my
> junk box but i'd like more mail in my junkbox.  I do not have full
> control over my mail server.  Thanks.

first you should discuss this with your ISP. If their people know SA, they
may help you how to increase eficiency. if they run spamd using per-user
config files, setting up nice config file might be enough for you.
-- 
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.
"One World. One Web. One Program." - Microsoft promotional advertisement
"Ein Volk, ein Reich, ein Fuhrer!" - Adolf Hitler

Re: How do I Test SpamAssassin

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
> I am a total newb to spamassassin and some network tools you mentioned
> so I don't know how to do what you suggested.  I looked up spamc and I
> see it's the client to spamd, but I didn't understand fully what I
> read.
> 
> Besides testing to see if spamassassin is working I wanted to increase
> the filters.  I don't know if i'm saying it right.

Are you talking about increasing the score of particular rules? I would
not advice to change the defaults, unless you are familiar with SA and
know what you are doing.

> Mail does go to my junk box but i'd like more mail in my junkbox.  I
> do not have full control over my mail server.  Thanks.

So the original question is solved. It works. :)

See my other post, and enable network tests. They are off by default for
performance reasons.

  guenther


-- 
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; }}}


Re: How do I Test SpamAssassin

Posted by Marc Ferguson <ma...@fergytech.net>.
Hi,

I am a total newb to spamassassin and some network tools you mentioned
so I don't know how to do what you suggested.  I looked up spamc and I
see it's the client to spamd, but I didn't understand fully what I read.

Besides testing to see if spamassassin is working I wanted to increase
the filters.  I don't know if i'm saying it right.  Mail does go to my
junk box but i'd like more mail in my junkbox.  I do not have full
control over my mail server.  Thanks.

On Sun, 2008-05-11 at 11:32 +0200, Arvid Ephraim Picciani wrote:

> On Sunday 11 May 2008 09:13:28 Marc Ferguson wrote:
> > Hi,
> >
> > I looked on the wiki to see how do I test my installation of
> > spamassassin.  I'm confused because it's not really giving me a method
> > that works right out-of-the-box.  It looks like the preferred method is
> > The GTUBE.  Based on that page it looks like I would use an external
> > mail client, such as Gmail, Yahoo, or anything else besides my local
> > desktop email client - and send mail to myself making sure a specific
> > 68-byte string is in the body of the email.
> >
> > My results have been that Gmail won't send it because their spam filter
> > recognizes it.  I've tried Yahoo and they did the same thing.  I'm a
> > regular user and I'm trying to apply this to my evolution application.
> > Thanks for any clarification.
> >
> > Marc F.
> 
> 
> just use spamc and feed a message manually, unless you want to test your MTA, 
> in which case you need to check the manual of your mta.
> You can as well just send a message to yourself using telnet from your home 
> computer. a properly setup spamfilter will match XBL, no matter the content 
> of your message.

Marc F.

Re: How do I Test SpamAssassin

Posted by Arvid Ephraim Picciani <ae...@ibcsolutions.de>.
On Sunday 11 May 2008 09:13:28 Marc Ferguson wrote:
> Hi,
>
> I looked on the wiki to see how do I test my installation of
> spamassassin.  I'm confused because it's not really giving me a method
> that works right out-of-the-box.  It looks like the preferred method is
> The GTUBE.  Based on that page it looks like I would use an external
> mail client, such as Gmail, Yahoo, or anything else besides my local
> desktop email client - and send mail to myself making sure a specific
> 68-byte string is in the body of the email.
>
> My results have been that Gmail won't send it because their spam filter
> recognizes it.  I've tried Yahoo and they did the same thing.  I'm a
> regular user and I'm trying to apply this to my evolution application.
> Thanks for any clarification.
>
> Marc F.


just use spamc and feed a message manually, unless you want to test your MTA, 
in which case you need to check the manual of your mta.
You can as well just send a message to yourself using telnet from your home 
computer. a properly setup spamfilter will match XBL, no matter the content 
of your message.
-- 
best regards/Mit freundlichen Grüßen
Arvid Ephraim Picciani

Evolution (was: Re: How do I Test SpamAssassin)

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
> My results have been that Gmail won't send it because their spam
> filter recognizes it.  I've tried Yahoo and they did the same thing. 

Sending GTUBE from a *life* account, which may send real mail to that
recipient later, isn't a particular good idea anyway. Unless you take
care about AWL after testing, AWL will kick your butt, sky-rocketing the
score by +500...


>  I'm a regular user and I'm trying to apply this to my evolution
> application.  Thanks for any clarification.

Just enable the Evolution SA Junk plugin. It will take care of dealing
with SA, and even uses the (comparatively lightweight) spamc/d approach.
Also, be sure to enable network tests (in the Evo Preferences), which
will dramatically increase the accuracy, but result in slower
processing.

Or are you actually trying this the hard way, calling spamc in a generic
pipe filter?

  guenther


-- 
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; }}}