Added 'do nothing' option as default for sub-addressing

This commit is contained in:
Tii
2018-01-16 12:47:59 +01:00
parent e4b91e06a3
commit cd2c242540
11 changed files with 37 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ rspamd_config:register_symbol({
local wants_subject_tag = task:get_symbol("RCPT_WANTS_SUBJECT_TAG")
if wants_subject_tag then
if wants_subject_tag == 1 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 +39,7 @@ rspamd_config:register_symbol({
remove_headers = {['Subject'] = 1},
add_headers = {['Subject'] = new_sbj}
})
else
elseif wants_subject_tag == 2 then
rspamd_logger.infox("Add X-Moo-Tag header")
task:set_milter_reply({
add_headers = {['X-Moo-Tag'] = 'YES'}