mirror of
https://github.com/webmin/webmin.git
synced 2026-05-09 00:20:28 +01:00
add amavis sa_spam_level_char and sa_dsn_cutoff_level
This commit is contained in:
@@ -28,12 +28,17 @@ print &text('amavisd_desc'),"<p>\n";
|
||||
# spam tag2 level, when is classiefied as spam
|
||||
$hits = &amavis_find('sa_tag2_level_deflt', $conf);
|
||||
print &ui_table_row($text{'amavis_hits'},
|
||||
&opt_field('sa_tag2_level_deflt', $hits, 7, 6.5));
|
||||
&opt_field('sa_tag2_level_deflt', $hits, 5, "undef"));
|
||||
|
||||
# amavis quarantine spam level
|
||||
$hits = &amavis_find('sa_kill_level_deflt', $conf);
|
||||
print &ui_table_row($text{'amavis_quarantine_level'},
|
||||
&opt_field('sa_kill_level_deflt', $hits, 7, 6.5));
|
||||
&opt_field('sa_kill_level_deflt', $hits, 5, "undef"));
|
||||
|
||||
# amavis no DSN spam level
|
||||
$hits = &amavis_find('sa_dsn_cutoff_level', $conf);
|
||||
print &ui_table_row($text{'amavis_dsn_level'},
|
||||
&opt_field('sa_dsn_cutoff_level', $hits, 5, "undef"));
|
||||
|
||||
# amavis delete spam level
|
||||
$hits = &amavis_find('sa_quarantine_cutoff_level', $conf);
|
||||
@@ -44,7 +49,7 @@ print &ui_table_hr();
|
||||
# should amavis rewrite subject
|
||||
$rewrite = &amavis_find('sa_spam_modifies_subj', $conf);
|
||||
print &ui_table_row($text{'amavis_rewrite'},
|
||||
&yes_no_field('sa_spam_modifies_subj', $rewrite, 0));
|
||||
&yes_no_field('sa_spam_modifies_subj', $rewrite, "undef"));
|
||||
|
||||
# do how to modify subject
|
||||
$hits = &amavis_find('sa_spam_subject_tag', $conf);
|
||||
@@ -56,16 +61,21 @@ $hits = &amavis_find('sa_spam_report_header', $conf);
|
||||
print &ui_table_row($text{'amavis_report_header'},
|
||||
&yes_no_field('sa_spam_report_header', $hits, 0));
|
||||
|
||||
# do not check mail larger then
|
||||
$hits = &amavis_find('sa_mail_body_size_limit', $conf);
|
||||
print &ui_table_row($text{'amavis_size_limit'},
|
||||
&opt_field('sa_mail_body_size_limit', $hits, 9, "undef"));
|
||||
# character to use for spam level
|
||||
$hits = &amavis_find('sa_spam_level_char', $conf);
|
||||
print &ui_table_row($text{'amavis_level_char'},
|
||||
&opt_field('sa_spam_level_char', $hits, 2, "*"));
|
||||
|
||||
# network checks enabled?
|
||||
$rewrite = &amavis_find('sa_local_tests_only', $conf);
|
||||
print &ui_table_row($text{'amavis_local_only'},
|
||||
&yes_no_field('sa_local_tests_only', $rewrite, 0));
|
||||
|
||||
# do not check mail larger then
|
||||
$hits = &amavis_find('sa_mail_body_size_limit', $conf);
|
||||
print &ui_table_row($text{'amavis_size_limit'},
|
||||
&opt_field('sa_mail_body_size_limit', $hits, 9, "undef"));
|
||||
|
||||
|
||||
&end_form(undef, $text{'amavis_ok'});
|
||||
|
||||
|
||||
Binary file not shown.
@@ -12,9 +12,11 @@ $conf = &get_amavis_config();
|
||||
|
||||
# check for default values
|
||||
local $tag2=$in{'sa_tag2_level_deflt'};
|
||||
$tag2=6.5 if ($in{'sa_tag2_level_deflt_def'}==1);
|
||||
$tag2="undef" if ($in{'sa_tag2_level_deflt_def'}==1);
|
||||
local $kill=$in{'sa_kill_level_deflt'};
|
||||
$kill=6.5 if ($in{'sa_kill_level_deflt_def'}==1);
|
||||
$kill="undef" if ($in{'sa_kill_level_deflt_def'}==1);
|
||||
local $dsn=$in{'sa_dsn_cutoff_level'};
|
||||
$dsn="undef" if ($in{'sa_dsn_cutoff_level_def'}==1);
|
||||
local $cut=$in{'sa_quarantine_cutoff_level'};
|
||||
$cut="undef" if ($in{'sa_quarantine_cutoff_level_def'}==1);
|
||||
local $subj=$in{'sa_spam_modifies_subj'};
|
||||
@@ -23,6 +25,8 @@ local $subtag=$in{'sa_spam_subject_tag'};
|
||||
$subtag="undef" if ($in{'sa_spam_subject_tag_def'}==1);
|
||||
local $head=$in{'sa_spam_report_header'};
|
||||
$head=0 if ($in{'sa_spam_report_header'}==-1);
|
||||
local $char=$in{'sa_spam_level_char'};
|
||||
$char="*" if ($in{'sa_spam_level_char_def'}==1);
|
||||
local $size=$in{'sa_mail_body_size_limit'};
|
||||
$size="undef" if ($in{'sa_mail_body_size_limit_def'}==1);
|
||||
local $local=$in{'sa_local_tests_only'};
|
||||
@@ -34,6 +38,8 @@ $local=0 if ($in{'sa_local_tests_only'}==-1);
|
||||
&error($text{'amavis_ehit'});
|
||||
&check_amavis_value($kill, 1) ||
|
||||
&error($text{'amavis_ekill'});
|
||||
&check_amavis_value($dsn, 1) ||
|
||||
&error($text{'amavis_edsn'});
|
||||
&check_amavis_value($cut, 1) ||
|
||||
&error($text{'amavis_ecut'});
|
||||
&check_amavis_value($subj, 1) ||
|
||||
@@ -48,10 +54,12 @@ $local=0 if ($in{'sa_local_tests_only'}==-1);
|
||||
# Save inputs
|
||||
&save_amavis_directive($conf, 'sa_tag2_level_deflt', $tag2);
|
||||
&save_amavis_directive($conf, "sa_kill_level_deflt", $kill);
|
||||
&save_amavis_directive($conf, "sa_dsn_cutoff_level", $dsn);
|
||||
&save_amavis_directive($conf, "sa_quarantine_cutoff_level", $cut);
|
||||
&save_amavis_directive($conf, "sa_spam_modifies_subj", $subj);
|
||||
&save_amavis_directive($conf, "sa_spam_subject_tag", $subtag);
|
||||
&save_amavis_directive($conf, "sa_spam_report_header", $head);
|
||||
&save_amavis_directive($conf, "sa_spam_level_char", $char);
|
||||
&save_amavis_directive($conf, "sa_mail_body_size_limit", $size);
|
||||
&save_amavis_directive($conf, "sa_local_tests_only", $local);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user