https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6708
Bug #: 6708
Summary: Message get_decoded_body_text_array() injects empty
MIME-part
Product: Spamassassin
Version: 3.3 SVN branch
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Libraries
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
M::SA::Message get_decoded_body_text_array() injects an empty (chunk of a)
MIME-part between all textual MIME-parts (or their chunks) into the returned
array of strings. Used for rawbody rules.
See this line in the function.
push(@{$self->{text_decoded}}, "\n") if ( @{$self->{text_decoded}} );
I didn't find any purpose this might serve. However, rawbody rules will
actually be applied against these almost empty strings. No big impact, but
needless RE matching nonetheless.
Moreover, these empty rawbody lines prevent short-body size checks from working
as expected. Non-intuitively, the following rule matches any message with 2
textual MIME-parts, regardless how long.
rawbody __MIMEPART_LE_200 /^.{0,200}$/s
It matches the injected almost empty string. To prevent that, the minimum needs
to be 2 rather than 0.
There is one caveat: Plugin/BodyEval.pm check_blank_line_ratio(). The ratio of
empty lines is affected by this, since we introduce some empty lines ourself.
Probably not intended, but it will be effected by eliminating these empty lines
between MIME-parts.
--
Configure bugmail:
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.