Bug 7713

Summary: html img with dimensions in the style attribute is not firing HTML_IMAGE_RATIO_02
Product: Spamassassin Reporter: martin
Component: LibrariesAssignee: SpamAssassin Developer Mailing List <dev>
Status: NEW ---    
Severity: normal CC: rwmaillists
Priority: P2    
Version: 3.4.2   
Target Milestone: Undefined   
Hardware: PC   
OS: FreeBSD   
Whiteboard:
Attachments: Sample email

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.