diff options
author | cebka@lenovo-laptop <cebka@lenovo-laptop> | 2010-03-17 17:24:35 +0300 |
---|---|---|
committer | cebka@lenovo-laptop <cebka@lenovo-laptop> | 2010-03-17 17:24:35 +0300 |
commit | 80e0a6ac5f69911be278c7d1ae67c8027e903e5b (patch) | |
tree | 6b4e158e08f27d163c7ec17989f7aca1594d13ea /cgi | |
parent | 8ff54fd778dbbdf807312fb563c2c440a5101a2c (diff) | |
download | rspamd-80e0a6ac5f69911be278c7d1ae67c8027e903e5b.tar.gz rspamd-80e0a6ac5f69911be278c7d1ae67c8027e903e5b.zip |
* 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
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/rspamd.cgi | 6 |
1 files changed, 4 insertions, 2 deletions
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, "<label for=\"id_statfile\">Statfile:</label>", - textfield(-name=>'statfile', -id=>'id_statfile'), + popup_menu(-name=>'statfile', -id=>'id_statfile', -values=>$cfg{'statfiles'}), br, "<label for=\"id_file\">File:</label>", 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; |