[Compose] Update Rspamd image
This commit is contained in:
parent
86d55c41db
commit
b63cad1dd5
@ -88,19 +88,6 @@ local function handle_header_def(hline, cur_rule)
|
|||||||
end
|
end
|
||||||
end, fun.tail(args))
|
end, fun.tail(args))
|
||||||
|
|
||||||
local function split_hdr_param(param, headers)
|
|
||||||
for _,hh in ipairs(headers) do
|
|
||||||
local nparam = {}
|
|
||||||
for k,v in pairs(param) do
|
|
||||||
if k ~= 'header' then
|
|
||||||
nparam[k] = v
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
nparam['header'] = hh
|
|
||||||
table.insert(hdr_params, nparam)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- Some header rules require splitting to check of multiple headers
|
-- Some header rules require splitting to check of multiple headers
|
||||||
if cur_param['header'] == 'MESSAGEID' then
|
if cur_param['header'] == 'MESSAGEID' then
|
||||||
-- Special case for spamassassin
|
-- Special case for spamassassin
|
||||||
@ -112,7 +99,7 @@ local function handle_header_def(hline, cur_rule)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
cur_rule['ordinary'] = ordinary
|
cur_rule['ordinary'] = ordinary and (not (#hdr_params > 1))
|
||||||
cur_rule['header'] = hdr_params
|
cur_rule['header'] = hdr_params
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -151,12 +138,10 @@ local function process_sa_conf(f)
|
|||||||
local function parse_score(words)
|
local function parse_score(words)
|
||||||
if #words == 3 then
|
if #words == 3 then
|
||||||
-- score rule <x>
|
-- score rule <x>
|
||||||
lua_util.debugm(N, rspamd_config, 'found score for %1: %2', words[2], words[3])
|
|
||||||
return tonumber(words[3])
|
return tonumber(words[3])
|
||||||
elseif #words == 6 then
|
elseif #words == 6 then
|
||||||
-- score rule <x1> <x2> <x3> <x4>
|
-- score rule <x1> <x2> <x3> <x4>
|
||||||
-- we assume here that bayes and network are enabled and select <x4>
|
-- we assume here that bayes and network are enabled and select <x4>
|
||||||
lua_util.debugm(N, rspamd_config, 'found score for %1: %2', words[2], words[6])
|
|
||||||
return tonumber(words[6])
|
return tonumber(words[6])
|
||||||
else
|
else
|
||||||
rspamd_logger.errx(rspamd_config, 'invalid score for %1', words[2])
|
rspamd_logger.errx(rspamd_config, 'invalid score for %1', words[2])
|
||||||
@ -196,13 +181,10 @@ local function process_sa_conf(f)
|
|||||||
return
|
return
|
||||||
else
|
else
|
||||||
if string.match(l, '^ifplugin') then
|
if string.match(l, '^ifplugin') then
|
||||||
local ls = split(l)
|
|
||||||
|
|
||||||
skip_to_endif = true
|
skip_to_endif = true
|
||||||
if_nested = if_nested + 1
|
if_nested = if_nested + 1
|
||||||
table.insert(complicated, l)
|
table.insert(complicated, l)
|
||||||
elseif string.match(l, '^if !plugin%(') then
|
elseif string.match(l, '^if !plugin%(') then
|
||||||
local pname = string.match(l, '^if !plugin%(([A-Za-z:]+)%)')
|
|
||||||
skip_to_endif = true
|
skip_to_endif = true
|
||||||
if_nested = if_nested + 1
|
if_nested = if_nested + 1
|
||||||
table.insert(complicated, l)
|
table.insert(complicated, l)
|
||||||
@ -383,6 +365,7 @@ local function handle_rule(what, syms, hdr)
|
|||||||
local mtype
|
local mtype
|
||||||
local filter
|
local filter
|
||||||
local fname
|
local fname
|
||||||
|
local header
|
||||||
local sym = what:upper()
|
local sym = what:upper()
|
||||||
if what == 'sabody' then
|
if what == 'sabody' then
|
||||||
mtype = 'content'
|
mtype = 'content'
|
||||||
@ -418,7 +401,6 @@ local function handle_rule(what, syms, hdr)
|
|||||||
header = header,
|
header = header,
|
||||||
symbols = {}
|
symbols = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
local re_file = io.open(fname, 'w')
|
local re_file = io.open(fname, 'w')
|
||||||
|
|
||||||
for k,r in pairs(syms) do
|
for k,r in pairs(syms) do
|
||||||
@ -455,6 +437,7 @@ rspamd_logger.messagex('stored multimap conf in %s', 'auto_multimap.conf')
|
|||||||
local sa_remain = io.open('auto_sa.conf', 'w')
|
local sa_remain = io.open('auto_sa.conf', 'w')
|
||||||
fun.each(function(l)
|
fun.each(function(l)
|
||||||
sa_remain:write(l)
|
sa_remain:write(l)
|
||||||
|
sa_remain:write('\n')
|
||||||
end, fun.filter(function(l) return not string.match(l, '^%s+$') end, complicated))
|
end, fun.filter(function(l) return not string.match(l, '^%s+$') end, complicated))
|
||||||
sa_remain:close()
|
sa_remain:close()
|
||||||
rspamd_logger.messagex('stored sa remains conf in %s', 'auto_sa.conf')
|
rspamd_logger.messagex('stored sa remains conf in %s', 'auto_sa.conf')
|
||||||
|
@ -69,7 +69,7 @@ services:
|
|||||||
- clamd
|
- clamd
|
||||||
|
|
||||||
rspamd-mailcow:
|
rspamd-mailcow:
|
||||||
image: mailcow/rspamd:1.56
|
image: mailcow/rspamd:1.57
|
||||||
stop_grace_period: 30s
|
stop_grace_period: 30s
|
||||||
depends_on:
|
depends_on:
|
||||||
- nginx-mailcow
|
- nginx-mailcow
|
||||||
|
Loading…
Reference in New Issue
Block a user