Skip to content

Commit 59baa48

Browse files
author
Dominik Müller
committed
check switching to lmtp in update-case too
1 parent d7480c8 commit 59baa48

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

install/lib/installer_base.lib.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,19 @@ public function configure_courier() {
930930

931931
public function configure_dovecot() {
932932
global $conf;
933+
934+
$virtual_transport = 'dovecot';
935+
936+
// check if virtual_transport must be changed
937+
if ($this->is_update) {
938+
$tmp = $inst->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']);
939+
$ini_array = ini_to_array(stripslashes($tmp['config']));
940+
// ini_array needs not to be checked, because already done in update.php -> updateDbAndIni()
941+
942+
if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
943+
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
944+
}
945+
}
933946

934947
$config_dir = $conf['dovecot']['config_dir'];
935948

@@ -954,7 +967,7 @@ public function configure_dovecot() {
954967
// Adding the amavisd commands to the postfix configuration
955968
$postconf_commands = array (
956969
'dovecot_destination_recipient_limit = 1',
957-
'virtual_transport = dovecot',
970+
'virtual_transport = '.$virtual_transport,
958971
'smtpd_sasl_type = dovecot',
959972
'smtpd_sasl_path = private/auth'
960973
);

0 commit comments

Comments
 (0)