Bug 7713 - html img with dimensions in the style attribute is not firing HTML_IMAGE_RATIO_02
Summary: html img with dimensions in the style attribute is not firing HTML_IMAGE_RATI...
Status: NEW
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 3.4.2
Hardware: PC FreeBSD
: P2 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-09 12:24 UTC by martin
Modified: 2019-05-09 13:12 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Sample email application/x-mimearchive None martin@lispworks.com [NoCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description martin 2019-05-09 12:24:28 UTC
Created attachment 5654 [details]
Sample email

The attached sa-img-style-missed.eml (distilled from a 5MB spam) does not fire the HTML_IMAGE_RATIO_02 rule even though the image is very large relative to the text.

The problem is that the img tag has its width and height in the style attribute, which are not detected by Mail::SpamAssassin::HTML::html_tests.  (The naturalheight and naturalwidth attributes seem to be spurious.)
Comment 1 RW 2019-05-09 13:12:36 UTC
Unfortunately the HTML_IMAGE_RATIO_* rules hit a lot of ham these day. HTML_IMAGE_RATIO_02 hits over 5% and the 4 rules collectively hit about 18% of ham and 15% of spam. The scores haven't been optimized for 10 years, and it's doubtful they do anything useful.