Commit 7eb3be87 authored by Marius Burkard's avatar Marius Burkard

- re-wrote policy editing to separate rspamd and amavis settings

parent befdfb2a
Pipeline #1379 passed with stage
in 2 minutes and 37 seconds
<?php
if(!defined('INSTALLER_RUN')) die('Patch update file access violation.');
/*
Example installer patch update class. the classname must match
the php and the sql patch update filename. The php patches are
only executed when a corresponding sql patch exists.
*/
class upd_0088 extends installer_patch_update {
public function onAfterSQL() {
global $inst;
// delete all the files that were deleted on previous updates
$delete = array(
'interface/web/mail/templates/spamfilter_taglevel_edit.htm',
'interface/web/mail/templates/spamfilter_quarantine_edit.htm',
'interface/web/mail/templates/spamfilter_other_edit.htm',
);
$curpath = dirname(dirname(realpath(dirname(__FILE__))));
$c = 0;
$del_all = false;
foreach($delete as $file) {
if(strpos($file, '..') !== false) continue; // security!
if($del_all == false) {
$answer = $inst->simple_query('Delete obsolete file ' . $file . '?', array('y', 'n', 'a', 'all', 'none'), 'y');
if($answer == 'n') continue;
elseif($answer == 'a' || $answer == 'all') $del_all = true;
elseif($answer == 'none') break;
}
if(@is_file('/usr/local/ispconfig/' . $file) && !@is_file($curpath . '/' . $file)) {
// be sure this is not a file contained in installation!
@unlink('/usr/local/ispconfig/' . $file);
ilog('Deleted obsolete file /usr/local/ispconfig/' . $file);
$c++;
}
}
ilog($c . 'obsolete files deleted.');
}
}
?>
......@@ -87,6 +87,21 @@ $form["tabs"]['policy'] = array (
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
),
//#################################
// ENDE Datatable fields
//#################################
)
);
$form["tabs"]['amavis'] = array (
'title' => "Amavis",
'width' => 100,
'template' => "templates/spamfilter_amavis_edit.htm",
'fields' => array (
//#################################
// Begin Datatable fields
//#################################
'banned_files_lover' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
......@@ -117,21 +132,6 @@ $form["tabs"]['policy'] = array (
'default' => 'N',
'value' => array('N' => 'No', 'Y' => 'Yes')
),
//#################################
// ENDE Datatable fields
//#################################
)
);
$form["tabs"]['quarantine'] = array (
'title' => "Quarantine",
'width' => 100,
'template' => "templates/spamfilter_quarantine_edit.htm",
'fields' => array (
//#################################
// Begin Datatable fields
//#################################
'virus_quarantine_to' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
......@@ -216,20 +216,6 @@ $form["tabs"]['quarantine'] = array (
'width' => '30',
'maxlength' => '255'
),
//#################################
// ENDE Datatable fields
//#################################
)
);
$form["tabs"]['taglevel'] = array (
'title' => "Tag-Level",
'width' => 100,
'template' => "templates/spamfilter_taglevel_edit.htm",
'fields' => array (
//#################################
// Begin Datatable fields
//#################################
'spam_tag_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
......@@ -304,57 +290,6 @@ $form["tabs"]['taglevel'] = array (
'width' => '30',
'maxlength' => '255'
),
'rspamd_greylisting' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'rspamd_spam_greylisting_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'rspamd_spam_tag_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'rspamd_spam_tag_method' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'rewrite_subject',
'value' => array('add_header' => $app->lng('add_header_txt'), 'rewrite_subject' => $app->lng('rewrite_subject_txt'))
),
'rspamd_spam_kill_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
//#################################
// ENDE Datatable fields
//#################################
)
);
$form["tabs"]['other'] = array (
'title' => "Other",
'width' => 100,
'template' => "templates/spamfilter_other_edit.htm",
'fields' => array (
//#################################
// Begin Datatable fields
//#################################
'addr_extension_virus' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
......@@ -522,11 +457,58 @@ $form["tabs"]['other'] = array (
'width' => '30',
'maxlength' => '255'
),
//#################################
// ENDE Datatable fields
//#################################
)
);
?>
$form["tabs"]['rspamd'] = array (
'title' => "Rspamd",
'width' => 100,
'template' => "templates/spamfilter_rspamd_edit.htm",
'fields' => array (
//#################################
// Begin Datatable fields
//#################################
'rspamd_greylisting' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'rspamd_spam_greylisting_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'rspamd_spam_tag_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
'rspamd_spam_tag_method' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'rewrite_subject',
'value' => array('add_header' => $app->lng('add_header_txt'), 'rewrite_subject' => $app->lng('rewrite_subject_txt'))
),
'rspamd_spam_kill_level' => array (
'datatype' => 'DOUBLE',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '255'
),
//#################################
// ENDE Datatable fields
//#################################
)
);
......@@ -42,4 +42,10 @@ $wb['rspamd_spam_tag_method_txt'] = 'SPAM tag method';
$wb['rspamd_spam_kill_level_txt'] = 'SPAM reject level';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
?>
\ No newline at end of file
$wb['amavis_settings_txt'] = 'Settings';
$wb['amavis_taglevel_txt'] = 'Tag-Level';
$wb['amavis_quarantine_txt'] = 'Quarantine';
$wb['amavis_other_txt'] = 'Other';
$wb['add_header_txt'] = 'Add header';
$wb['rewrite_subject_txt'] = 'Rewrite subject';
\ No newline at end of file
......@@ -49,48 +49,9 @@ $app->uses('tpl,tform,tform_actions');
$app->load('tform_actions');
class page_action extends tform_actions {
function onShow() {
global $app, $conf;
// get the config
$app->uses('getconf');
$mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail');
$content_filter = 'amavisd';
if($mail_config['content_filter'] == 'rspamd'){
$content_filter = 'rspamd';
unset($app->tform->formDef["tabs"]["policy"]['fields']['banned_files_lover']);
unset($app->tform->formDef["tabs"]["policy"]['fields']['bad_header_lover']);
unset($app->tform->formDef["tabs"]["policy"]['fields']['bypass_virus_checks']);
unset($app->tform->formDef["tabs"]["policy"]['fields']['bypass_banned_checks']);
unset($app->tform->formDef["tabs"]["policy"]['fields']['bypass_header_checks']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['spam_tag_level']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['spam_tag2_level']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['spam_kill_level']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['spam_dsn_cutoff_level']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['spam_quarantine_cutoff_level']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['spam_modifies_subj']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['spam_subject_tag']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['spam_subject_tag2']);
unset($app->tform->formDef["tabs"]["quarantine"]);
unset($app->tform->formDef["tabs"]["other"]);
} else {
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['rspamd_greylisting']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['rspamd_spam_greylisting_level']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['rspamd_spam_tag_level']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['rspamd_spam_tag_method']);
unset($app->tform->formDef["tabs"]["taglevel"]['fields']['rspamd_spam_kill_level']);
}
$app->tpl->setVar("content_filter", $content_filter);
parent::onShow();
}
function onShowNew() {
global $app, $conf;
global $app;
// we will check only users, not admins
if($_SESSION["s"]["user"]["typ"] == 'user') {
......@@ -106,7 +67,7 @@ class page_action extends tform_actions {
}
function onSubmit() {
global $app, $conf;
global $app;
// Check the client limits, if user is not the admin
if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin
......@@ -128,35 +89,30 @@ class page_action extends tform_actions {
}
function onAfterUpdate() {
global $app, $conf;
$app->uses('getconf');
$mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail');
global $app;
if($mail_config['content_filter'] == 'rspamd'){
$record_has_changed = false;
if(isset($this->dataRecord['rspamd_spam_greylisting_level']) && !isset($this->dataRecord['rspamd_greylisting'])) $this->dataRecord['rspamd_greylisting'] = 'n';
foreach($this->dataRecord as $key => $val) {
if(isset($this->oldDataRecord[$key]) && @$this->oldDataRecord[$key] != $val) {
// Record has changed
$record_has_changed = true;
}
$record_has_changed = false;
if(isset($this->dataRecord['rspamd_spam_greylisting_level']) && !isset($this->dataRecord['rspamd_greylisting'])) {
$this->dataRecord['rspamd_greylisting'] = 'n';
}
foreach($this->dataRecord as $key => $val) {
if(isset($this->oldDataRecord[$key]) && @$this->oldDataRecord[$key] != $val) {
// Record has changed
$record_has_changed = true;
}
if($record_has_changed){
$spamfilter_users = $app->db->queryAllRecords("SELECT * FROM spamfilter_users WHERE policy_id = ?", intval($this->id));
}
if($record_has_changed){
$spamfilter_users = $app->db->queryAllRecords("SELECT * FROM spamfilter_users WHERE policy_id = ?", intval($this->id));
if(is_array($spamfilter_users) && !empty($spamfilter_users)){
foreach($spamfilter_users as $spamfilter_user){
$app->db->datalogUpdate('spamfilter_users', $spamfilter_user, 'id', $spamfilter_user["id"], true);
}
if(is_array($spamfilter_users) && !empty($spamfilter_users)){
foreach($spamfilter_users as $spamfilter_user){
$app->db->datalogUpdate('spamfilter_users', $spamfilter_user, 'id', $spamfilter_user["id"], true);
}
}
}
}
}
$app->tform_actions = new page_action;
$app->tform_actions->onLoad();
?>
\ No newline at end of file
......@@ -3,8 +3,136 @@
</div>
<p><tmpl_var name="list_desc_txt"></p>
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<!-- Settings -->
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingSettings">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSettings" aria-expanded="true" aria-controls="collapseSettings">
{tmpl_var name='amavis_settings_txt'}
</a>
</h4>
</div>
<div id="collapseSettings" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingWeb">
<div class="panel-body">
<div class="form-group">
<label for="banned_files_lover" class="col-sm-3 control-label">{tmpl_var name='banned_files_lover_txt'}</label>
<div class="col-sm-9"><select name="banned_files_lover" id="banned_files_lover" class="form-control">
{tmpl_var name='banned_files_lover'}
</select></div>
</div>
<div class="form-group">
<label for="bad_header_lover" class="col-sm-3 control-label">{tmpl_var name='bad_header_lover_txt'}</label>
<div class="col-sm-9"><select name="bad_header_lover" id="bad_header_lover" class="form-control">
{tmpl_var name='bad_header_lover'}
</select></div>
</div>
<div class="form-group">
<label for="bypass_virus_checks" class="col-sm-3 control-label">{tmpl_var name='bypass_virus_checks_txt'}</label>
<div class="col-sm-9"><select name="bypass_virus_checks" id="bypass_virus_checks" class="form-control">
{tmpl_var name='bypass_virus_checks'}
</select></div>
</div>
<div class="form-group">
<label for="bypass_banned_checks" class="col-sm-3 control-label">{tmpl_var name='bypass_banned_checks_txt'}</label>
<div class="col-sm-9"><select name="bypass_banned_checks" id="bypass_banned_checks" class="form-control">
{tmpl_var name='bypass_banned_checks'}
</select></div>
</div>
<div class="form-group">
<label for="bypass_header_checks" class="col-sm-3 control-label">{tmpl_var name='bypass_header_checks_txt'}</label>
<div class="col-sm-9"><select name="bypass_header_checks" id="bypass_header_checks" class="form-control">
{tmpl_var name='bypass_header_checks'}
</select></div>
</div>
</div>
</div>
</div>
<!-- Tag Level -->
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingTaglevel">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTaglevel" aria-expanded="true" aria-controls="collapseTaglevel">
{tmpl_var name='amavis_taglevel_txt'}
</a>
</h4>
</div>
<div id="collapseTaglevel" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTaglevel">
<div class="panel-body">
<div class="form-group">
<label for="spam_tag_level" class="col-sm-3 control-label">{tmpl_var name='spam_tag_level_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_tag_level" id="spam_tag_level" value="{tmpl_var name='spam_tag_level'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_tag2_level" class="col-sm-3 control-label">{tmpl_var name='spam_tag2_level_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_tag2_level" id="spam_tag2_level" value="{tmpl_var name='spam_tag2_level'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_kill_level" class="col-sm-3 control-label">{tmpl_var name='spam_kill_level_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_kill_level" id="spam_kill_level" value="{tmpl_var name='spam_kill_level'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_dsn_cutoff_level" class="col-sm-3 control-label">{tmpl_var name='spam_dsn_cutoff_level_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_dsn_cutoff_level" id="spam_dsn_cutoff_level" value="{tmpl_var name='spam_dsn_cutoff_level'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_quarantine_cutoff_level" class="col-sm-3 control-label">{tmpl_var name='spam_quarantine_cutoff_level_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_quarantine_cutoff_level" id="spam_quarantine_cutoff_level" value="{tmpl_var name='spam_quarantine_cutoff_level'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_modifies_subj" class="col-sm-3 control-label">{tmpl_var name='spam_modifies_subj_txt'}</label>
<div class="col-sm-9"><select name="spam_modifies_subj" id="spam_modifies_subj" class="form-control">
{tmpl_var name='spam_modifies_subj'}
</select></div>
</div>
<div class="form-group">
<label for="spam_subject_tag" class="col-sm-3 control-label">{tmpl_var name='spam_subject_tag_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_subject_tag" id="spam_subject_tag" value="{tmpl_var name='spam_subject_tag'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_subject_tag2" class="col-sm-3 control-label">{tmpl_var name='spam_subject_tag2_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_subject_tag2" id="spam_subject_tag2" value="{tmpl_var name='spam_subject_tag2'}" class="form-control" /></div></div>
</div>
</div>
</div>
<!-- Quarantine -->
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingQuarantine">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseQuarantine" aria-expanded="true" aria-controls="collapseQuarantine">
{tmpl_var name='amavis_quarantine_txt'}
</a>
</h4>
</div>
<div id="collapseQuarantine" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingQuarantine">
<div class="panel-body">
<div class="form-group">
<label for="virus_quarantine_to" class="col-sm-3 control-label">{tmpl_var name='virus_quarantine_to_txt'}</label>
<div class="col-sm-9"><input type="text" name="virus_quarantine_to" id="virus_quarantine_to" value="{tmpl_var name='virus_quarantine_to'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_quarantine_to" class="col-sm-3 control-label">{tmpl_var name='spam_quarantine_to_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_quarantine_to" id="spam_quarantine_to" value="{tmpl_var name='spam_quarantine_to'}" class="form-control" /></div></div>
<div class="form-group">
<label for="banned_quarantine_to" class="col-sm-3 control-label">{tmpl_var name='banned_quarantine_to_txt'}</label>
<div class="col-sm-9"><input type="text" name="banned_quarantine_to" id="banned_quarantine_to" value="{tmpl_var name='banned_quarantine_to'}" class="form-control" /></div></div>
<div class="form-group">
<label for="bad_header_quarantine_to" class="col-sm-3 control-label">{tmpl_var name='bad_header_quarantine_to_txt'}</label>
<div class="col-sm-9"><input type="text" name="bad_header_quarantine_to" id="bad_header_quarantine_to" value="{tmpl_var name='bad_header_quarantine_to'}" class="form-control" /></div></div>
</div>
</div>
</div>
<!-- Other -->
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOther">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOther" aria-expanded="true" aria-controls="collapseOther">
{tmpl_var name='amavis_other_txt'}
</a>
</h4>
</div>
<div id="collapseOther" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOther">
<div class="panel-body">
<div class="form-group">
<label for="addr_extension_virus" class="col-sm-3 control-label">{tmpl_var name='addr_extension_virus_txt'}</label>
<div class="col-sm-9"><input type="text" name="addr_extension_virus" id="addr_extension_virus" value="{tmpl_var name='addr_extension_virus'}" class="form-control" /></div></div>
......@@ -57,11 +185,14 @@
<div class="form-group">
<label for="banned_rulenames" class="col-sm-3 control-label">{tmpl_var name='banned_rulenames_txt'}</label>
<div class="col-sm-9"><input type="text" name="banned_rulenames" id="banned_rulenames" value="{tmpl_var name='banned_rulenames'}" class="form-control" /></div></div>
</div>
</div>
</div>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="mail/spamfilter_policy_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="mail/spamfilter_policy_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
</div></div>
\ No newline at end of file
......@@ -3,8 +3,7 @@
</div>
<p><tmpl_var name="list_desc_txt"></p>
<div class="form-group">
<label for="policy_name" class="col-sm-3 control-label">{tmpl_var name='policy_name_txt'}</label>
<div class="col-sm-9"><input type="text" name="policy_name" id="policy_name" value="{tmpl_var name='policy_name'}" class="form-control" /></div></div>
......@@ -20,38 +19,7 @@
{tmpl_var name='spam_lover'}
</select></div>
</div>
<tmpl_if name='content_filter' op='==' value='amavisd'>
<div class="form-group">
<label for="banned_files_lover" class="col-sm-3 control-label">{tmpl_var name='banned_files_lover_txt'}</label>
<div class="col-sm-9"><select name="banned_files_lover" id="banned_files_lover" class="form-control">
{tmpl_var name='banned_files_lover'}
</select></div>
</div>
<div class="form-group">
<label for="bad_header_lover" class="col-sm-3 control-label">{tmpl_var name='bad_header_lover_txt'}</label>
<div class="col-sm-9"><select name="bad_header_lover" id="bad_header_lover" class="form-control">
{tmpl_var name='bad_header_lover'}
</select></div>
</div>
<div class="form-group">
<label for="bypass_virus_checks" class="col-sm-3 control-label">{tmpl_var name='bypass_virus_checks_txt'}</label>
<div class="col-sm-9"><select name="bypass_virus_checks" id="bypass_virus_checks" class="form-control">
{tmpl_var name='bypass_virus_checks'}
</select></div>
</div>
<div class="form-group">
<label for="bypass_banned_checks" class="col-sm-3 control-label">{tmpl_var name='bypass_banned_checks_txt'}</label>
<div class="col-sm-9"><select name="bypass_banned_checks" id="bypass_banned_checks" class="form-control">
{tmpl_var name='bypass_banned_checks'}
</select></div>
</div>
<div class="form-group">
<label for="bypass_header_checks" class="col-sm-3 control-label">{tmpl_var name='bypass_header_checks_txt'}</label>
<div class="col-sm-9"><select name="bypass_header_checks" id="bypass_header_checks" class="form-control">
{tmpl_var name='bypass_header_checks'}
</select></div>
</div>
</tmpl_if>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
......
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
<div class="form-group">
<label for="virus_quarantine_to" class="col-sm-3 control-label">{tmpl_var name='virus_quarantine_to_txt'}</label>
<div class="col-sm-9"><input type="text" name="virus_quarantine_to" id="virus_quarantine_to" value="{tmpl_var name='virus_quarantine_to'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_quarantine_to" class="col-sm-3 control-label">{tmpl_var name='spam_quarantine_to_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_quarantine_to" id="spam_quarantine_to" value="{tmpl_var name='spam_quarantine_to'}" class="form-control" /></div></div>
<div class="form-group">
<label for="banned_quarantine_to" class="col-sm-3 control-label">{tmpl_var name='banned_quarantine_to_txt'}</label>
<div class="col-sm-9"><input type="text" name="banned_quarantine_to" id="banned_quarantine_to" value="{tmpl_var name='banned_quarantine_to'}" class="form-control" /></div></div>
<div class="form-group">
<label for="bad_header_quarantine_to" class="col-sm-3 control-label">{tmpl_var name='bad_header_quarantine_to_txt'}</label>
<div class="col-sm-9"><input type="text" name="bad_header_quarantine_to" id="bad_header_quarantine_to" value="{tmpl_var name='bad_header_quarantine_to'}" class="form-control" /></div></div>
<!--
<div class="form-group">
<label for="clean_quarantine_to" class="col-sm-3 control-label">{tmpl_var name='clean_quarantine_to_txt'}</label>
<div class="col-sm-9"><input type="text" name="clean_quarantine_to" id="clean_quarantine_to" value="{tmpl_var name='clean_quarantine_to'}" class="form-control" /></div></div>
<div class="form-group">
<label for="other_quarantine_to" class="col-sm-3 control-label">{tmpl_var name='other_quarantine_to_txt'}</label>
<div class="col-sm-9"><input type="text" name="other_quarantine_to" id="other_quarantine_to" value="{tmpl_var name='other_quarantine_to'}" class="form-control" /></div></div>
-->
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="mail/spamfilter_policy_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="mail/spamfilter_policy_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
\ No newline at end of file
......@@ -3,37 +3,6 @@
</div>
<p><tmpl_var name="list_desc_txt"></p>
<tmpl_if name='content_filter' op='==' value='amavisd'>
<div class="form-group">
<label for="spam_tag_level" class="col-sm-3 control-label">{tmpl_var name='spam_tag_level_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_tag_level" id="spam_tag_level" value="{tmpl_var name='spam_tag_level'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_tag2_level" class="col-sm-3 control-label">{tmpl_var name='spam_tag2_level_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_tag2_level" id="spam_tag2_level" value="{tmpl_var name='spam_tag2_level'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_kill_level" class="col-sm-3 control-label">{tmpl_var name='spam_kill_level_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_kill_level" id="spam_kill_level" value="{tmpl_var name='spam_kill_level'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_dsn_cutoff_level" class="col-sm-3 control-label">{tmpl_var name='spam_dsn_cutoff_level_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_dsn_cutoff_level" id="spam_dsn_cutoff_level" value="{tmpl_var name='spam_dsn_cutoff_level'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_quarantine_cutoff_level" class="col-sm-3 control-label">{tmpl_var name='spam_quarantine_cutoff_level_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_quarantine_cutoff_level" id="spam_quarantine_cutoff_level" value="{tmpl_var name='spam_quarantine_cutoff_level'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_modifies_subj" class="col-sm-3 control-label">{tmpl_var name='spam_modifies_subj_txt'}</label>
<div class="col-sm-9"><select name="spam_modifies_subj" id="spam_modifies_subj" class="form-control">
{tmpl_var name='spam_modifies_subj'}
</select></div>
</div>
<div class="form-group">
<label for="spam_subject_tag" class="col-sm-3 control-label">{tmpl_var name='spam_subject_tag_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_subject_tag" id="spam_subject_tag" value="{tmpl_var name='spam_subject_tag'}" class="form-control" /></div></div>
<div class="form-group">
<label for="spam_subject_tag2" class="col-sm-3 control-label">{tmpl_var name='spam_subject_tag2_txt'}</label>
<div class="col-sm-9"><input type="text" name="spam_subject_tag2" id="spam_subject_tag2" value="{tmpl_var name='spam_subject_tag2'}" class="form-control" /></div></div>
</tmpl_if>
<tmpl_if name='content_filter' op='==' value='rspamd'>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='rspamd_greylisting_txt'}</label>
<div class="col-sm-9">
......@@ -58,12 +27,10 @@
<label for="rspamd_spam_kill_level" class="col-sm-3 control-label">{tmpl_var name='rspamd_spam_kill_level_txt'}</label>
<div class="col-sm-9"><input type="text" name="rspamd_spam_kill_level" id="rspamd_spam_kill_level" value="{tmpl_var name='rspamd_spam_kill_level'}" class="form-control" /></div>
</div>
</tmpl_if>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="mail/spamfilter_policy_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="mail/spamfilter_policy_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
</div></div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment