diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php index 49327239d746461e7b7c9e1ec2f9beeba0e6abb2..5659626027693d0eaa51afcacf685e9b3084fb7c 100644 --- a/install/dist/lib/debian60.lib.php +++ b/install/dist/lib/debian60.lib.php @@ -79,19 +79,20 @@ class installer extends installer_base { //* Get the dovecot version exec('dovecot --version', $tmp); - $parts = explode('.', trim($tmp[0])); - $dovecot_version = $parts[0]; + $dovecot_version = $tmp[0]; unset($tmp); - unset($parts); //* Copy dovecot configuration file - if($dovecot_version == 2) { + if(version_compare($dovecot_version,2) >= 0) { if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot2.conf.master')) { copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot2.conf.master', $config_dir.'/'.$configfile); } else { copy('tpl/debian6_dovecot2.conf.master', $config_dir.'/'.$configfile); } replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0); + if(version_compare($dovecot_version,2.1) < 0) { + removeLine($config_dir.'/'.$configfile, 'ssl_protocols ='); + } } else { if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master')) { copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master', $config_dir.'/'.$configfile); @@ -99,6 +100,8 @@ class installer extends installer_base { copy('tpl/debian6_dovecot.conf.master', $config_dir.'/'.$configfile); } } + + //* dovecot-sql.conf $configfile = 'dovecot-sql.conf'; diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 86429a9fc330594ada956437aabadb29c8a6629c..f0a35f105706adfd069d4f8e06ca74be57c06384 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -983,19 +983,20 @@ class installer_base { //* Get the dovecot version exec('dovecot --version', $tmp); - $parts = explode('.', trim($tmp[0])); - $dovecot_version = $parts[0]; + $dovecot_version = $tmp[0]; unset($tmp); - unset($parts); //* Copy dovecot configuration file - if($dovecot_version == 2) { + if(version_compare($dovecot_version,2) >= 0) { if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot2.conf.master')) { copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot2.conf.master', $config_dir.'/'.$configfile); } else { copy('tpl/debian_dovecot2.conf.master', $config_dir.'/'.$configfile); } replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0); + if(version_compare($dovecot_version,2.1) < 0) { + removeLine($config_dir.'/'.$configfile, 'ssl_protocols ='); + } } else { if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master')) { copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master', $config_dir.'/'.$configfile);