diff options
author | Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com> | 2024-10-15 21:40:52 +0200 |
---|---|---|
committer | Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com> | 2024-10-15 21:40:52 +0200 |
commit | 2f9eb903ad049da6a07f35e7515a454b22aa6655 (patch) | |
tree | 9d43481de818565e7398d55234878ac16743a650 /src/plugins | |
parent | 5f26066f137bc7130b205dba51effa43b42dc0d9 (diff) | |
download | rspamd-2f9eb903ad049da6a07f35e7515a454b22aa6655.tar.gz rspamd-2f9eb903ad049da6a07f35e7515a454b22aa6655.zip |
Fix from and rcpt
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/elastic.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/lua/elastic.lua b/src/plugins/lua/elastic.lua index 9e3288304..e90c70260 100644 --- a/src/plugins/lua/elastic.lua +++ b/src/plugins/lua/elastic.lua @@ -495,7 +495,7 @@ local function get_general_metadata(task) local rcpt = task:get_recipients('smtp') local l = {} for _, a in ipairs(rcpt) do - table.insert(l, a['addr']) + table.insert(l, a['user'] .. '@' .. a['domain']:lower()) end r.rcpt = l else @@ -507,8 +507,8 @@ local function get_general_metadata(task) if task:has_from('smtp') then local from = task:get_from({ 'smtp', 'orig' })[1] if from then + r.from_user = from['user'] r.from_domain = from['domain']:lower() - r.from_user = from['user']:lower() end end @@ -517,8 +517,8 @@ local function get_general_metadata(task) if task:has_from('mime') then local mime_from = task:get_from({ 'mime', 'orig' })[1] if mime_from then + r.mime_from_user = mime_from['user'] r.mime_from_domain = mime_from['domain']:lower() - r.mime_from_user = mime_from['user']:lower() end end |