aboutsummaryrefslogtreecommitdiffstats
path: root/config/postfix/postfix.inc
diff options
context:
space:
mode:
Diffstat (limited to 'config/postfix/postfix.inc')
-rwxr-xr-xconfig/postfix/postfix.inc15
1 files changed, 9 insertions, 6 deletions
diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc
index 8f27680d..99af671b 100755
--- a/config/postfix/postfix.inc
+++ b/config/postfix/postfix.inc
@@ -35,12 +35,15 @@ require_once("functions.inc");
require_once("pkg-utils.inc");
require_once("globals.inc");
-$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
-if ($pf_version > 2.0)
- define('POSTFIX_LOCALBASE', '/usr/pbi/postfix-' . php_uname("m"));
-else
- define('POSTFIX_LOCALBASE','/usr/local');
-
+$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"));
+} else {
+ define('POSTFIX_LOCALBASE','/usr/local');
+}
$uname=posix_uname();
if ($uname['machine']=='amd64')