diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-05-25 14:44:06 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-05-25 14:44:06 +0100 |
commit | 2e5224fcab08b302b96e031bff175326d6b20879 (patch) | |
tree | 1e414585442eec4382f2477be963d2799c256956 /lualib/lua_smtp.lua | |
parent | 73ce1838a266bfb021ec2c72aacd8562cad15467 (diff) | |
download | rspamd-2e5224fcab08b302b96e031bff175326d6b20879.tar.gz rspamd-2e5224fcab08b302b96e031bff175326d6b20879.zip |
[Minor] Use lua_smtp for dmarc reports
Diffstat (limited to 'lualib/lua_smtp.lua')
-rw-r--r-- | lualib/lua_smtp.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lualib/lua_smtp.lua b/lualib/lua_smtp.lua index c112295f7..05667992b 100644 --- a/lualib/lua_smtp.lua +++ b/lualib/lua_smtp.lua @@ -107,7 +107,12 @@ local function sendmail(opts, message, callback) -- DATA stage local function data_done_cb(merr, mdata) if no_error_read(merr, mdata, '3') then - conn:add_write(pre_quit_cb, {message, CRLF.. '.' .. CRLF}) + if type(message) == 'string' then + conn:add_write(pre_quit_cb, {message, CRLF.. '.' .. CRLF}) + else + table.insert(message, CRLF.. '.' .. CRLF) + conn:add_write(pre_quit_cb, message) + end end end local function data_cb(merr, _) |