https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5503

Kevin A. McGrail <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|FR: autolearn_force will    |[REVIEW] FR:
                   |force Bayes learning        |autolearn_force will force
                   |according to tflag setting  |Bayes learning according to
                   |                            |tflag setting
           Severity|enhancement                 |blocker

--- Comment #6 from Kevin A. McGrail <[email protected]> ---
 svn commit -m 'feature request for tflag autolearn_force to make the
requirements less stringent - bug 5503'
Sending        lib/Mail/SpamAssassin/Conf.pm
Sending        lib/Mail/SpamAssassin/PerMsgStatus.pm
Sending        lib/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm
Adding         t/autolearn_force.t
Adding         t/autolearn_force_fail.t
Transmitting file data .....
Committed revision 1436171.

 svn commit -m 'cleaned up more with the autolearn_force code and worked on
major autolearn bug - bug 5503'
Sending        lib/Mail/SpamAssassin/Conf/Parser.pm
Sending        lib/Mail/SpamAssassin/Conf.pm
Sending        lib/Mail/SpamAssassin/PerMsgStatus.pm
Sending        lib/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm
Sending        t/autolearn_force.t
Sending        t/autolearn_force_fail.t
Transmitting file data ......
Committed revision 1436202.

OK, I committed this.  However, I found some oddities and think I might have
uncovered something fundamentally broken with autolearn.

First, in the handling of figuring out if something is a head or a body test,
there appears to be some bugginess.

I changed lib/Mail/SpamAssassin/PerMsgStatus.pm to return head or body. 
Before, it seemed to sometimes return both for the same rule.

If you add -D to the autolearn_force and autolearn_force_fail test calls, the
autolearn_force I would expect to hit body_only 

Jan 20 22:45:00.432 [3288] dbg: learn: auto-learn: autolearn_force flagged for
a rule. Removing seperate body and head point threshold. Body Only Points: 6.02
(0 req'd) / Head Only Points: 0 (0 req'd)

However for autolearn_force_fail, I would have expected to hit head only points
but I get body only points.


Jan 20 22:46:11.216 [3300] dbg: learn: auto-learn: autolearn_force not flagged
for a rule. Body Only Points: 12.02 (3 req'd) / Head Only Points: 0 (3 req'd)


Before I made the if/elsif change in PerMsgStatus, I would get 12.02 for both
Body and Head Only.

I think  maybe_header_only and maybe_body_only are problematic before I started
this process.  It appears to me from the debug output I added that this line I
commented is causing the test_type to be lost:

Index: lib/Mail/SpamAssassin/Conf/Parser.pm
===================================================================
--- lib/Mail/SpamAssassin/Conf/Parser.pm        (revision 1435362)
+++ lib/Mail/SpamAssassin/Conf/Parser.pm        (working copy)
@@ -924,7 +924,8 @@
     # free up stuff we no longer need
     delete $conf->{tests};
     delete $conf->{priority};
-    delete $conf->{test_types};
+    #test_types are needed - see bug 5503
+    #delete $conf->{test_types};
   }
 }


I could be wrong, though and would REALLY like some extra eyes on revision
1436171 and 1436202.

Changing this to be a blocker because I think it uncovered a pretty large
issue.

Regards,
KAM

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to