diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-02-01 13:20:36 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-02-01 13:20:36 +0000 |
commit | 43c789659c103ad540643b307d6956e17c1d34e7 (patch) | |
tree | 4e8314dcc0ad5297094471b7abfbf03ecf57d809 | |
parent | 500fac7fd7861f926cbe2735d43e1cfc9b9c7a9e (diff) | |
download | rspamd-43c789659c103ad540643b307d6956e17c1d34e7.tar.gz rspamd-43c789659c103ad540643b307d6956e17c1d34e7.zip |
[Minor] KAS: add source ip information
-rw-r--r-- | lualib/lua_scanners/kaspersky_se.lua | 5 |
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 |