Bug 3704 - autolearning should not change learned type
Summary: autolearning should not change learned type
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Learner (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other other
: P5 minor
Target Milestone: 3.1.0
Assignee: Theo Van Dinter
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-19 15:22 UTC by Theo Van Dinter
Modified: 2005-03-05 14:56 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Theo Van Dinter 2004-08-19 15:22:53 UTC
I learned a message as spam, then ran through spamassassin which decided to
autolearn as ham, so it dutifully forgot the spam version and relearned as ham.

IMO, if autolearning, and the message was learned at all before, we shouldn't
learn it again.
Comment 1 Daniel Quinlan 2004-09-02 23:21:29 UTC
makes sense to me
Comment 2 Theo Van Dinter 2005-03-05 21:13:55 UTC
I think I have a patch to take care of this, so I may as well take the ticket. ;)
Comment 3 Theo Van Dinter 2005-03-05 23:56:17 UTC
apparently I spoke too soon about that patch ...   working on it some more, at
the autolearn stage, the bayes db may not be tied, so we can't do something
simple like "if seen, don't bother autolearning at all".

a patch was committed though, r156296.

it added an option to init_learner() called "no_relearn" which gets checked in
Bayes::learn_trapped(), and skips learning if the message was already learned as
the opposite type.  so the patch sets this before doing the autolearn learn()
call, and resets the learn state after learn() completes.