diff options
author | twesterhever <40121680+twesterhever@users.noreply.github.com> | 2023-06-22 20:58:18 +0000 |
---|---|---|
committer | twesterhever <40121680+twesterhever@users.noreply.github.com> | 2023-06-22 21:02:41 +0000 |
commit | d29846fd0b110ef68ed5f3d0c961125e3a562b38 (patch) | |
tree | 458cb0f6934b0d37223237013335f47be39330c3 /src/plugins | |
parent | 41fb5745e04312ddeac66c4120575e88167b8466 (diff) | |
download | rspamd-d29846fd0b110ef68ed5f3d0c961125e3a562b38.tar.gz rspamd-d29846fd0b110ef68ed5f3d0c961125e3a562b38.zip |
Treat HTML attachments as bad
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/mime_types.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index 2059fc9f9..83ea0eb00 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, |