From: Vsevolod Stakhov Date: Wed, 27 Jul 2016 12:15:09 +0000 (+0100) Subject: [Fix] Fix greylisting plugin variable usage X-Git-Tag: 1.3.1~51 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=37832e030102a1cef9c678d5b50308c548694f41;p=rspamd.git [Fix] Fix greylisting plugin variable usage Issue: #758 Reported by: @dehnli --- diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua index 1f62e6bda..56598998d 100644 --- a/src/plugins/lua/greylist.lua +++ b/src/plugins/lua/greylist.lua @@ -145,7 +145,6 @@ local function greylist_check(task) local greylisted_body = false local ret_meta = false local greylisted_meta = false - local time local greylist_type if data then @@ -202,7 +201,8 @@ local function greylist_check(task) upstream:fail() end elseif greylisted_body and greylisted_meta then - local end_time = rspamd_util.time_to_string(time + settings['timeout']) + local end_time = rspamd_util.time_to_string(rspamd_util.get_time() + + settings['timeout']) rspamd_logger.infox(task, 'greylisted till "%s" using %s key', end_time, type) task:insert_result(settings['symbol'], 0.0, 'greylisted', end_time,