aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-06 18:33:42 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-06 18:33:42 +0000
commit9347accacebdcb3015999cc9e04664e54c6535bb (patch)
tree62eca0234b72350b1f4d2b28d4bc0adbaecf3d80 /src/plugins
parente7cdc37c932d82db4fa026e1754ea2cd651a0620 (diff)
downloadrspamd-9347accacebdcb3015999cc9e04664e54c6535bb.tar.gz
rspamd-9347accacebdcb3015999cc9e04664e54c6535bb.zip
Fix replacements in spamassassin plugin
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/spamassassin.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/lua/spamassassin.lua b/src/plugins/lua/spamassassin.lua
index ea7b28ffe..24ec601dc 100644
--- a/src/plugins/lua/spamassassin.lua
+++ b/src/plugins/lua/spamassassin.lua
@@ -881,14 +881,17 @@ _.each(function(r)
if rule['re_expr'] and rule['re'] then
local res,nexpr = apply_replacements(rule['re_expr'])
if res then
- local nre = rspamd_regexp.create_cached(nexpr)
+ local nre = rspamd_regexp.create(nexpr)
if not nre then
rspamd_logger.errx(rspamd_config, 'cannot apply replacement for rule %1', r)
rule['re'] = nil
else
rspamd_logger.debugx(rspamd_config, 'replace %1 -> %2', r, nexpr)
+ rspamd_config:replace_regexp({
+ old_re = rule['re'],
+ new_re = nre
+ })
rule['re'] = nre
- -- XXX: add removal from the cache logic
rule['re_expr'] = nexpr
nre:set_limit(match_limit)
end