diff --git a/helper_scripts/mydns_to_powerdns_migration.php b/helper_scripts/mydns_to_powerdns_migration.php index ffe9e4ae86aa846d4c988990fe370d265d9193fc..25a01c5ad4009212c44a636a4cfeabe03c1e43a4 100644 --- a/helper_scripts/mydns_to_powerdns_migration.php +++ b/helper_scripts/mydns_to_powerdns_migration.php @@ -31,11 +31,28 @@ while($row2 = mysql_fetch_array($sql2)) { $file2=$row2['data']; } + + // + // Fix for 'domain.ext.' apex notation + // + $record_name_end=substr($row2['name'], -1); + if ($record_name_end==".") + { + // remove trailing dot from apex + $record_name = substr($row2['name'], 0, strlen($row2['name'])-1); + } + else + { + // add domain to make it a fqdn + $record_name = $row2['name'] . "." . $row3['origin']; + } + + print "$row2[name].$row3[origin]" . " $record_name\r\n"; mysql_select_db("dbispconfig"); $sql3 = mysql_query("SELECT substr(origin,1, LENGTH(origin)-1) AS origin FROM dns_soa where id=$row2[zone];"); $row3 = mysql_fetch_array($sql3); mysql_select_db("powerdns"); - mysql_query("INSERT INTO records (domain_id,name,content,ispconfig_id,type,ttl,prio,change_date) values ('$row2[zone]','$row2[name].$row3[origin]','$file2','$row2[id]','$row2[type]','$row2[ttl]','$row2[aux]','1260446221');"); + mysql_query("INSERT INTO records (domain_id,name,content,ispconfig_id,type,ttl,prio,change_date) values ('$row2[zone]','$record_name','$file2','$row2[id]','$row2[type]','$row2[ttl]','$row2[aux]','1260446221');"); } else { diff --git a/install/dist/lib/centos_base.lib.php b/install/dist/lib/centos_base.lib.php index d1d9989b288c50236c5086515614a55273def5d5..8e6741fd693ec22c06fa1e1a38a54b1af1c5e4cf 100644 --- a/install/dist/lib/centos_base.lib.php +++ b/install/dist/lib/centos_base.lib.php @@ -52,10 +52,17 @@ class installer_centos extends installer_dist { wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); + if(!is_file($conf['amavis']['config_dir'].'/60-dkim')) { + touch($conf['amavis']['config_dir'].'/60-dkim'); + chmod($conf['amavis']['config_dir'].'/60-dkim', 0640); + } + // for CentOS 7.2 only if($dist['confid'] == 'centos72') { chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0750); chgrp($conf['amavis']['config_dir'].'/amavisd.conf', 'amavis'); + chmod($conf['amavis']['config_dir'].'/60-dkim', 0750); + chgrp($conf['amavis']['config_dir'].'/60-dkim', 'amavis'); } diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 4ada0421e33a2dc40a9d1a72288e0f9110e6c28f..5c5bdc7a0b34e81c8ffc3657690120714412e086 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -178,6 +178,7 @@ function get_distname() { break; default: $relname = "UNKNOWN"; + $distconfid = 'ubuntu1604'; } $distver = $ver.$lts." ".$relname; swriteln("Operating System: ".$distname.' '.$distver."\n"); @@ -228,7 +229,8 @@ function get_distname() { } else { $distname = 'Debian'; $distver = 'Unknown'; - $distid = 'debian40'; + $distid = 'debian60'; + $distconfid = 'debian90'; $distbaseid = 'debian'; swriteln("Operating System: Debian or compatible, unknown version.\n"); } diff --git a/interface/web/mail/xmpp_domain_edit.php b/interface/web/mail/xmpp_domain_edit.php index 3f62dbdb03c6ce244af2f436bdd5073adb79a59d..ec5a5fc11bb67e114f6b77c8ecb65473e1055de3 100644 --- a/interface/web/mail/xmpp_domain_edit.php +++ b/interface/web/mail/xmpp_domain_edit.php @@ -223,7 +223,7 @@ class page_action extends tform_actions { /* check if the domain module is used - and check if the selected domain can be used! */ $app->uses('ini_parser,getconf'); $settings = $app->getconf->get_global_config('domains'); - if ($settings['use_domain_module'] == 'y') { + if ((isset($this->dataRecord['domain'])) && ($settings['use_domain_module'] == 'y')) { if ($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { $this->dataRecord['client_group_id'] = $app->tools_sites->getClientIdForDomain($this->dataRecord['domain']); } diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master index 0399cf9f1d3e4081d2819a4498db691798a91d19..8cfdbcf8f6b9ba00dd8c2d42504ed46c732e99a7 100644 --- a/server/conf/nginx_vhost.conf.master +++ b/server/conf/nginx_vhost.conf.master @@ -131,6 +131,8 @@ server { location = /favicon.ico { log_not_found off; access_log off; + expires max; + add_header Cache-Control "public, must-revalidate, proxy-revalidate"; } location = /robots.txt { diff --git a/server/conf/php-fcgi-starter.master b/server/conf/php-fcgi-starter.master index 7671a7007e1d67bb2e075f6f11e6786a66f5999d..d391c3186bd0e4b8b20f37c30ff63b389b8c42ca 100644 --- a/server/conf/php-fcgi-starter.master +++ b/server/conf/php-fcgi-starter.master @@ -14,8 +14,6 @@ export TMPDIR=/tmp export TEMP=/tmp exec \ -d open_basedir="" \ --d disable_functions="" \ --d suhosin.executor.func.blacklist="" \ -d upload_tmp_dir=/tmp \ -d session.save_path=/tmp \ -d sendmail_path="/usr/sbin/sendmail -t -i -f webmaster@" \ diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index d5052d8d567fbadf4ae1adc09b35265f79f65409..51e785fd8124e2e851b8c40c25293cd8b300465e 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -182,7 +182,7 @@ - + SetHandler mod_python @@ -350,10 +350,10 @@ Action php5-fcgi /php5-fcgi virtual Alias /php5-fcgi {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} - FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -host 127.0.0.1: -pass-header Authorization + FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -host 127.0.0.1: -pass-header Authorization -pass-header Content-Type - FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket -pass-header Authorization + FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket -pass-header Authorization -pass-header Content-Type @@ -404,7 +404,7 @@ Action hhvm-fcgi /hhvm-fcgi virtual Alias /hhvm-fcgi {tmpl_var name='document_root'}/cgi-bin/hhvm-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} - FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/hhvm-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket /var/run/hhvm/hhvm..sock -pass-header Authorization + FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/hhvm-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket /var/run/hhvm/hhvm..sock -pass-header Authorization -pass-header Content-Type diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index a9b321f2cf42478630249c50bfa661c5e4e77c07..e8b2feb7e17acd999afcaf51b41388d6f1b850d3 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -2789,7 +2789,11 @@ class apache2_plugin { $output .= " DAV On\n"; $output .= ' BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On'."\n"; $output .= " AuthType Digest\n"; - $output .= " AuthName \"Restricted Area\"\n"; + if($fn != '' && $fn != '/') { + $output .= " AuthName \"" . $fn . "\"\n"; + } else { + $output .= " AuthName \"Restricted Area\"\n"; + } $output .= " AuthUserFile " . $webdavRoot . '/' . $file . "\n"; $output .= " Require valid-user \n"; $output .= " Options +Indexes \n"; diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php index 58215389db4f29d99e5b7b9d48e48d945840b3a7..35ade14c45a9c095a6c1629ed3ebfcaa1a09e3df 100644 --- a/server/plugins-available/mysql_clientdb_plugin.inc.php +++ b/server/plugins-available/mysql_clientdb_plugin.inc.php @@ -78,13 +78,16 @@ class mysql_clientdb_plugin { $unwanted_sql_plugins = array('validate_password'); // strict-password-validation $temp = "'".implode("','", $unwanted_sql_plugins)."'"; $result = $link->query("SELECT plugin_name FROM information_schema.plugins WHERE plugin_status='ACTIVE' AND plugin_name IN ($temp)"); - if($result) { + if($result && $result->num_rows > 0) { + $sql_plugins = array(); while ($row = $result->fetch_assoc()) { $sql_plugins[] = $row['plugin_name']; } $result->free(); - foreach ($sql_plugins as $plugin) $app->log("MySQL-Plugin $plugin enabled - can not execute function process_host_list", LOGLEVEL_ERROR); - return false; + if(count($sql_plugins) > 0) { + foreach ($sql_plugins as $plugin) $app->log("MySQL-Plugin $plugin enabled - can not execute function process_host_list", LOGLEVEL_ERROR); + return false; + } } if(!$user_access_mode) $user_access_mode = 'rw';