aboutsummaryrefslogtreecommitdiffstats
path: root/conf/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-05 13:43:33 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-05 13:43:33 +0100
commitdddcecd51de8dbf662d6a065d4d4c7133d8f1d02 (patch)
tree21dde173935b349361fd26dc6ab701cd0772a923 /conf/lua
parent2ae75043b48c0604c286597a124b9303d1397915 (diff)
downloadrspamd-dddcecd51de8dbf662d6a065d4d4c7133d8f1d02.tar.gz
rspamd-dddcecd51de8dbf662d6a065d4d4c7133d8f1d02.zip
Fix for lua 5.2.
Diffstat (limited to 'conf/lua')
-rw-r--r--conf/lua/rspamd.classifiers.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/conf/lua/rspamd.classifiers.lua b/conf/lua/rspamd.classifiers.lua
index 4820dd77a..3ba1c0fc6 100644
--- a/conf/lua/rspamd.classifiers.lua
+++ b/conf/lua/rspamd.classifiers.lua
@@ -10,6 +10,11 @@ local has_in_reply_label = 'reply message'
-- Get specific statfiles set based on message rules
local function get_specific_statfiles(classifier, task)
+ if not table.foreach then
+ table.foreach = function(t, f)
+ for k, v in pairs(t) do f(k, v) end
+ end
+ end
local spec_st = {}
-- More 5 recipients
local st_many = classifier:get_statfile_by_label(many_recipients_label)