diff options
Diffstat (limited to 'lualib/lua_magic/init.lua')
-rw-r--r-- | lualib/lua_magic/init.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lualib/lua_magic/init.lua b/lualib/lua_magic/init.lua index 8b5064bfe..e9e0297e9 100644 --- a/lualib/lua_magic/init.lua +++ b/lualib/lua_magic/init.lua @@ -132,6 +132,8 @@ local function process_patterns(log_obj) end end +process_patterns(rspamd_config) + local function match_chunk(chunk, input, tlen, offset, trie, processed_tbl, log_obj, res) local matches = trie:match(chunk) @@ -253,7 +255,6 @@ end exports.detect = function(input, log_obj) if not log_obj then log_obj = rspamd_config end - process_patterns(log_obj) local res = {} @@ -319,7 +320,7 @@ exports.detect = function(input, log_obj) end exports.detect_mime_part = function(part, log_obj) - local ext,weight = heuristics.mime_part_heuristic(part) + local ext,weight = heuristics.mime_part_heuristic(part, log_obj) if ext and weight and weight > 20 then return ext,types[ext] |