diff options
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_smtp.lua | 2 |
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 |