From 157021a7d38750954ddfefaa17409df202cb9a44 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 20 Apr 2015 17:53:32 +0100 Subject: [PATCH] Properly treat body rules. --- src/plugins/lua/spamassassin.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/spamassassin.lua b/src/plugins/lua/spamassassin.lua index be7bed344..8a5fc79b2 100644 --- a/src/plugins/lua/spamassassin.lua +++ b/src/plugins/lua/spamassassin.lua @@ -402,6 +402,7 @@ local function process_sa_conf(f) cur_rule['symbol'] = words[2] cur_rule['re_expr'] = words_to_re(words, 2) cur_rule['re'] = rspamd_regexp.create_cached(cur_rule['re_expr']) + cur_rule['raw'] = true if cur_rule['re'] and cur_rule['symbol'] then valid_rule = true end elseif words[1] == "rawbody" or words[1] == "full" and slash then -- body SYMBOL /regexp/ @@ -704,7 +705,7 @@ _.each(function(k, r) local content = part:get_content() local raw = false - if not part:is_utf() then raw = true end + if not part:is_utf() or r['raw'] then raw = true end return sa_regexp_match(content, r['re'], raw, r) end -- 2.39.5