aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_smtp.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-05-25 14:21:25 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-05-25 14:21:25 +0100
commit3372a1c17c49f397d76825e3f62496f7438991c1 (patch)
treecc2a561e7685a25e64d2e33d43dcc31a4ee1ce0a /lualib/lua_smtp.lua
parent8b00d93e330ee72f7de82e442349435a52204dd9 (diff)
downloadrspamd-3372a1c17c49f397d76825e3f62496f7438991c1.tar.gz
rspamd-3372a1c17c49f397d76825e3f62496f7438991c1.zip
[Minor] Use lua_smtp in metadata_exporter
Diffstat (limited to 'lualib/lua_smtp.lua')
-rw-r--r--lualib/lua_smtp.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/lualib/lua_smtp.lua b/lualib/lua_smtp.lua
index 1b15249c6..7887eff59 100644
--- a/lualib/lua_smtp.lua
+++ b/lualib/lua_smtp.lua
@@ -19,6 +19,7 @@ local rspamd_tcp = require "rspamd_tcp"
local exports = {}
local CRLF = '\r\n'
+local default_timeout = 10.0
--[[[
-- @function lua_smtp.sendmail(task, message, opts, callback)
@@ -185,6 +186,7 @@ local function sendmail(task, message, opts, callback)
stop_pattern = CRLF,
host = opts.host,
port = opts.port or 25,
+ timeout = opts.timeout or default_timeout,
}) then
callback(false, 'cannot make a TCP connection')
end