summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-02-01 13:20:36 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-02-01 13:20:36 +0000
commit43c789659c103ad540643b307d6956e17c1d34e7 (patch)
tree4e8314dcc0ad5297094471b7abfbf03ecf57d809
parent500fac7fd7861f926cbe2735d43e1cfc9b9c7a9e (diff)
downloadrspamd-43c789659c103ad540643b307d6956e17c1d34e7.tar.gz
rspamd-43c789659c103ad540643b307d6956e17c1d34e7.zip
[Minor] KAS: add source ip information
-rw-r--r--lualib/lua_scanners/kaspersky_se.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/lualib/lua_scanners/kaspersky_se.lua b/lualib/lua_scanners/kaspersky_se.lua
index 5e0f2eaad..bd0a01ffa 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