[config-services] add validation for empty or non-existing configuration template xml files; [php-fpm] remove 'date.timezone' from php_admin_values (superfluous as it is in php_values); [antispam] set rewrite_subject to a slighty higher score then used for add_header, fixes #1275
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -495,7 +495,6 @@ opcache.save_comments
|
|||||||
opcache.use_cwd
|
opcache.use_cwd
|
||||||
opcache.fast_shutdown'),
|
opcache.fast_shutdown'),
|
||||||
('phpfpm', 'ini_admin_values', 'cgi.redirect_status_env
|
('phpfpm', 'ini_admin_values', 'cgi.redirect_status_env
|
||||||
date.timezone
|
|
||||||
disable_classes
|
disable_classes
|
||||||
disable_functions
|
disable_functions
|
||||||
error_log
|
error_log
|
||||||
|
|||||||
@@ -217,6 +217,10 @@ final class ConfigServices extends CliCommand
|
|||||||
$_daemons_config['distro'] = $io->choice('Choose distribution', $valid_dists, $os_default);
|
$_daemons_config['distro'] = $io->choice('Choose distribution', $valid_dists, $os_default);
|
||||||
|
|
||||||
// go through all services and let user check whether to include it or not
|
// go through all services and let user check whether to include it or not
|
||||||
|
if (empty($_daemons_config['distro']) || !file_exists($config_dir . '/' . $_daemons_config['distro']. ".xml")) {
|
||||||
|
$output->writeln('<error>Empty or non-existing distribution given.</>');
|
||||||
|
return self::INVALID;
|
||||||
|
}
|
||||||
$configfiles = new ConfigParser($config_dir . '/' . $_daemons_config['distro'] . ".xml");
|
$configfiles = new ConfigParser($config_dir . '/' . $_daemons_config['distro'] . ".xml");
|
||||||
$services = $configfiles->getServices();
|
$services = $configfiles->getServices();
|
||||||
|
|
||||||
@@ -352,7 +356,12 @@ final class ConfigServices extends CliCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($decoded_config)) {
|
if (!empty($decoded_config)) {
|
||||||
|
|
||||||
$config_dir = Froxlor::getInstallDir() . 'lib/configfiles/';
|
$config_dir = Froxlor::getInstallDir() . 'lib/configfiles/';
|
||||||
|
if (empty($decoded_config['distro']) || !file_exists($config_dir . '/' . $decoded_config['distro']. ".xml")) {
|
||||||
|
$output->writeln('<error>Empty or non-existing distribution given. Please login with an admin, go to "System -> Configuration" and select your correct distribution in the top-right corner or specify valid distribution name for "distro" parameter.</>');
|
||||||
|
return self::INVALID;
|
||||||
|
}
|
||||||
$configfiles = new ConfigParser($config_dir . '/' . $decoded_config['distro']. ".xml");
|
$configfiles = new ConfigParser($config_dir . '/' . $decoded_config['distro']. ".xml");
|
||||||
$services = $configfiles->getServices();
|
$services = $configfiles->getServices();
|
||||||
$replace_arr = $this->getReplacerArray();
|
$replace_arr = $this->getReplacerArray();
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ class Rspamd
|
|||||||
$this->frx_settings_file .= ' apply {' . "\n";
|
$this->frx_settings_file .= ' apply {' . "\n";
|
||||||
$this->frx_settings_file .= ' actions {' . "\n";
|
$this->frx_settings_file .= ' actions {' . "\n";
|
||||||
$this->frx_settings_file .= ' "add header" = ' . $email['spam_tag_level'] . ';' . "\n";
|
$this->frx_settings_file .= ' "add header" = ' . $email['spam_tag_level'] . ';' . "\n";
|
||||||
$this->frx_settings_file .= ' rewrite_subject = ' . $email['spam_tag_level'] . ';' . "\n";
|
$this->frx_settings_file .= ' rewrite_subject = ' . ($email['spam_tag_level'] + 0.01) . ';' . "\n";
|
||||||
$this->frx_settings_file .= ' reject = ' . $email['spam_kill_level'] . ';' . "\n";
|
$this->frx_settings_file .= ' reject = ' . $email['spam_kill_level'] . ';' . "\n";
|
||||||
if ($type == 'rcpt' && (int)$email['policy_greylist'] == 0) {
|
if ($type == 'rcpt' && (int)$email['policy_greylist'] == 0) {
|
||||||
$this->frx_settings_file .= ' greylist = null;' . "\n";
|
$this->frx_settings_file .= ' greylist = null;' . "\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user