diff options
author | Lyuben Bahtarliev <> | 2023-09-11 08:17:08 +0300 |
---|---|---|
committer | Lyuben Bahtarliev <> | 2023-09-11 08:17:08 +0300 |
commit | 5bb1ce5ee2cb9ef383e6bdc82adfaafd058e925b (patch) | |
tree | 28126ef6242e2debb56b3f0a7972ab3afc842ca6 /src/plugins | |
parent | 67c8b53122b6538f66cee813b9ec6d1cbe86211e (diff) | |
download | rspamd-5bb1ce5ee2cb9ef383e6bdc82adfaafd058e925b.tar.gz rspamd-5bb1ce5ee2cb9ef383e6bdc82adfaafd058e925b.zip |
[Feature] Add ICAP Content-Type and Filename from TODO List
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/external_services.lua | 11 |
1 files changed, 9 insertions, 2 deletions
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 |