diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-11-18 22:08:39 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-11-18 22:08:39 -0200 |
commit | 47ab066c5a81d7833eda22229e2ef2ed925429c1 (patch) | |
tree | 968c563797d183fd6d20d37591a23a7ba1aac1b0 /config/postfix/postfix_queue.php | |
parent | fa5eabb9ffff905b72b85360eb43f716d745e9ad (diff) | |
parent | c039b33454e93ebdb8ec6447bdd3fca1568c2838 (diff) | |
download | pfsense-packages-47ab066c5a81d7833eda22229e2ef2ed925429c1.tar.gz pfsense-packages-47ab066c5a81d7833eda22229e2ef2ed925429c1.tar.bz2 pfsense-packages-47ab066c5a81d7833eda22229e2ef2ed925429c1.zip |
Merge pull request #733 from marcelloc/master
Diffstat (limited to 'config/postfix/postfix_queue.php')
-rwxr-xr-x | config/postfix/postfix_queue.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/config/postfix/postfix_queue.php b/config/postfix/postfix_queue.php index 4f072eba..6f8a7e19 100755 --- a/config/postfix/postfix_queue.php +++ b/config/postfix/postfix_queue.php @@ -34,12 +34,15 @@ $uname=posix_uname(); if ($uname['machine']=='amd64') ini_set('memory_limit', '250M'); -$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'); +} function get_cmd(){ if ($_REQUEST['cmd'] =='mailq'){ #exec("/usr/local/bin/mailq" . escapeshellarg('^'.$m.$j." ".$hour.".*".$grep)." /var/log/maillog", $lists); |