diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index d3a718244ca726a4aa22dd1611ce7fac6ba30993..0fd5460f0f2ee2499ec6a3da73cd6d2b276f332e 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -345,6 +345,7 @@ class installer extends installer_base if(version_compare($dovecot_version,2, '>=')) { $content = str_replace('# iterate_query', 'iterate_query', $content); } + $content = str_replace('{server_id}', $conf['server_id'], $content); $this->write_config_file($configfile, $content); } diff --git a/install/dist/tpl/gentoo/amavisd-ispconfig.conf.master b/install/dist/tpl/gentoo/amavisd-ispconfig.conf.master index 88a32b463604ec93700a594e05cc2816c7c03715..5e1c8ebba6fe2616b76196ffa8a5155dd374c014 100644 --- a/install/dist/tpl/gentoo/amavisd-ispconfig.conf.master +++ b/install/dist/tpl/gentoo/amavisd-ispconfig.conf.master @@ -55,7 +55,7 @@ $sql_select_policy = $sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'. - ' WHERE (spamfilter_wblist.rid=?) AND (spamfilter_wblist.email IN (%k))' . + ' WHERE (spamfilter_wblist.rid=?) AND (spamfilter_wblist.email IN (%k)) AND (spamfilter_wblist.active="y")' . ' ORDER BY spamfilter_wblist.priority DESC'; # @@ -112,9 +112,10 @@ $policy_bank{'ORIGINATING'} = { # Allow SMTP access from IPs in @inet_acl to amvisd SMTP Port @inet_acl = qw( 127.0.0.1 [::1] 192.168.0.0/16 ); -$signed_header_fields{'received'} = 0; # turn off signing of Received +# DKIM $enable_dkim_verification = 1; -$enable_dkim_signing = 1; +$enable_dkim_signing = 1; # load DKIM signing code +$signed_header_fields{'received'} = 0; # turn off signing of Received @dkim_signature_options_bysender_maps = ( { '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } ); diff --git a/interface/lib/classes/aps_guicontroller.inc.php b/interface/lib/classes/aps_guicontroller.inc.php index 492a5e7488a08bca9abaa445af0338dccff488b1..ee80c2c33201e9797c65621a042d8b68029cc01b 100644 --- a/interface/lib/classes/aps_guicontroller.inc.php +++ b/interface/lib/classes/aps_guicontroller.inc.php @@ -408,6 +408,8 @@ class ApsGUIController extends ApsBase //* Set package status to install afetr we inserted the settings $app->db->datalogUpdate('aps_instances', array("instance_status" => INSTANCE_INSTALL), 'id', $InstanceID); + + return $InstanceID; } /** diff --git a/server/plugins-available/backup_plugin.inc.php b/server/plugins-available/backup_plugin.inc.php index 11f0363c917929538e56682a41290dc80312c310..935196eb52a46fc0c7d4184ecd55510ec5426bd1 100644 --- a/server/plugins-available/backup_plugin.inc.php +++ b/server/plugins-available/backup_plugin.inc.php @@ -70,7 +70,7 @@ class backup_plugin { $app->uses('ini_parser,file,getconf,system'); - $web = $app->dbmaster->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $backup['parent_domain_id']); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $backup['parent_domain_id']); $server_config = $app->getconf->get_server_config($conf['server_id'], 'server'); $backup_dir = trim($server_config['backup_dir']); if($backup_dir == '') return; diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index f0415d7f644817b06a3d2f176e26db433fcae4ef..fb623b9213e436a916ab4c3ebc2ce59efe839417 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -237,7 +237,7 @@ class cron_plugin { $command .= "\t{$this->parent_domain['system_user']}"; //* running as user if($job['type'] == 'url') { - $command .= "\t{$cron_config['wget']} --user-agent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0' -q -t 1 -T 7200 -O " . $log_wget_target . " " . escapeshellarg($job['command']) . " " . $log_target; + $command .= "\t{$cron_config['wget']} --no-check-certificate --user-agent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0' -q -t 1 -T 7200 -O " . $log_wget_target . " " . escapeshellarg($job['command']) . " " . $log_target; } else { if(strpos($job['command'], "\n") !== false || strpos($job['command'], "\r") !== false || strpos($job['command'], chr(0)) !== false) { $app->log("Insecure Cron job SKIPPED: " . $job['command'], LOGLEVEL_WARN); diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index cd33c12d6cc3fa248c62539fefc8db5508dfe10d..d54dcb5746e2ffcbfa91d198bcd48198c7671b93 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1779,8 +1779,19 @@ class nginx_plugin { $tpl->setLoop('alias_seo_redirects', $alias_seo_redirects); } + $stats_web_folder = 'web'; + if($data['new']['type'] == 'vhost'){ + if($data['new']['web_folder'] != ''){ + if(substr($data['new']['web_folder'], 0, 1) == '/') $data['new']['web_folder'] = substr($data['new']['web_folder'],1); + if(substr($data['new']['web_folder'], -1) == '/') $data['new']['web_folder'] = substr($data['new']['web_folder'],0,-1); + } + $stats_web_folder .= '/'.$data['new']['web_folder']; + } elseif($data['new']['type'] == 'vhostsubdomain' || $data['new']['type'] == 'vhostalias') { + $stats_web_folder = $data['new']['web_folder']; + } + //* Create basic http auth for website statistics - $tpl->setVar('stats_auth_passwd_file', $data['new']['document_root']."/web/stats/.htpasswd_stats"); + $tpl->setVar('stats_auth_passwd_file', $data['new']['document_root']."/" . $stats_web_folder . "/stats/.htpasswd_stats"); // Create basic http auth for other directories $basic_auth_locations = $this->_create_web_folder_auth_configuration($data['new']); @@ -1848,11 +1859,11 @@ class nginx_plugin { } // create password file for stats directory - if(!is_file($data['new']['document_root'].'/web/stats/.htpasswd_stats') || $data['new']['stats_password'] != $data['old']['stats_password']) { + if(!is_file($data['new']['document_root'].'/' . $stats_web_folder . '/stats/.htpasswd_stats') || $data['new']['stats_password'] != $data['old']['stats_password']) { if(trim($data['new']['stats_password']) != '') { $htp_file = 'admin:'.trim($data['new']['stats_password']); - $app->system->file_put_contents($data['new']['document_root'].'/web/stats/.htpasswd_stats', $htp_file); - $app->system->chmod($data['new']['document_root'].'/web/stats/.htpasswd_stats', 0755); + $app->system->file_put_contents($data['new']['document_root'].'/' . $stats_web_folder . '/stats/.htpasswd_stats', $htp_file); + $app->system->chmod($data['new']['document_root'].'/' . $stats_web_folder . '/stats/.htpasswd_stats', 0755); unset($htp_file); } }