diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-10-03 14:39:30 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-10-03 14:40:03 +0200 |
commit | 7ed5e94cda8c18f5dcd4ecfe35cda227b3558dd4 (patch) | |
tree | 2eea46f2c363d97c9c2512eb738562ff5a1c1ab7 | |
parent | f403b72c7b3d0ffb23a290c4390b92f33bba1ab0 (diff) | |
download | rspamd-7ed5e94cda8c18f5dcd4ecfe35cda227b3558dd4.tar.gz rspamd-7ed5e94cda8c18f5dcd4ecfe35cda227b3558dd4.zip |
[Fix] Authentication Results: Fix SPF smtp.mail_from
- MFH: rspamd-1.6
-rw-r--r-- | lualib/auth_results.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lualib/auth_results.lua b/lualib/auth_results.lua index 1a907747b..92f702950 100644 --- a/lualib/auth_results.lua +++ b/lualib/auth_results.lua @@ -153,8 +153,8 @@ local function gen_auth_results(task, settings) elseif auth_type == 'spf' and key ~= 'none' then hdr = hdr .. auth_type .. '=' .. key local smtp_from = task:get_from('smtp') - if smtp_from['addr'] ~= '' and smtp_from['addr'] ~= nil then - hdr = hdr .. ' smtp.mailfrom=' .. smtp_from['addr'] + if smtp_from and smtp_from[1] and smtp_from[1]['addr'] ~= '' and smtp_from[1]['addr'] ~= nil then + hdr = hdr .. ' smtp.mailfrom=' .. smtp_from[1]['addr'] else local helo = task:get_helo() if helo then |