Bug 7904

Summary: Missing types in maybe_body_only()
Product: Spamassassin Reporter: Bert Van de Poel <bert>
Component: LearnerAssignee: SpamAssassin Developer Mailing List <dev>
Status: NEW ---    
Severity: normal CC: bert
Priority: P2    
Version: unspecified   
Target Milestone: Undefined   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Bert Van de Poel 2021-05-10 12:49:43 UTC
I recently noticed some problems with Spamassassin not autolearning spam that was not overly similar to previous messages and had enough scores. From debug logs, I figured out the messages weren't hitting the minimum requirement of 3 or more spam score based on the body. Bizarrely enough, when I went through the list of tests, I did find enough examples of body tests in some cases. 

After reaching out to the mailing list about this, wondering whether this was perhaps a bug, I received confirmation from RW that some important parts were missing in the maybe_body_only() function which causes it not to consider very relevant body tests such as DCC, Razor and Pyzor (which give huge scores and we consider as very relevant). See the quote from https://www.mail-archive.com/users@spamassassin.apache.org/msg108260.html below:

"One thing that does look wrong is that maybe_body_only() looks
for:

(($type == $TYPE_BODY_TESTS) || ($type == $TYPE_BODY_EVALS)
    || ($type == $TYPE_URI_TESTS) || ($type == $TYPE_URI_EVALS))

so it's missing any rawbody and full rules. 


Specifically Pyzor, Razor2 and DCC are full eval rules."


I would therefore consider this a bug that should be fixed and perhaps even considered by distros for backporting into existing long term releases (such as the Ubuntu LTS and RHEL).