Bug 888 - Spamassassin -aW fails to impact AWL scores, even if -a is used.
Summary: Spamassassin -aW fails to impact AWL scores, even if -a is used.
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: 1.5
Hardware: All other
: P2 minor
Target Milestone: ---
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-12 23:29 UTC by Matt Kettler
Modified: 2002-09-24 03:52 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
Demonstration of -aW and -a failing to interact properly text/plain None Matt Kettler [HasCLA]
Resulting auto-whitelist DB from these tests. application/octet-stream None Matt Kettler [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Kettler 2002-09-12 23:29:02 UTC
I have verified, to the best of my ability, that the spamassassin -W command is
not functional, at least to the extent that it does not impact scores used by
the AWL mechanism during mailchecks.

It appears that spamassassin -aW <sample_nonspam.txt adds email addresses,
whereas  spamassassin -a uses the email address in conjunction with originating IP.

It would appear from this testing that -W needs to generate the same format of
AWL db entries as runs of email through with the AWL on generate. They currently
are not the same.


Both tools maintain their own "average score" entries. Wntries created by
running the AWL are only affected by checking emails, and are not affected by
runs of -W, and vice versa.

Short summary with relevant log bits (full logs will be attached)

I ran spamassassin -aRD <sample_nonspam.txt 

 debug: auto-whitelist (db-based): dawson@world.std.com scores 0/0

I ran spamassassin -aWD <sample_nonspam.txt:

 debug: auto-whitelist (db-based): dawson@world.std.com scores 0/0
 debug: add_score: New count: 1, new totscore: -100

I ran spamassassin -aD <sample_nonspam.txt:

 debug: auto-whitelist (db-based): dawson@world.std.com|ip=208.192 scores 0/0
 debug: AWL active, pre-score: 1.9, mean: undef, originating-ip: 208.192.102.199
debug: Post AWL score: 1.9
 debug: add_score: New count: 1, new totscore: 1.9


I also repeated the -aWD and -aD steps to demonstrate that the counts and scores
used by each tool are self maintained and not affected by the other.See
attachments for details.

Note: I'm no perl programer, so I don't get the syntax, but it would appear this
is the cause:

EvalWhitelist.pm the sub check_address will modify self->{entry} to reflect
$addr."|ip=.$origip" and that is used when fetching previous scoring and
updating averages.


SpamAssassin.pm uses "find_all_addrs_in_mail" and passes these to
add_known_good_address, find_all_addrs_in_mail does not have any kind of origip
handling, nor does add_known_good_address.
Comment 1 Matt Kettler 2002-09-12 23:29:49 UTC
Created attachment 330 [details]
Demonstration of -aW and -a failing to interact properly
Comment 2 Matt Kettler 2002-09-12 23:31:10 UTC
Created attachment 331 [details]
Resulting auto-whitelist DB from these tests.
Comment 3 Justin Mason 2002-09-24 11:52:27 UTC
ok, now fixed.

Matt, could you check CVS and verify this?  if it works
OK, I'll get 2.42 released in the next few days.
Comment 4 Matt Kettler 2002-09-24 21:41:27 UTC
Subject: Re: [SAdev]  Spamassassin -aW fails to impact AWL scores,
 even if -a is used.

Using the Daily 2.50-CVS tarball ( spamassassin.pm dated 9-24-02 20:21) 
this is still broken. If that's not the right version to check, email me 
some explicit instructions on how to get it (I do not know how to operate 
CVS, but have used RCS, PVCS,  and other revision controls).

Use spamassassin -aWD <sample-nonspam.txt followed by spamassassin -atLD 
<sample_nonspam.txt.

-aW still uses emails without IP's -atLD still uses emails with IPs.

It also appears that -atLD no longer updates the entry in the database, 
constantly declaring the previous average to be "undefined" even if called 
repeatedly, which means that AWL is now completely defunct in this CVS version.

Comment 5 Justin Mason 2002-09-25 06:42:05 UTC
Subject: Re: [SAdev]  Spamassassin -aW fails to impact AWL scores, even if -a is used. 


Matt Kettler said:

> Using the Daily 2.50-CVS tarball ( spamassassin.pm dated 9-24-02 20:21) 
> this is still broken. If that's not the right version to check, email me 
> some explicit instructions on how to get it (I do not know how to operate 
> CVS, but have used RCS, PVCS,  and other revision controls).

yep, this is in b2_4_0 I was talking about.  I think 

  cvs -d [sourceforgerepositoryinfo] checkout -j b2_4_0 spamassassin

will check that out.

Must merge those changes forward again...

--j.