File tree Expand file tree Collapse file tree 5 files changed +11
-6
lines changed
Expand file tree Collapse file tree 5 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,9 @@ public function configure_dovecot()
5353 $ config_dir = $ conf ['postfix ' ]['config_dir ' ];
5454 //* Configure master.cf and add a line for deliver
5555 if ($ this ->postfix_master ()) {
56- exec ("postconf -M dovecot.unix &> /dev/null " , $ out , $ ret );
57- $ add_dovecot_service = @($ out [0 ]=='' )?true :false ;
56+ exec ("postconf -M dovecot.unix " , $ out , $ ret ); //* Postfix 2.9
57+ if (!isset ($ out [0 ])) exec ("postconf -M dovecot/unix " , $ out , $ ret ); //* Postfix >= 2.11
58+ $ add_dovecot_service = @($ out [0 ]=='' )?true :false ;
5859 } else { //* fallback - postfix < 2.9
5960 $ content = rf ($ config_dir .'/master.cf ' );
6061 $ add_dovecot_service = @(!stristr ($ content , "dovecot/deliver " ))?true :false ;
Original file line number Diff line number Diff line change @@ -352,7 +352,8 @@ public function configure_dovecot()
352352 $ config_dir = $ conf ['postfix ' ]['config_dir ' ];
353353 //* Configure master.cf and add a line for deliver
354354 if ($ this ->postfix_master ()) {
355- exec ("postconf -M dovecot.unix &> /dev/null " , $ out , $ ret );
355+ exec ("postconf -M dovecot.unix " , $ out , $ ret ); //* Postfix 2.9
356+ if (!isset ($ out [0 ])) exec ("postconf -M dovecot/unix " , $ out , $ ret ); //* Postfix >= 2.11
356357 $ add_dovecot_service = @($ out [0 ]=='' )?true :false ;
357358 } else { //* fallback - postfix < 2.9
358359 $ content = rf ($ config_dir .'/master.cf ' );
Original file line number Diff line number Diff line change @@ -273,7 +273,8 @@ public function configure_dovecot()
273273 $ config_dir = $ conf ['postfix ' ]['config_dir ' ];
274274 //* Configure master.cf and add a line for deliver
275275 if ($ this ->postfix_master ()) {
276- exec ("postconf -M dovecot.unix &> /dev/null " , $ out , $ ret );
276+ exec ("postconf -M dovecot.unix " , $ out , $ ret ); //* Postfix 2.9
277+ if (!isset ($ out [0 ])) exec ("postconf -M dovecot/unix " , $ out , $ ret ); //* Postfix >= 2.11
277278 $ add_dovecot_service = @($ out [0 ]=='' )?true :false ;
278279 } else { //* fallback - postfix < 2.9
279280 $ content = rf ($ config_dir .'/master.cf ' );
Original file line number Diff line number Diff line change @@ -367,7 +367,8 @@ public function configure_dovecot()
367367 $ config_dir = $ conf ['postfix ' ]['config_dir ' ];
368368 //* Configure master.cf and add a line for deliver
369369 if ($ this ->postfix_master ()) {
370- exec ("postconf -M dovecot.unix &> /dev/null " , $ out , $ ret );
370+ exec ("postconf -M dovecot.unix " , $ out , $ ret ); //* Postfix 2.9
371+ if (!isset ($ out [0 ])) exec ("postconf -M dovecot/unix " , $ out , $ ret ); //* Postfix >= 2.11
371372 $ add_dovecot_service = @($ out [0 ]=='' )?true :false ;
372373 } else { //* fallback - postfix < 2.9
373374 $ content = rf ($ config_dir .'/master.cf ' );
Original file line number Diff line number Diff line change @@ -1145,7 +1145,8 @@ public function configure_dovecot() {
11451145 $ config_dir = $ conf ['postfix ' ]['config_dir ' ];
11461146 //* Configure master.cf and add a line for deliver
11471147 if ($ this ->postfix_master ()) {
1148- exec ("postconf -M dovecot.unix &> /dev/null " , $ out , $ ret );
1148+ exec ("postconf -M dovecot.unix " , $ out , $ ret ); //* Postfix 2.9
1149+ if (!isset ($ out [0 ])) exec ("postconf -M dovecot/unix " , $ out , $ ret ); //* Postfix >= 2.11
11491150 $ add_dovecot_service = @($ out [0 ]=='' )?true :false ;
11501151 } else { //* fallback - postfix < 2.9
11511152 $ content = rf ($ config_dir .'/master.cf ' );
You can’t perform that action at this time.
0 commit comments