File tree Expand file tree Collapse file tree 4 files changed +56
-4
lines changed
Expand file tree Collapse file tree 4 files changed +56
-4
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,19 @@ class installer extends installer_base {
3333 public function configure_dovecot ()
3434 {
3535 global $ conf ;
36+
37+ $ virtual_transport = 'dovecot ' ;
38+
39+ // check if virtual_transport must be changed
40+ if ($ this ->is_update ) {
41+ $ tmp = $ inst ->db ->queryOneRecord ("SELECT * FROM " .$ conf ["mysql " ]["database " ].".server WHERE server_id = " .$ conf ['server_id ' ]);
42+ $ ini_array = ini_to_array (stripslashes ($ tmp ['config ' ]));
43+ // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni()
44+
45+ if (isset ($ ini_array ['mail ' ]['mailbox_virtual_uidgid_maps ' ]) && $ ini_array ['mail ' ]['mailbox_virtual_uidgid_maps ' ] == 'y ' ) {
46+ $ virtual_transport = 'lmtp:unix:private/dovecot-lmtp ' ;
47+ }
48+ }
3649
3750 $ config_dir = $ conf ['dovecot ' ]['config_dir ' ];
3851
@@ -57,7 +70,7 @@ public function configure_dovecot()
5770 // Adding the amavisd commands to the postfix configuration
5871 $ postconf_commands = array (
5972 'dovecot_destination_recipient_limit = 1 ' ,
60- 'virtual_transport = dovecot ' ,
73+ 'virtual_transport = ' . $ virtual_transport ,
6174 'smtpd_sasl_type = dovecot ' ,
6275 'smtpd_sasl_path = private/auth '
6376 );
Original file line number Diff line number Diff line change @@ -376,6 +376,19 @@ public function configure_dovecot()
376376 {
377377 global $ conf ;
378378
379+ $ virtual_transport = 'dovecot ' ;
380+
381+ // check if virtual_transport must be changed
382+ if ($ this ->is_update ) {
383+ $ tmp = $ inst ->db ->queryOneRecord ("SELECT * FROM " .$ conf ["mysql " ]["database " ].".server WHERE server_id = " .$ conf ['server_id ' ]);
384+ $ ini_array = ini_to_array (stripslashes ($ tmp ['config ' ]));
385+ // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni()
386+
387+ if (isset ($ ini_array ['mail ' ]['mailbox_virtual_uidgid_maps ' ]) && $ ini_array ['mail ' ]['mailbox_virtual_uidgid_maps ' ] == 'y ' ) {
388+ $ virtual_transport = 'lmtp:unix:private/dovecot-lmtp ' ;
389+ }
390+ }
391+
379392 $ config_dir = $ conf ['dovecot ' ]['config_dir ' ];
380393
381394 //* Use /etc/dovecot as config dir if exists
@@ -402,7 +415,7 @@ public function configure_dovecot()
402415 // Adding the amavisd commands to the postfix configuration
403416 $ postconf_commands = array (
404417 'dovecot_destination_recipient_limit = 1 ' ,
405- 'virtual_transport = dovecot ' ,
418+ 'virtual_transport = ' . $ virtual_transport ,
406419 'smtpd_sasl_type = dovecot ' ,
407420 'smtpd_sasl_path = private/auth ' ,
408421 );
Original file line number Diff line number Diff line change @@ -220,6 +220,19 @@ public function configure_dovecot()
220220 {
221221 global $ conf ;
222222
223+ $ virtual_transport = 'dovecot ' ;
224+
225+ // check if virtual_transport must be changed
226+ if ($ this ->is_update ) {
227+ $ tmp = $ inst ->db ->queryOneRecord ("SELECT * FROM " .$ conf ["mysql " ]["database " ].".server WHERE server_id = " .$ conf ['server_id ' ]);
228+ $ ini_array = ini_to_array (stripslashes ($ tmp ['config ' ]));
229+ // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni()
230+
231+ if (isset ($ ini_array ['mail ' ]['mailbox_virtual_uidgid_maps ' ]) && $ ini_array ['mail ' ]['mailbox_virtual_uidgid_maps ' ] == 'y ' ) {
232+ $ virtual_transport = 'lmtp:unix:private/dovecot-lmtp ' ;
233+ }
234+ }
235+
223236 $ config_dir = $ conf ['dovecot ' ]['config_dir ' ];
224237
225238 $ configfile = $ conf ['postfix ' ]['config_dir ' ].'/master.cf ' ;
@@ -245,7 +258,7 @@ public function configure_dovecot()
245258 //* Reconfigure postfix to use dovecot authentication
246259 $ postconf_commands = array (
247260 'dovecot_destination_recipient_limit = 1 ' ,
248- 'virtual_transport = dovecot ' ,
261+ 'virtual_transport = ' . $ virtual_transport ,
249262 'smtpd_sasl_type = dovecot ' ,
250263 'smtpd_sasl_path = private/auth '
251264 );
Original file line number Diff line number Diff line change @@ -430,6 +430,19 @@ public function configure_dovecot()
430430 {
431431 global $ conf ;
432432
433+ $ virtual_transport = 'dovecot ' ;
434+
435+ // check if virtual_transport must be changed
436+ if ($ this ->is_update ) {
437+ $ tmp = $ inst ->db ->queryOneRecord ("SELECT * FROM " .$ conf ["mysql " ]["database " ].".server WHERE server_id = " .$ conf ['server_id ' ]);
438+ $ ini_array = ini_to_array (stripslashes ($ tmp ['config ' ]));
439+ // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni()
440+
441+ if (isset ($ ini_array ['mail ' ]['mailbox_virtual_uidgid_maps ' ]) && $ ini_array ['mail ' ]['mailbox_virtual_uidgid_maps ' ] == 'y ' ) {
442+ $ virtual_transport = 'lmtp:unix:private/dovecot-lmtp ' ;
443+ }
444+ }
445+
433446 $ config_dir = $ conf ['dovecot ' ]['config_dir ' ];
434447
435448 //* Configure master.cf and add a line for deliver
@@ -453,7 +466,7 @@ public function configure_dovecot()
453466 // Adding the amavisd commands to the postfix configuration
454467 $ postconf_commands = array (
455468 'dovecot_destination_recipient_limit = 1 ' ,
456- 'virtual_transport = dovecot ' ,
469+ 'virtual_transport = ' . $ virtual_transport ,
457470 'smtpd_sasl_type = dovecot ' ,
458471 'smtpd_sasl_path = private/auth ' ,
459472 );
You can’t perform that action at this time.
0 commit comments