diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-01-22 12:16:05 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-01-22 12:16:05 +0000 |
commit | b54a829032d8685e19e8bc70e0110c459d330b90 (patch) | |
tree | d940291299f828941ae540eb7f00b99ef2ad6016 /lualib | |
parent | d5f70b34e0a4f01722ea1020d1e7dac03b134bf2 (diff) | |
download | rspamd-b54a829032d8685e19e8bc70e0110c459d330b90.tar.gz rspamd-b54a829032d8685e19e8bc70e0110c459d330b90.zip |
[Feature] Implement content hashes
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_fuzzy.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lualib/lua_fuzzy.lua b/lualib/lua_fuzzy.lua index ea74b4131..fdae76e62 100644 --- a/lualib/lua_fuzzy.lua +++ b/lualib/lua_fuzzy.lua @@ -307,6 +307,15 @@ exports.check_mime_part = function(task, part, rule_id) return true,false end + if part:is_specific() then + local sp = part:get_specific() + + if type(sp) == 'table' and sp.fuzzy_hashes then + lua_util.debugm(N, task, 'check specific part %s', part:get_id()) + return true,false + end + end + if part:is_attachment() then return mime_types_check(task, part, rule) end |