Commit 5d45b769 authored by Florian Schaal's avatar Florian Schaal
Browse files

fixed installer - #3750

parent eca13b96
......@@ -53,8 +53,9 @@ class installer extends installer_base {
$config_dir = $conf['postfix']['config_dir'];
//* Configure master.cf and add a line for deliver
if ($this->postfix_master()) {
exec ("postconf -M dovecot.unix &> /dev/null", $out, $ret);
$add_dovecot_service = @($out[0]=='')?true:false;
exec ("postconf -M dovecot.unix", $out, $ret); //* Postfix 2.9
if (!isset($out[0])) exec ("postconf -M dovecot/unix", $out, $ret); //* Postfix >= 2.11
$add_dovecot_service = @($out[0]=='')?true:false;
} else { //* fallback - postfix < 2.9
$content = rf($config_dir.'/master.cf');
$add_dovecot_service = @(!stristr($content, "dovecot/deliver"))?true:false;
......
......@@ -352,7 +352,8 @@ class installer_dist extends installer_base {
$config_dir = $conf['postfix']['config_dir'];
//* Configure master.cf and add a line for deliver
if ($this->postfix_master()) {
exec ("postconf -M dovecot.unix &> /dev/null", $out, $ret);
exec ("postconf -M dovecot.unix", $out, $ret); //* Postfix 2.9
if (!isset($out[0])) exec ("postconf -M dovecot/unix", $out, $ret); //* Postfix >= 2.11
$add_dovecot_service = @($out[0]=='')?true:false;
} else { //* fallback - postfix < 2.9
$content = rf($config_dir.'/master.cf');
......
......@@ -273,7 +273,8 @@ class installer extends installer_base
$config_dir = $conf['postfix']['config_dir'];
//* Configure master.cf and add a line for deliver
if ($this->postfix_master()) {
exec ("postconf -M dovecot.unix &> /dev/null", $out, $ret);
exec ("postconf -M dovecot.unix", $out, $ret); //* Postfix 2.9
if (!isset($out[0])) exec ("postconf -M dovecot/unix", $out, $ret); //* Postfix >= 2.11
$add_dovecot_service = @($out[0]=='')?true:false;
} else { //* fallback - postfix < 2.9
$content = rf($config_dir.'/master.cf');
......
......@@ -367,7 +367,8 @@ class installer_dist extends installer_base {
$config_dir = $conf['postfix']['config_dir'];
//* Configure master.cf and add a line for deliver
if ($this->postfix_master()) {
exec ("postconf -M dovecot.unix &> /dev/null", $out, $ret);
exec ("postconf -M dovecot.unix", $out, $ret); //* Postfix 2.9
if (!isset($out[0])) exec ("postconf -M dovecot/unix", $out, $ret); //* Postfix >= 2.11
$add_dovecot_service = @($out[0]=='')?true:false;
} else { //* fallback - postfix < 2.9
$content = rf($config_dir.'/master.cf');
......
......@@ -1145,7 +1145,8 @@ class installer_base {
$config_dir = $conf['postfix']['config_dir'];
//* Configure master.cf and add a line for deliver
if ($this->postfix_master()) {
exec ("postconf -M dovecot.unix &> /dev/null", $out, $ret);
exec ("postconf -M dovecot.unix", $out, $ret); //* Postfix 2.9
if (!isset($out[0])) exec ("postconf -M dovecot/unix", $out, $ret); //* Postfix >= 2.11
$add_dovecot_service = @($out[0]=='')?true:false;
} else { //* fallback - postfix < 2.9
$content = rf($config_dir.'/master.cf');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment