From: Alexander Moisseev Date: Sat, 20 Feb 2016 07:34:34 +0000 (+0300) Subject: Don't trigger HTML_SHORT_LINK_IMG on small images X-Git-Tag: 1.2.0~200^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=af66bcae904101b46244bd16da1b9ed6533dccaf;p=rspamd.git Don't trigger HTML_SHORT_LINK_IMG on small images It's common for legitimate emails to have small image links (buttons, social networks junk e.t.c.) --- diff --git a/rules/html.lua b/rules/html.lua index 0f26d1421..47ff528e8 100644 --- a/rules/html.lua +++ b/rules/html.lua @@ -38,7 +38,10 @@ local function check_html_image(task, min, max) local parent = tag:get_parent() if parent then if parent:get_type() == 'a' then - return true + -- do not trigger on small and unknown size images + if i['height'] + i['width'] >= 210 then + return true + end end end end