[Rspamd, Web] Add rewrite subject to known soft quarantine actions

master
andryyy 2020-11-13 21:26:42 +01:00
parent 477e1ff464
commit 5d9c40b8b4
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
3 changed files with 10 additions and 4 deletions

View File

@ -53,7 +53,7 @@ return function(task)
and not task:has_symbol('GLOBAL_RCPT_BL')
and not task:has_symbol('MAILCOW_BLACK') then
local action = task:get_metric_action('default')
if action == 'reject' or action == 'add header' then
if action == 'reject' or action == 'add header' or action == 'rewrite subject' then
return true
end
end

View File

@ -47,8 +47,10 @@ jQuery(function($){
if (typeof data.score !== 'undefined' && typeof data.action !== 'undefined') {
if (data.action === "add header") {
$('#qid_detail_score').append('<span class="label-rspamd-action label label-warning"><b>' + data.score + '</b> - ' + lang.junk_folder + '</span>');
} else {
} else if (data.action === "reject") {
$('#qid_detail_score').append('<span class="label-rspamd-action label label-danger"><b>' + data.score + '</b> - ' + lang.rejected + '</span>');
} else if (data.action === "rewrite subject") {
$('#qid_detail_score').append('<span class="label-rspamd-action label label-warning"><b>' + data.score + '</b> - ' + lang.rewrite_subject + '</span>');
}
}
if (typeof data.recipients !== 'undefined') {

View File

@ -86,6 +86,8 @@ jQuery(function($){
item.rspamdaction = '<span class="label label-danger">' + lang.rejected + '</span>';
} else if (item.action === "add header") {
item.rspamdaction = '<span class="label label-warning">' + lang.junk_folder + '</span>';
} else if (item.action === "rewrite subject") {
item.rspamdaction = '<span class="label label-warning">' + lang.rewrite_subject + '</span>';
}
if(item.notified > 0) {
item.notified = '&#10004;';
@ -182,8 +184,10 @@ jQuery(function($){
if (typeof data.score !== 'undefined' && typeof data.action !== 'undefined') {
if (data.action == "add header") {
$('#qid_detail_score').append('<span class="label-rspamd-action label label-warning"><b>' + data.score + '</b> - ' + lang.junk_folder + '</span>');
} else {
} else if (data.action == "reject") {
$('#qid_detail_score').append('<span class="label-rspamd-action label label-danger"><b>' + data.score + '</b> - ' + lang.rejected + '</span>');
} else if (data.action == "rewrite subject") {
$('#qid_detail_score').append('<span class="label-rspamd-action label label-warning"><b>' + data.score + '</b> - ' + lang.rewrite_subject + '</span>');
}
}
if (typeof data.recipients !== 'undefined') {