rspamd multimap redis stuff doesn't work as expected...
This commit is contained in:
@@ -6,10 +6,16 @@ RCPT_MAILCOW_DOMAIN {
|
||||
|
||||
RCPT_WANTS_SUBJECT_TAG {
|
||||
type = "rcpt";
|
||||
filter = "email:addr"
|
||||
filter = "email:addr";
|
||||
map = "redis://RCPT_WANTS_SUBJECT_TAG";
|
||||
}
|
||||
|
||||
RCPT_WANTS_SUBFOLDER_TAG {
|
||||
type = "rcpt";
|
||||
filter = "email:addr";
|
||||
map = "redis://RCPT_WANTS_SUBFOLDER_TAG";
|
||||
}
|
||||
|
||||
WHITELISTED_FWD_HOST {
|
||||
type = "ip";
|
||||
map = "redis://WHITELISTED_FWD_HOST";
|
||||
|
@@ -30,8 +30,9 @@ rspamd_config:register_symbol({
|
||||
end
|
||||
|
||||
local wants_subject_tag = task:get_symbol("RCPT_WANTS_SUBJECT_TAG")
|
||||
local wants_subfolder_tag = task:get_symbol("RCPT_WANTS_SUBFOLDER_TAG")
|
||||
|
||||
if wants_subject_tag == 1 then
|
||||
if wants_subject_tag then
|
||||
rspamd_logger.infox("user wants subject modified for tagged mail")
|
||||
local sbj = task:get_header('Subject')
|
||||
new_sbj = '=?UTF-8?B?' .. tostring(util.encode_base64('[' .. tag .. '] ' .. sbj)) .. '?='
|
||||
@@ -39,7 +40,7 @@ rspamd_config:register_symbol({
|
||||
remove_headers = {['Subject'] = 1},
|
||||
add_headers = {['Subject'] = new_sbj}
|
||||
})
|
||||
elseif wants_subject_tag == 2 then
|
||||
elseif wants_subfolder_tag then
|
||||
rspamd_logger.infox("Add X-Moo-Tag header")
|
||||
task:set_milter_reply({
|
||||
add_headers = {['X-Moo-Tag'] = 'YES'}
|
||||
|
Reference in New Issue
Block a user