aboutsummaryrefslogtreecommitdiffstats
path: root/config/postfix
diff options
context:
space:
mode:
Diffstat (limited to 'config/postfix')
-rwxr-xr-xconfig/postfix/postfix.inc11
-rwxr-xr-xconfig/postfix/postfix_queue.php6
-rw-r--r--config/postfix/postfix_view_config.php6
3 files changed, 9 insertions, 14 deletions
diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc
index 99af671b..eb5499aa 100755
--- a/config/postfix/postfix.inc
+++ b/config/postfix/postfix.inc
@@ -37,10 +37,7 @@ require_once("globals.inc");
$pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
if (is_dir('/usr/pbi/postfix-' . php_uname("m"))) {
- if ($pfs_version == 2.2)
- define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m")."/local");
- else
- define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m"));
+ define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m"));
} else {
define('POSTFIX_LOCALBASE','/usr/local');
}
@@ -731,6 +728,12 @@ MASTEREOF2;
conf_mount_rw();
+ //check postfix etc dir on 2.2
+ $pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
+ $postfix_etc_lnk="/usr/local/etc/postfix";
+ if ($pfs_version == 2.2 && !is_dir($postfix_etc_lnk))
+ @symlink(POSTFIX_LOCALBASE.'/etc/postfix',$postfix_etc_lnk);
+
log_error("Writing out configuration");
file_put_contents(POSTFIX_LOCALBASE."/etc/postfix/main.cf", $postfix_main, LOCK_EX);
file_put_contents(POSTFIX_LOCALBASE."/etc/postfix/master.cf", $postfix_master, LOCK_EX);
diff --git a/config/postfix/postfix_queue.php b/config/postfix/postfix_queue.php
index 6f8a7e19..1db2b8e2 100755
--- a/config/postfix/postfix_queue.php
+++ b/config/postfix/postfix_queue.php
@@ -34,12 +34,8 @@ $uname=posix_uname();
if ($uname['machine']=='amd64')
ini_set('memory_limit', '250M');
-$pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
if (is_dir('/usr/pbi/postfix-' . php_uname("m"))) {
- if ($pfs_version == 2.2)
- define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m")."/local");
- else
- define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m"));
+ define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m"));
} else {
define('POSTFIX_LOCALBASE','/usr/local');
}
diff --git a/config/postfix/postfix_view_config.php b/config/postfix/postfix_view_config.php
index f50ae991..a844ce65 100644
--- a/config/postfix/postfix_view_config.php
+++ b/config/postfix/postfix_view_config.php
@@ -29,12 +29,8 @@
*/
$shortcut_section = "postfix";
require("guiconfig.inc");
-$pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
if (is_dir('/usr/pbi/postfix-' . php_uname("m"))) {
- if ($pfs_version == 2.2)
- define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m")."/local");
- else
- define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m"));
+ define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m"));
} else {
define('POSTFIX_LOCALBASE','/usr/local');
}