Bug 7219 - Incorrect use of __BODY_TEXT_LINE
Summary: Incorrect use of __BODY_TEXT_LINE
Status: NEW
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Rules (show other bugs)
Version: unspecified
Hardware: All All
: P2 minor
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
: 7519 (view as bug list)
Depends on:
Reported: 2015-07-12 14:05 UTC by RW
Modified: 2019-08-21 07:34 UTC (History)
2 users (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 RW 2015-07-12 14:05:25 UTC
__BODY_TEXT_LINE counts the number of lines (i.e. paragraphs) in the body counting the Subject as one. Where this is used in __BODY_URI_ONLY and __EMPTY_BODY, no account is taken of the possibility that the the subject is missing or empty. This allows __EMPTY_BODY to fire when there is one paragraph in the body and __BODY_URI_ONLY when there is a second paragraph.

I suggest adding:

 header __NONEMPTY_SUBJ Subject =~ /\S/

and using it to adjust the arithmetic in __EMPTY_BODY and __BODY_URI_ONLY.
Comment 1 Bill Cole 2017-12-11 21:40:36 UTC
*** Bug 7519 has been marked as a duplicate of this bug. ***
Comment 2 Henrik Krohns 2019-08-21 07:34:06 UTC
Could someone please fix these rules, now that we have a nosubject tflag too? Needs a feature if check for it..

Seems Bill also made some test rules, but they are still just that?