From 80e0a6ac5f69911be278c7d1ae67c8027e903e5b Mon Sep 17 00:00:00 2001 From: "cebka@lenovo-laptop" Date: Wed, 17 Mar 2010 17:24:35 +0300 Subject: * Fix statistics of messages in controller * Fix building and installing perl target * Fix learn command name * Controller's commands are now case insensitive * Statfiles can now be selected from popup list in cgi interface * Password for controller's commands can now be specified in cgi interface --- cgi/rspamd.cgi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cgi/rspamd.cgi') diff --git a/cgi/rspamd.cgi b/cgi/rspamd.cgi index 386bf39af..2c5f9113a 100644 --- a/cgi/rspamd.cgi +++ b/cgi/rspamd.cgi @@ -17,6 +17,8 @@ use Data::Dumper; my %cfg = ( 'hosts' => ['localhost:11333'], 'timeout' => 1, + 'password' => '', + 'statfiles' => ['WINNOW_HAM', 'WINNOW_SPAM'], ); sub new { @@ -128,7 +130,7 @@ sub _show_html { ), br, "", - textfield(-name=>'statfile', -id=>'id_statfile'), + popup_menu(-name=>'statfile', -id=>'id_statfile', -values=>$cfg{'statfiles'}), br, "", filefield(-name=>'upload_file', -id=>'id_file'), @@ -291,7 +293,7 @@ sub _handle_form { if (!@servers || scalar(@servers) == 0) { @servers = @{ $cfg{'hosts'} }; } - my $rspamd = Mail::Rspamd::Client->new({hosts => \@servers, timeout=>$cfg{timeout}}); + my $rspamd = Mail::Rspamd::Client->new({hosts => \@servers, timeout=>$cfg{timeout}, password=>$cfg{password}}); my $cmd = $cgi->param('command'); if (!$cmd) { return undef; -- cgit v1.2.3