SA Bugzilla – Bug 7907
Meta tests should be devolved to determine whether they apply to the header, body or both
Last modified: 2022-04-03 08:20:06 UTC
As outlined within bugs 7905 and 7906, meta tests are maltreated within the __get_autolearn_points, maybe_header_only and maybe_body_only functions. I suggest meta tests should be parsed further to determine whether they constitute a combination of only header tags, only body tags or a mix. If it is a mix, I would suggest a ratio is returned so the score can be partially attributed to header and partially to body. However, I can think of certain meta rules I've written of a similar form to "if more than 3 of the following 10 tests succeed, then attribute this score", it may sometimes prove difficult to clearly indicate whether a test is actually header, body or a specific ratio of both. Therefore it's maybe worth considering having meta rules report their own categorization, for example with tflags like autolearn_header autolearn_body autolearn_both and the existing noautolearn for those to difficult to categorise.
Added autolearn_header and autolearn_body tflags support on top of previous Bug 7905 and Bug 7906 fixes. Sending trunk/UPGRADE Sending trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm Sending trunk/lib/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm Transmitting file data ...done Committing transaction... Committed revision 1899526.