Commit 466f06a5 authored by Marius Cramer's avatar Marius Cramer

Merge branch 'master_fixes' into 'master'

Additional LMTP-Switch in Update-Case

check switching to lmtp in update-case too

See merge request !130
parents 559b657f a8aad2c0
......@@ -33,6 +33,19 @@ class installer extends installer_base {
public function configure_dovecot()
{
global $conf;
$virtual_transport = 'dovecot';
// check if virtual_transport must be changed
if ($this->is_update) {
$tmp = $inst->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']);
$ini_array = ini_to_array(stripslashes($tmp['config']));
// ini_array needs not to be checked, because already done in update.php -> updateDbAndIni()
if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
}
}
$config_dir = $conf['dovecot']['config_dir'];
......@@ -57,7 +70,7 @@ class installer extends installer_base {
// Adding the amavisd commands to the postfix configuration
$postconf_commands = array (
'dovecot_destination_recipient_limit = 1',
'virtual_transport = dovecot',
'virtual_transport = '.$virtual_transport,
'smtpd_sasl_type = dovecot',
'smtpd_sasl_path = private/auth'
);
......
......@@ -376,6 +376,19 @@ class installer_dist extends installer_base {
{
global $conf;
$virtual_transport = 'dovecot';
// check if virtual_transport must be changed
if ($this->is_update) {
$tmp = $inst->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']);
$ini_array = ini_to_array(stripslashes($tmp['config']));
// ini_array needs not to be checked, because already done in update.php -> updateDbAndIni()
if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
}
}
$config_dir = $conf['dovecot']['config_dir'];
//* Use /etc/dovecot as config dir if exists
......@@ -402,7 +415,7 @@ class installer_dist extends installer_base {
// Adding the amavisd commands to the postfix configuration
$postconf_commands = array (
'dovecot_destination_recipient_limit = 1',
'virtual_transport = dovecot',
'virtual_transport = '.$virtual_transport,
'smtpd_sasl_type = dovecot',
'smtpd_sasl_path = private/auth',
);
......
......@@ -220,6 +220,19 @@ class installer extends installer_base
{
global $conf;
$virtual_transport = 'dovecot';
// check if virtual_transport must be changed
if ($this->is_update) {
$tmp = $inst->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']);
$ini_array = ini_to_array(stripslashes($tmp['config']));
// ini_array needs not to be checked, because already done in update.php -> updateDbAndIni()
if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
}
}
$config_dir = $conf['dovecot']['config_dir'];
$configfile = $conf['postfix']['config_dir'].'/master.cf';
......@@ -245,7 +258,7 @@ class installer extends installer_base
//* Reconfigure postfix to use dovecot authentication
$postconf_commands = array (
'dovecot_destination_recipient_limit = 1',
'virtual_transport = dovecot',
'virtual_transport = '.$virtual_transport,
'smtpd_sasl_type = dovecot',
'smtpd_sasl_path = private/auth'
);
......
......@@ -430,6 +430,19 @@ class installer_dist extends installer_base {
{
global $conf;
$virtual_transport = 'dovecot';
// check if virtual_transport must be changed
if ($this->is_update) {
$tmp = $inst->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']);
$ini_array = ini_to_array(stripslashes($tmp['config']));
// ini_array needs not to be checked, because already done in update.php -> updateDbAndIni()
if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
}
}
$config_dir = $conf['dovecot']['config_dir'];
//* Configure master.cf and add a line for deliver
......@@ -453,7 +466,7 @@ class installer_dist extends installer_base {
// Adding the amavisd commands to the postfix configuration
$postconf_commands = array (
'dovecot_destination_recipient_limit = 1',
'virtual_transport = dovecot',
'virtual_transport = '.$virtual_transport,
'smtpd_sasl_type = dovecot',
'smtpd_sasl_path = private/auth',
);
......
......@@ -933,6 +933,19 @@ class installer_base {
public function configure_dovecot() {
global $conf;
$virtual_transport = 'dovecot';
// check if virtual_transport must be changed
if ($this->is_update) {
$tmp = $inst->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']);
$ini_array = ini_to_array(stripslashes($tmp['config']));
// ini_array needs not to be checked, because already done in update.php -> updateDbAndIni()
if(isset($ini_array['mail']['mailbox_virtual_uidgid_maps']) && $ini_array['mail']['mailbox_virtual_uidgid_maps'] == 'y') {
$virtual_transport = 'lmtp:unix:private/dovecot-lmtp';
}
}
$config_dir = $conf['dovecot']['config_dir'];
......@@ -957,7 +970,7 @@ class installer_base {
// Adding the amavisd commands to the postfix configuration
$postconf_commands = array (
'dovecot_destination_recipient_limit = 1',
'virtual_transport = dovecot',
'virtual_transport = '.$virtual_transport,
'smtpd_sasl_type = dovecot',
'smtpd_sasl_path = private/auth'
);
......
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