Bug 7907 - Meta tests should be devolved to determine whether they apply to the header, body or both
Summary: Meta tests should be devolved to determine whether they apply to the header, ...
Status: NEW
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Learner (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
Depends on:
Reported: 2021-05-10 18:37 UTC by Bert Van de Poel
Modified: 2021-05-10 21:52 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 Bert Van de Poel 2021-05-10 18:37:30 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.