From 5bb1ce5ee2cb9ef383e6bdc82adfaafd058e925b Mon Sep 17 00:00:00 2001 From: Lyuben Bahtarliev <> Date: Mon, 11 Sep 2023 08:17:08 +0300 Subject: [Feature] Add ICAP Content-Type and Filename from TODO List --- src/plugins/lua/external_services.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/lua/external_services.lua b/src/plugins/lua/external_services.lua index a68517c08..98a0a6d93 100644 --- a/src/plugins/lua/external_services.lua +++ b/src/plugins/lua/external_services.lua @@ -181,12 +181,19 @@ local function add_scanner_rule(sym, opts) fun.each(function(p) local content = p:get_content() if content and #content > 0 then - cfg.check(task, content, p:get_digest(), rule) + local in_fname = p:get_filename() + local in_type, in_stype = p:get_detected_type() + local part_info = {in_fname,in_type,in_stype} + cfg.check(task, content, p:get_digest(), rule, part_info) end end, common.check_parts_match(task, rule)) else - cfg.check(task, task:get_content(), task:get_digest(), rule) + local in_fname = "mail" + local in_type = "application" + local in_stype = "octet-stream" + local part_info = {in_fname,in_type,in_stype} + cfg.check(task, task:get_content(), task:get_digest(), rule, part_info) end end -- cgit v1.2.3