aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-06 17:43:54 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-06 17:43:54 +0000
commit00af0f5212cc7903011d9593271223404ff34edf (patch)
treea1ac6a1a82316f5dce78c8f42ec531af74a3b94e /src
parent19442df4068b480b5d0bcc9c18b042658bb47fac (diff)
downloadrspamd-00af0f5212cc7903011d9593271223404ff34edf.tar.gz
rspamd-00af0f5212cc7903011d9593271223404ff34edf.zip
[Fix] Fix rcpt_mime and from_mime in user settings
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/settings.lua18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua
index 4e7afbf84..972375b32 100644
--- a/src/plugins/lua/settings.lua
+++ b/src/plugins/lua/settings.lua
@@ -584,6 +584,19 @@ local function process_settings_table(tbl)
out['rcpt'] = check_table(elt['rcpt'], rcpt)
end
end
+ if elt['from_mime'] then
+ local from_mime = process_addr(elt['from_mime'])
+
+ if from_mime then
+ out['from_mime'] = check_table(elt['from_mime'], from_mime)
+ end
+ end
+ if elt['rcpt_mime'] then
+ local rcpt_mime = process_addr(elt['rcpt_mime'])
+ if rcpt_mime then
+ out['rcpt_mime'] = check_table(elt['rcpt_mime'], rcpt_mime)
+ end
+ end
if elt['user'] then
local user = process_addr(elt['user'])
if user then
@@ -608,10 +621,7 @@ local function process_settings_table(tbl)
if elt['request_header'] then
local rho = {}
for k, v in pairs(elt['request_header']) do
- local re = rspamd_regexp.get_cached(v)
- if not re then
- re = rspamd_regexp.create_cached(v)
- end
+ local re = rspamd_regexp.create(v)
if re then
rho[k] = re
end