From: twesterhever <40121680+twesterhever@users.noreply.github.com> Date: Thu, 22 Jun 2023 20:58:18 +0000 (+0000) Subject: Treat HTML attachments as bad X-Git-Tag: 3.6~58^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d29846fd0b110ef68ed5f3d0c961125e3a562b38;p=thirdparty%2Frspamd.git Treat HTML attachments as bad --- diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index 2059fc9f9e..83ea0eb004 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -45,8 +45,10 @@ local settings = { extension_map = { -- extension -> mime_type html = 'text/html', htm = 'text/html', - txt = 'text/plain', pdf = 'application/pdf' + shtm = 'text/html', + shtml = 'text/html', + txt = 'text/plain', }, bad_extensions = { @@ -59,6 +61,11 @@ local settings = { jar = 2, lnk = 4, scr = 4, + -- In contrast to HTML MIME parts, dedicated HTML attachments are considered harmful + htm = 1, + html = 1, + shtm = 1, + shtml = 1, -- Have you ever seen that in legit email? ace = 4, arj = 2,