From 178b34ebb15f33c7327623d249ee0368e3daa391 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Fri, 25 Jan 2019 09:44:15 +0100 Subject: [PATCH] - fixed some rspamd values, removed commented code --- install/install.php | 14 -- install/lib/classes/tpl.inc.php | 141 ------------------ install/tpl/rspamd_neural.conf.master | 4 +- install/tpl/rspamd_neural_group.conf.master | 6 +- .../web/admin/form/system_config.tform.php | 24 --- .../mail_plugin_dkim.inc.php | 1 + 6 files changed, 6 insertions(+), 184 deletions(-) diff --git a/install/install.php b/install/install.php index f99a99d9e..5c821cadf 100644 --- a/install/install.php +++ b/install/install.php @@ -509,20 +509,6 @@ $install_ispconfig_interface_default = ($conf['mysql']['master_slave_setup'] == if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPConfig Web Interface', array('y', 'n'), $install_ispconfig_interface_default,'install_ispconfig_web_interface')) == 'y') { swriteln('Installing ISPConfig'); - //** We want to check if the server is a module or cgi based php enabled server - //** TODO: Don't always ask for this somehow ? - /* - $fast_cgi = $inst->simple_query('CGI PHP Enabled Server?', array('yes','no'),'no'); - - if($fast_cgi == 'yes') { - $alias = $inst->free_query('Script Alias', '/php/'); - $path = $inst->free_query('Script Alias Path', '/path/to/cgi/bin'); - $conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path); - } else { - $conf['apache']['vhost_cgi_alias'] = ""; - } - */ - //** Customise the port ISPConfig runs on $ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port'); $temp_admin_password = str_shuffle(bin2hex(openssl_random_pseudo_bytes(4))); diff --git a/install/lib/classes/tpl.inc.php b/install/lib/classes/tpl.inc.php index 73ff19230..5bd8ded1f 100644 --- a/install/lib/classes/tpl.inc.php +++ b/install/lib/classes/tpl.inc.php @@ -357,147 +357,6 @@ if (!defined('vlibTemplateClassLoaded')) { return true; } - /** - * [** EXPERIMENTAL **] - * Function to create a loop from a Db result resource link. - * @param string $loopname to commit loop. If not set, will use last loopname set using newLoop() - * @param string $result link to a Db result resource - * @param string $db_type, type of db that the result resource belongs to. - * @return boolean true/false - * @access public - */ - public function setDbLoop($loopname, $result, $db_type = 'MYSQL') - { - /* - $db_type = strtoupper($db_type); - if (!in_array($db_type, $this->allowed_loop_dbs)) { - vlibTemplateError::raiseError('VT_WARNING_INVALID_LOOP_DB', WARNING, $db_type); - return false; - } - - $loop_arr = array(); - // TODO: Are all these necessary as were onyl using mysql and possible postgres ? - pedro - switch ($db_type) { - - case 'MYSQL': - if (get_resource_type($result) != 'mysql result') { - vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type); - return false; - } - while($r = mysql_fetch_assoc($result)) { - $loop_arr[] = $r; - } - break; - - case 'POSTGRESQL': - if (get_resource_type($result) != 'pgsql result') { - vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type); - return false; - } - - $nr = (function_exists('pg_num_rows')) ? pg_num_rows($result) : pg_numrows($result); - - for ($i=0; $i < $nr; $i++) { - $loop_arr[] = pg_fetch_array($result, $i, PGSQL_ASSOC); - } - break; - - case 'INFORMIX': - if (!$result) { - vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type); - return false; - } - while($r = ifx_fetch_row($result, 'NEXT')) { - $loop_arr[] = $r; - } - break; - - case 'INTERBASE': - if (get_resource_type($result) != 'interbase result') { - vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type); - return false; - } - while($r = ibase_fetch_row($result)) { - $loop_arr[] = $r; - } - break; - - case 'INGRES': - if (!$result) { - vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type); - return false; - } - while($r = ingres_fetch_array(INGRES_ASSOC, $result)) { - $loop_arr[] = $r; - } - break; - - case 'MSSQL': - if (get_resource_type($result) != 'mssql result') { - vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type); - return false; - } - while($r = mssql_fetch_array($result)) { - $loop_arr[] = $r; - } - break; - - case 'MSQL': - if (get_resource_type($result) != 'msql result') { - vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type); - return false; - } - while($r = msql_fetch_array($result, MSQL_ASSOC)) { - $loop_arr[] = $r; - } - break; - - case 'OCI8': - if (get_resource_type($result) != 'oci8 statement') { - vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type); - return false; - } - while(OCIFetchInto($result, &$r, OCI_ASSOC+OCI_RETURN_LOBS)) { - $loop_arr[] = $r; - } - break; - - case 'ORACLE': - if (get_resource_type($result) != 'oracle Cursor') { - vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type); - return false; - } - while(ora_fetch_into($result, &$r, ORA_FETCHINTO_ASSOC)) { - $loop_arr[] = $r; - } - break; - - case 'OVRIMOS': - if (!$result) { - vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type); - return false; - } - while(ovrimos_fetch_into($result, &$r, 'NEXT')) { - $loop_arr[] = $r; - } - break; - - case 'SYBASE': - if (get_resource_type($result) != 'sybase-db result') { - vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type); - return false; - } - - while($r = sybase_fetch_array($result)) { - $loop_arr[] = $r; - } - break; - } - $this->setLoop($loopname, $loop_arr); - return true; - */ - } - /** * Sets the name for the curent loop in the 3 step loop process. * @param string $name string to define loop name diff --git a/install/tpl/rspamd_neural.conf.master b/install/tpl/rspamd_neural.conf.master index 64b0fa871..76f8a6d34 100644 --- a/install/tpl/rspamd_neural.conf.master +++ b/install/tpl/rspamd_neural.conf.master @@ -8,7 +8,7 @@ rules { max_usages = 200; max_iterations = 25; learning_rate = 0.01, - spam_score = 8; + spam_score = 10; ham_score = -2; } symbol_spam = "NEURAL_SPAM_LONG"; @@ -21,7 +21,7 @@ rules { max_usages = 2; max_iterations = 25; learning_rate = 0.01, - spam_score = 8; + spam_score = 10; ham_score = -2; } symbol_spam = "NEURAL_SPAM_SHORT"; diff --git a/install/tpl/rspamd_neural_group.conf.master b/install/tpl/rspamd_neural_group.conf.master index c4f59c52e..5aabdefaf 100644 --- a/install/tpl/rspamd_neural_group.conf.master +++ b/install/tpl/rspamd_neural_group.conf.master @@ -1,14 +1,14 @@ symbols = { "NEURAL_SPAM_LONG" { - weight = 3.0; # sample weight + weight = 1.0; # sample weight description = "Neural network spam (long)"; } "NEURAL_HAM_LONG" { - weight = -3.0; # sample weight + weight = -2.0; # sample weight description = "Neural network ham (long)"; } "NEURAL_SPAM_SHORT" { - weight = 2.0; # sample weight + weight = 0.5; # sample weight description = "Neural network spam (short)"; } "NEURAL_HAM_SHORT" { diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php index 31a9b6bcc..4762e0028 100644 --- a/interface/web/admin/form/system_config.tform.php +++ b/interface/web/admin/form/system_config.tform.php @@ -452,30 +452,6 @@ $form["tabs"]['domains'] = array ( ) ); -/* TODO_ BEGIN: Branding - -$form["tabs"]['domains'] = array ( - 'title' => "Branding", - 'width' => 70, - 'template' => "templates/system_config_branding_edit.htm", - 'fields' => array ( - ################################## - # Begin Datatable fields - ################################## - 'allow_themechange' => array ( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'N', - 'value' => array(0 => 'n',1 => 'y') - ), - ################################## - # ENDE Datatable fields - ################################## - ) -); - - - END: Branding */ $form["tabs"]['misc'] = array ( 'title' => "Misc", 'width' => 70, diff --git a/server/plugins-available/mail_plugin_dkim.inc.php b/server/plugins-available/mail_plugin_dkim.inc.php index cf9d713b9..699fac3ea 100755 --- a/server/plugins-available/mail_plugin_dkim.inc.php +++ b/server/plugins-available/mail_plugin_dkim.inc.php @@ -105,6 +105,7 @@ class mail_plugin_dkim { global $app, $mail_config; /** TODO: FIX IF ONLY RSPAMD IS INSTALLED AND NO AMAVIS! **/ + /** TODO: FIX DKIM FOR RSPAMD, RSPAMD CANNOT READ FILES OF amavis:root **/ $app->uses('getconf'); $check=true; -- GitLab