From d7480c82525c02c9d7a174104a7e08192e70245c Mon Sep 17 00:00:00 2001
From: Dominik Müller <info@profi-webdesign.com>
Date: Sat, 11 Oct 2014 13:52:43 -0400
Subject: [PATCH] Only Use LMTP in case of webserver->mailserver uid-mapping Use dovecot or maildrop in default-cases Switching to LMTP and back included in server-postfix-plugin validator added to disable switching uid-mapping when already created mailusers or in multiserver-environment
---
install/dist/lib/gentoo.lib.php | 37 ++++++++++++++++++++++++++++++++++++-
1 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index 3ee3939..b419082 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -245,7 +245,7 @@
//* Reconfigure postfix to use dovecot authentication
$postconf_commands = array (
'dovecot_destination_recipient_limit = 1',
- 'virtual_transport = lmtp:unix:private/dovecot-lmtp',
+ 'virtual_transport = dovecot',
'smtpd_sasl_type = dovecot',
'smtpd_sasl_path = private/auth'
);
@@ -519,6 +519,7 @@
//* Copy the ISPConfig configuration include
+ /*
$content = $this->get_template_file('apache_ispconfig.conf', true);
$records = $this->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ".$conf["server_id"]." AND virtualhost = 'y'");
@@ -531,6 +532,37 @@
}
$this->write_config_file($conf['apache']['vhost_conf_dir'].'/000-ispconfig.conf', $content);
+ */
+
+ $tpl = new tpl('apache_ispconfig.conf.master');
+ $tpl->setVar('apache_version',getapacheversion());
+
+ $records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'");
+ $ip_addresses = array();
+
+ if(is_array($records) && count($records) > 0) {
+ foreach($records as $rec) {
+ if($rec['ip_type'] == 'IPv6') {
+ $ip_address = '['.$rec['ip_address'].']';
+ } else {
+ $ip_address = $rec['ip_address'];
+ }
+ $ports = explode(',', $rec['virtualhost_port']);
+ if(is_array($ports)) {
+ foreach($ports as $port) {
+ $port = intval($port);
+ if($port > 0 && $port < 65536 && $ip_address != '') {
+ $ip_addresses[] = array('ip_address' => $ip_address, 'port' => $port);
+ }
+ }
+ }
+ }
+ }
+
+ if(count($ip_addresses) > 0) $tpl->setLoop('ip_adresses',$ip_addresses);
+
+ wf($conf['apache']['vhost_conf_dir'].'/000-ispconfig.conf', $tpl->grab());
+ unset($tpl);
//* Gentoo by default does not include .vhost files. Add include line to config file.
$content = rf($conf['apache']['config_file']);
@@ -1071,6 +1103,9 @@
//* Remove Domain module as its functions are available in the client module now
if(@is_dir('/usr/local/ispconfig/interface/web/domain')) exec('rm -rf /usr/local/ispconfig/interface/web/domain');
+
+ // Add symlink for patch tool
+ if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch');
}
--
Gitblit v1.9.1