add rewrite-subject flag to email-edit form; hide spam-related settings if 'bypass_spam' is activated; add possibility to disable rejection of spam-mails, refs #1282

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2024-09-28 14:49:32 +02:00
parent dda4c7a846
commit 4ce739667d
10 changed files with 105 additions and 25 deletions

View File

@@ -96,20 +96,6 @@ return [
'value' => '1',
'checked' => (int)$result['iscatchall'],
],
'spam_tag_level' => [
'visible' => Settings::Get('antispam.activated') == '1',
'label' => lng('antispam.spam_tag_level'),
'type' => 'text',
'string_regexp' => '/^\d{1,}(\.\d{1,2})?$/',
'value' => $result['spam_tag_level']
],
'spam_kill_level' => [
'visible' => Settings::Get('antispam.activated') == '1',
'label' => lng('antispam.spam_kill_level'),
'type' => 'text',
'string_regexp' => '/^\d{1,}(\.\d{1,2})?$/',
'value' => $result['spam_kill_level']
],
'bypass_spam' => [
'visible' => Settings::Get('antispam.activated') == '1',
'label' => lng('antispam.bypass_spam'),
@@ -117,6 +103,29 @@ return [
'value' => '1',
'checked' => (int)$result['bypass_spam'],
],
'spam_tag_level' => [
'visible' => Settings::Get('antispam.activated') == '1',
'label' => lng('antispam.spam_tag_level'),
'type' => 'number',
'min' => 0,
'step' => 0.1,
'value' => $result['spam_tag_level'],
],
'spam_rewrite_subject' => [
'visible' => Settings::Get('antispam.activated') == '1',
'label' => lng('antispam.rewrite_subject'),
'type' => 'checkbox',
'value' => '1',
'checked' => (int)$result['rewrite_subject'],
],
'spam_kill_level' => [
'visible' => Settings::Get('antispam.activated') == '1',
'label' => lng('antispam.spam_kill_level'),
'desc' => lng('panel.use_checkbox_to_disable'),
'type' => 'textul',
'step' => 0.1,
'value' => $result['spam_kill_level']
],
'policy_greylist' => [
'visible' => Settings::Get('antispam.activated') == '1',
'label' => lng('antispam.policy_greylist'),