aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorAnton Yuzhaninov <citrin+git@citrin.ru>2020-08-18 18:45:30 +0100
committerAnton Yuzhaninov <citrin+git@citrin.ru>2020-08-18 18:45:30 +0100
commit11cf19b02cfdcf3cafd2cf4bf8becb477e98261b (patch)
treebf999cf35c6100d8dc5d8dc15ba3cd12d5644cfb /lualib
parent5098f10c3d713e925bc27053baf1e66e71baea50 (diff)
downloadrspamd-11cf19b02cfdcf3cafd2cf4bf8becb477e98261b.tar.gz
rspamd-11cf19b02cfdcf3cafd2cf4bf8becb477e98261b.zip
[Minor] Save into ClickHouse unnamed attaches
Most MUA allow to save attachments (parts with Content-Disposition: attachment) even if don't have a name. Keep name field empty and save other information about such attachments to ClickHouse: Content-Type, size, digest. Modify attachments selector as well to return hashes of unnamed attachments.
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_selectors/extractors.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/lua_selectors/extractors.lua b/lualib/lua_selectors/extractors.lua
index d88eaa216..4727b389c 100644
--- a/lualib/lua_selectors/extractors.lua
+++ b/lualib/lua_selectors/extractors.lua
@@ -135,7 +135,7 @@ uses any type by default)]],
local parts = task:get_parts() or E
local digests = {}
for i,p in ipairs(parts) do
- if p:get_filename() then
+ if p:is_attachment() then
table.insert(digests, common.get_cached_or_raw_digest(task, i, p, args))
end
end