Add trusted_networks field support

This commit is contained in:
Jamie Cameron
2012-05-01 13:40:43 -07:00
parent 8ce634162b
commit b466ed8cc8
4 changed files with 11 additions and 0 deletions

View File

@@ -22,3 +22,5 @@ Converted all pages to use the new Webmin UI library, for a more consistent look
Cleaned up the layout of all pages to improve formatted, in particular the Allowed and Denied Addresses page which now uses tabs.
---- Changes since 1.520 ----
Don't show language and character set spam classification options unless the TextCat plugin is enabled, as they won't work without it.
---- Changes since 1.590 ----
Added a field for setting the trusted_networks parameter.

View File

@@ -54,6 +54,11 @@ $received = &find("num_check_received", $conf);
print &ui_table_row($text{'score_received'},
&opt_field("num_check_received", $received, 5, 2));
# Trusted networks
@trusted = &find_value("trusted_networks", $conf);
print &ui_table_row($text{'score_trusted'},
&ui_textarea("trusted_networks", join("\n", @trusted), 5, 70));
if (&indexof("Mail::SpamAssassin::Plugin::TextCat", @plugins) >= 0) {
print &ui_table_hr();

View File

@@ -63,6 +63,7 @@ score_localessel=Selected character sets ..
score_auto=Whitelist score factor
score_timeout=Seconds to wait for RBL queries
score_received=Number of Received: headers to check with RBL
score_trusted=Networks and hosts to trust
score_describe=Test descriptions for report
score_descr=Description
score_err=Failed to save message scoring

View File

@@ -21,6 +21,9 @@ $hits_param = &version_atleast(3.0) ? "required_score" : "required_hits";
&parse_opt($conf, "rbl_timeout", \&timeout_check);
&parse_opt($conf, "num_check_received", \&received_check);
@trusted = grep { /\S/ } split(/\r?\n/, $in{'trusted_networks'});
&save_directives($conf, "trusted_networks", \@trusted, 1);
if (defined($in{'langs_def'})) {
if ($in{'langs_def'} == 2) {
&save_directives($conf, "ok_languages", [ ], 1);