diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-20 17:53:32 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-20 17:53:32 +0100 |
commit | 157021a7d38750954ddfefaa17409df202cb9a44 (patch) | |
tree | 696e8af86909c2a21a9c8d401301bee0e24454c7 /src/plugins | |
parent | e87e3b9f9d3ac720e27063143a49d43d35019637 (diff) | |
download | rspamd-157021a7d38750954ddfefaa17409df202cb9a44.tar.gz rspamd-157021a7d38750954ddfefaa17409df202cb9a44.zip |
Properly treat body rules.
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/spamassassin.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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 |