From 3372a1c17c49f397d76825e3f62496f7438991c1 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 25 May 2019 14:21:25 +0100 Subject: [Minor] Use lua_smtp in metadata_exporter --- lualib/lua_smtp.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lualib/lua_smtp.lua') 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 -- cgit v1.2.3