mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
fix default for yes/no
This commit is contained in:
@@ -28,12 +28,12 @@ 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{'score_hits'},
|
||||
&opt_field('sa_tag2_level_deflt', $hits, 7, "6.5"));
|
||||
&opt_field('sa_tag2_level_deflt', $hits, 7, 6.5));
|
||||
|
||||
# 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, 7, 6.5));
|
||||
|
||||
# amavis delete spam level
|
||||
$hits = &amavis_find('sa_quarantine_cutoff_level', $conf);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/perl
|
||||
#!/usr/bin/perl
|
||||
# Show a config file for manual editing
|
||||
|
||||
require './spam-lib.pl';
|
||||
@@ -9,6 +9,7 @@ require './spam-lib.pl';
|
||||
|
||||
$conf = &get_config();
|
||||
@files = &unique(map { $_->{'file'} } @$conf);
|
||||
push(@files, $config{'amavisdconf'}) if (!$warn_procmail && -r $config{'amavisdconf'});
|
||||
$in{'manual'} ||= $files[0];
|
||||
&indexof($in{'manual'}, @files) >= 0 ||
|
||||
&error($text{'manual_efile'});
|
||||
|
||||
@@ -12,7 +12,8 @@ amavisd_title=Amavisd Spam Konfiguration
|
||||
amavis_ehit=Spam-Wert, ab dem eine Mail als Spam klassifiziert wird ist keine Zahl!
|
||||
amavis_ekill=Spam Wert, ab dem eine Spam-Mail in Quarantäne geschickt wird ist keine Zahl!
|
||||
amavis_ecut=Spam Wert, ab dem eine Spam-Mail in gelöscht wird ist keine Zahl!
|
||||
amavis_eheader=Wert für Betreff-E-Mail-Header ist keine Zahl!
|
||||
amavis_eheader=Wert für Änderung Betreff-E-Mail-Header ist keine Zahl!
|
||||
amavis_esubject=Wert für Spam Markierung vor dem Betreff:-Headerist keine Zahl!
|
||||
amavis_esize=Wert für Größe ab der eine Mail nicht mehr auf Spam überprüft wd ist keine Zahl!
|
||||
amavis_elocal=Wert für Internet Dienste zum Klassifizieren der Mail ist keine Zahl!
|
||||
amavis_warn=Wenn Du Amavisd als Spam Filter benutzt, werden einige Einstellungen ignoriert.
|
||||
|
||||
@@ -294,6 +294,7 @@ amavis_ekill=Hits above which a Spam message is quarantined is not numeric!
|
||||
amavis_ecut=Hits above which a Spam message is deleted is not numeric!
|
||||
amavis_eheader=Value for Modify Subject: header is not numeric!
|
||||
amavis_esize=Value for size above witch a message is not checked for Spam is not numeric!
|
||||
amavis_esubject=Value for Prepend text to Subject: header is not numeric!
|
||||
amavis_elocal=Value for disable Internet sources is not numeric!
|
||||
amavis_quarantine_level=Hits above which a Spam message is quarantined.
|
||||
amavis_delete_level=Hits above which a Spam message is deleted.
|
||||
|
||||
@@ -9,32 +9,51 @@ require './spam-amavis-lib.pl';
|
||||
&can_use_check("amavisd");
|
||||
$conf = &get_amavis_config();
|
||||
&lock_file($config{'amavisdconf'});
|
||||
# Save inputs
|
||||
|
||||
# check for default values
|
||||
local $tag2=$in{'sa_tag2_level_deflt'};
|
||||
$tag2=6.5 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);
|
||||
local $cut=$in{'sa_quarantine_cutoff_level'};
|
||||
$cut="undef" if ($in{'sa_quarantine_cutoff_level_def'}==1);
|
||||
local $subj=$in{'sa_spam_modifies_subj'};
|
||||
$subj=0 if ($in{'a_spam_modifies_subj'}==-1);
|
||||
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 $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'};
|
||||
$local=0 if ($in{'sa_local_tests_only'}==-1);
|
||||
|
||||
|
||||
# Check inputs
|
||||
&check_amavis_value($in{'sa_tag2_level_deflt'}, 1) ||
|
||||
&check_amavis_value($tag2, 1) ||
|
||||
&error($text{'amavis_ehit'});
|
||||
&check_amavis_value($in{'sa_kill_level_deflt'}, 1) ||
|
||||
&check_amavis_value($kill, 1) ||
|
||||
&error($text{'amavis_ekill'});
|
||||
&check_amavis_value($in{'sa_quarantine_cutoff_level'}, 1) ||
|
||||
&check_amavis_value($cut, 1) ||
|
||||
&error($text{'amavis_ecut'});
|
||||
&check_amavis_value($in{'sa_spam_report_header'}, 1) ||
|
||||
&check_amavis_value($subj, 1) ||
|
||||
&error($text{'amavis_esubject'});
|
||||
&check_amavis_value($head, 1) ||
|
||||
&error($text{'amavis_eheader'});
|
||||
&check_amavis_value($in{'sa_mail_body_size_limit'}, 1) ||
|
||||
&check_amavis_value($size, 1) ||
|
||||
&error($text{'amavis_esize'});
|
||||
&check_amavis_value($in{'sa_local_tests_only'}, 1) ||
|
||||
&check_amavis_value($size, 1) ||
|
||||
&error($text{'amavis_elocal'});
|
||||
|
||||
# Save inputs
|
||||
&save_amavis_directive($conf, 'sa_tag2_level_deflt', $in{'sa_tag2_level_deflt'});
|
||||
&save_amavis_directive($conf, "sa_kill_level_deflt", $in{'sa_kill_level_deflt'});
|
||||
&save_amavis_directive($conf, "sa_quarantine_cutoff_level", $in{'sa_quarantine_cutoff_level'});
|
||||
&save_amavis_directive($conf, "sa_spam_modifies_subj", $in{'sa_spam_modifies_subj'});
|
||||
&save_amavis_directive($conf, "sa_spam_subject_tag", $in{'sa_spam_subject_tag'});
|
||||
&save_amavis_directive($conf, "sa_spam_report_header", $in{'sa_spam_report_header'});
|
||||
&save_amavis_directive($conf, "sa_mail_body_size_limit", $in{'sa_mail_body_size_limit'});
|
||||
&save_amavis_directive($conf, "sa_local_tests_only", $in{'sa_local_tests_only'});
|
||||
&save_amavis_directive($conf, 'sa_tag2_level_deflt', $tag2);
|
||||
&save_amavis_directive($conf, "sa_kill_level_deflt", $kill);
|
||||
&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_mail_body_size_limit", $size);
|
||||
&save_amavis_directive($conf, "sa_local_tests_only", $local);
|
||||
|
||||
&flush_file_lines();
|
||||
&unlock_file($config{'amavisdconf'});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/perl
|
||||
#!/usr/bin/perl
|
||||
# Show a config file for manual editing
|
||||
|
||||
require './spam-lib.pl';
|
||||
@@ -11,6 +11,7 @@ require './spam-lib.pl';
|
||||
# Validate the filename
|
||||
$conf = &get_config();
|
||||
@files = &unique(map { $_->{'file'} } @$conf);
|
||||
push(@files, $config{'amavisdconf'}) if (!$warn_procmail && -r $config{'amavisdconf'});
|
||||
$in{'manual'} ||= $files[0];
|
||||
&indexof($in{'manual'}, @files) >= 0 ||
|
||||
&error($text{'manual_efile'});
|
||||
|
||||
Reference in New Issue
Block a user