diff options
author | bradleydoherty59 <bradleydoherty59@gmail.com> | 2021-11-23 16:22:19 -0600 |
---|---|---|
committer | bradleydoherty59 <bradleydoherty59@gmail.com> | 2021-11-23 16:22:19 -0600 |
commit | 192ccf6a9f12ad2d1ff530300aebe61595ff5dd6 (patch) | |
tree | b76d0029730646a25a1619288b6fe2424cf414d7 /lualib | |
parent | 0cddbfb5882af3805a8a07aa9054c1829f6f6794 (diff) | |
download | rspamd-192ccf6a9f12ad2d1ff530300aebe61595ff5dd6.tar.gz rspamd-192ccf6a9f12ad2d1ff530300aebe61595ff5dd6.zip |
[Minor] Store Envelope (SMTP) information on structured task as task.envelope.
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_mime.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua index 24c02daae..308400c93 100644 --- a/lualib/lua_mime.lua +++ b/lualib/lua_mime.lua @@ -582,6 +582,19 @@ exports.message_to_ucl = function(task) result.digest = task:get_digest() result.newlines = task:get_newlines_type() result.headers = task:get_headers(true) or {} + + -- Envelope (smtp) information form email + local envelope = {} + -- Want to differentiate the Mime and SMTP from/recipients here + envelope.from_smtp = task:get_from('smtp') + envelope.from_mime = task:get_from('mime') + envelope.recipients_smtp = task:get_recipients('smtp') + envelope.recipients_mime = task:get_recipients('mime') + + envelope.helo = task:get_helo() + envelope.hostname = task:get_hostname() + envelope.client_ip = task:get_client_ip() + result.envelope = envelope local parts = task:get_parts() or {} result.parts = {} |