Skip to content

Commit 178b34e

Browse files
author
Marius Burkard
committed
- fixed some rspamd values, removed commented code
1 parent cda177a commit 178b34e

File tree

6 files changed

+6
-184
lines changed

6 files changed

+6
-184
lines changed

install/install.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -509,20 +509,6 @@
509509
if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPConfig Web Interface', array('y', 'n'), $install_ispconfig_interface_default,'install_ispconfig_web_interface')) == 'y') {
510510
swriteln('Installing ISPConfig');
511511

512-
//** We want to check if the server is a module or cgi based php enabled server
513-
//** TODO: Don't always ask for this somehow ?
514-
/*
515-
$fast_cgi = $inst->simple_query('CGI PHP Enabled Server?', array('yes','no'),'no');
516-
517-
if($fast_cgi == 'yes') {
518-
$alias = $inst->free_query('Script Alias', '/php/');
519-
$path = $inst->free_query('Script Alias Path', '/path/to/cgi/bin');
520-
$conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path);
521-
} else {
522-
$conf['apache']['vhost_cgi_alias'] = "";
523-
}
524-
*/
525-
526512
//** Customise the port ISPConfig runs on
527513
$ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port');
528514
$temp_admin_password = str_shuffle(bin2hex(openssl_random_pseudo_bytes(4)));

install/lib/classes/tpl.inc.php

Lines changed: 0 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -357,147 +357,6 @@ public function setLoop($k, $v)
357357
return true;
358358
}
359359

360-
/**
361-
* [** EXPERIMENTAL **]
362-
* Function to create a loop from a Db result resource link.
363-
* @param string $loopname to commit loop. If not set, will use last loopname set using newLoop()
364-
* @param string $result link to a Db result resource
365-
* @param string $db_type, type of db that the result resource belongs to.
366-
* @return boolean true/false
367-
* @access public
368-
*/
369-
public function setDbLoop($loopname, $result, $db_type = 'MYSQL')
370-
{
371-
/*
372-
$db_type = strtoupper($db_type);
373-
if (!in_array($db_type, $this->allowed_loop_dbs)) {
374-
vlibTemplateError::raiseError('VT_WARNING_INVALID_LOOP_DB', WARNING, $db_type);
375-
return false;
376-
}
377-
378-
$loop_arr = array();
379-
// TODO: Are all these necessary as were onyl using mysql and possible postgres ? - pedro
380-
switch ($db_type) {
381-
382-
case 'MYSQL':
383-
if (get_resource_type($result) != 'mysql result') {
384-
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
385-
return false;
386-
}
387-
while($r = mysql_fetch_assoc($result)) {
388-
$loop_arr[] = $r;
389-
}
390-
break;
391-
392-
case 'POSTGRESQL':
393-
if (get_resource_type($result) != 'pgsql result') {
394-
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
395-
return false;
396-
}
397-
398-
$nr = (function_exists('pg_num_rows')) ? pg_num_rows($result) : pg_numrows($result);
399-
400-
for ($i=0; $i < $nr; $i++) {
401-
$loop_arr[] = pg_fetch_array($result, $i, PGSQL_ASSOC);
402-
}
403-
break;
404-
405-
case 'INFORMIX':
406-
if (!$result) {
407-
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
408-
return false;
409-
}
410-
while($r = ifx_fetch_row($result, 'NEXT')) {
411-
$loop_arr[] = $r;
412-
}
413-
break;
414-
415-
case 'INTERBASE':
416-
if (get_resource_type($result) != 'interbase result') {
417-
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
418-
return false;
419-
}
420-
while($r = ibase_fetch_row($result)) {
421-
$loop_arr[] = $r;
422-
}
423-
break;
424-
425-
case 'INGRES':
426-
if (!$result) {
427-
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
428-
return false;
429-
}
430-
while($r = ingres_fetch_array(INGRES_ASSOC, $result)) {
431-
$loop_arr[] = $r;
432-
}
433-
break;
434-
435-
case 'MSSQL':
436-
if (get_resource_type($result) != 'mssql result') {
437-
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
438-
return false;
439-
}
440-
while($r = mssql_fetch_array($result)) {
441-
$loop_arr[] = $r;
442-
}
443-
break;
444-
445-
case 'MSQL':
446-
if (get_resource_type($result) != 'msql result') {
447-
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
448-
return false;
449-
}
450-
while($r = msql_fetch_array($result, MSQL_ASSOC)) {
451-
$loop_arr[] = $r;
452-
}
453-
break;
454-
455-
case 'OCI8':
456-
if (get_resource_type($result) != 'oci8 statement') {
457-
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
458-
return false;
459-
}
460-
while(OCIFetchInto($result, &$r, OCI_ASSOC+OCI_RETURN_LOBS)) {
461-
$loop_arr[] = $r;
462-
}
463-
break;
464-
465-
case 'ORACLE':
466-
if (get_resource_type($result) != 'oracle Cursor') {
467-
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
468-
return false;
469-
}
470-
while(ora_fetch_into($result, &$r, ORA_FETCHINTO_ASSOC)) {
471-
$loop_arr[] = $r;
472-
}
473-
break;
474-
475-
case 'OVRIMOS':
476-
if (!$result) {
477-
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
478-
return false;
479-
}
480-
while(ovrimos_fetch_into($result, &$r, 'NEXT')) {
481-
$loop_arr[] = $r;
482-
}
483-
break;
484-
485-
case 'SYBASE':
486-
if (get_resource_type($result) != 'sybase-db result') {
487-
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
488-
return false;
489-
}
490-
491-
while($r = sybase_fetch_array($result)) {
492-
$loop_arr[] = $r;
493-
}
494-
break;
495-
}
496-
$this->setLoop($loopname, $loop_arr);
497-
return true;
498-
*/
499-
}
500-
501360
/**
502361
* Sets the name for the curent loop in the 3 step loop process.
503362
* @param string $name string to define loop name

install/tpl/rspamd_neural.conf.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ rules {
88
max_usages = 200;
99
max_iterations = 25;
1010
learning_rate = 0.01,
11-
spam_score = 8;
11+
spam_score = 10;
1212
ham_score = -2;
1313
}
1414
symbol_spam = "NEURAL_SPAM_LONG";
@@ -21,7 +21,7 @@ rules {
2121
max_usages = 2;
2222
max_iterations = 25;
2323
learning_rate = 0.01,
24-
spam_score = 8;
24+
spam_score = 10;
2525
ham_score = -2;
2626
}
2727
symbol_spam = "NEURAL_SPAM_SHORT";

install/tpl/rspamd_neural_group.conf.master

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
symbols = {
22
"NEURAL_SPAM_LONG" {
3-
weight = 3.0; # sample weight
3+
weight = 1.0; # sample weight
44
description = "Neural network spam (long)";
55
}
66
"NEURAL_HAM_LONG" {
7-
weight = -3.0; # sample weight
7+
weight = -2.0; # sample weight
88
description = "Neural network ham (long)";
99
}
1010
"NEURAL_SPAM_SHORT" {
11-
weight = 2.0; # sample weight
11+
weight = 0.5; # sample weight
1212
description = "Neural network spam (short)";
1313
}
1414
"NEURAL_HAM_SHORT" {

interface/web/admin/form/system_config.tform.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -452,30 +452,6 @@
452452
)
453453
);
454454

455-
/* TODO_ BEGIN: Branding
456-
457-
$form["tabs"]['domains'] = array (
458-
'title' => "Branding",
459-
'width' => 70,
460-
'template' => "templates/system_config_branding_edit.htm",
461-
'fields' => array (
462-
##################################
463-
# Begin Datatable fields
464-
##################################
465-
'allow_themechange' => array (
466-
'datatype' => 'VARCHAR',
467-
'formtype' => 'CHECKBOX',
468-
'default' => 'N',
469-
'value' => array(0 => 'n',1 => 'y')
470-
),
471-
##################################
472-
# ENDE Datatable fields
473-
##################################
474-
)
475-
);
476-
477-
478-
END: Branding */
479455
$form["tabs"]['misc'] = array (
480456
'title' => "Misc",
481457
'width' => 70,

server/plugins-available/mail_plugin_dkim.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ function check_system($data) {
105105
global $app, $mail_config;
106106

107107
/** TODO: FIX IF ONLY RSPAMD IS INSTALLED AND NO AMAVIS! **/
108+
/** TODO: FIX DKIM FOR RSPAMD, RSPAMD CANNOT READ FILES OF amavis:root **/
108109

109110
$app->uses('getconf');
110111
$check=true;

0 commit comments

Comments
 (0)