From: Vsevolod Stakhov Date: Thu, 1 Feb 2024 13:20:36 +0000 (+0000) Subject: [Minor] KAS: add source ip information X-Git-Tag: 3.8.2~5^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=43c789659c103ad540643b307d6956e17c1d34e7;p=thirdparty%2Frspamd.git [Minor] KAS: add source ip information --- diff --git a/lualib/lua_scanners/kaspersky_se.lua b/lualib/lua_scanners/kaspersky_se.lua index 5e0f2eaad3..bd0a01ffac 100644 --- a/lualib/lua_scanners/kaspersky_se.lua +++ b/lualib/lua_scanners/kaspersky_se.lua @@ -118,6 +118,11 @@ local function kaspersky_se_check(task, content, digest, rule, maybe_part) ['X-KAV-Timeout'] = tostring(rule.timeout * 1000), } + local ip = task:get_from_ip() + if ip and ip:is_valid() then + hdrs['X-KAV-SourceIP'] = tostring(ip) + end + if task:has_from() then hdrs['X-KAV-ObjectURL'] = string.format('[from:%s]', task:get_from()[1].addr) end