Bug 7906 - Meta tests that do not use networking should not be automatically considered as a header test in _get_autolearn_points
Summary: Meta tests that do not use networking should not be automatically considered ...
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
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-10 18:29 UTC by Bert Van de Poel
Modified: 2021-05-10 18:30 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:29:34 UTC
Currently when tests are evaluated for the header and body scores for Bayes autolearning, meta tests that define that they are not network tests (no tflags = net) are considered both body and header tests. Of course this is obviously not always the case in practice, since a meta test could combine only header tests, only body tests, or a combination of both. Beyond that clearly incorrect presumption, the code in PerMsgStatus.pm's _get_autolearn_points only considers the maybe_body_only function if the maybe_header_only function has failed. This means that any meta rule that does not have tflags including net, is always considered a header test. This is absolutely false, as other code says it's both, and all things considered it should actually depend on the rules the meta test consists of.
Comment 1 Bert Van de Poel 2021-05-10 18:30:03 UTC
Bug 7905 is related to this https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7905