SA Bugzilla – Bug 3704
autolearning should not change learned type
Last modified: 2005-03-05 14:56:17 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.
makes sense to me
I think I have a patch to take care of this, so I may as well take the ticket. ;)
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.