Skip to content

Commit

Permalink
[Fix] Fix rcpt_mime and from_mime in user settings
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Mar 6, 2019
1 parent 19442df commit 00af0f5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/plugins/lua/settings.lua
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 00af0f5

Please sign in to comment.