aboutsummaryrefslogtreecommitdiffstats
path: root/config/postfix
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2012-05-03 19:30:17 -0300
committermarcelloc <marcellocoutinho@gmail.com>2012-05-03 19:30:17 -0300
commita06400b906893ccace83e11cf5bb76e431557b24 (patch)
tree6b0aa7422cc637c1048b028557799e51d023417e /config/postfix
parent08e2b2389dd192eaacc637fbbb97aa287de8ad0f (diff)
downloadpfsense-packages-a06400b906893ccace83e11cf5bb76e431557b24.tar.gz
pfsense-packages-a06400b906893ccace83e11cf5bb76e431557b24.tar.bz2
pfsense-packages-a06400b906893ccace83e11cf5bb76e431557b24.zip
postfix - reduce boot process and include startup check
Diffstat (limited to 'config/postfix')
-rw-r--r--config/postfix/postfix.inc21
1 files changed, 20 insertions, 1 deletions
diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc
index f76b523a..d92e380f 100644
--- a/config/postfix/postfix.inc
+++ b/config/postfix/postfix.inc
@@ -34,6 +34,10 @@ require_once("functions.inc");
require_once("pkg-utils.inc");
require_once("globals.inc");
+$uname=posix_uname();
+if ($uname['machine']=='amd64')
+ ini_set('memory_limit', '250M');
+
function px_text_area_decode($text){
return preg_replace('/\r\n/', "\n",base64_decode($text));
}
@@ -268,6 +272,17 @@ function check_cron(){
function sync_package_postfix() {
global $config;
+ # detect boot process
+ if (is_array($_POST)){
+ if (preg_match("/\w+/",$_POST['__csrf_magic']))
+ unset($boot_process);
+ else
+ $boot_process="on";
+ }
+
+ if(is_process_running("master") && isset($boot_process))
+ return;
+
#check patch in /etc/inc/config.
$relay_domains = "";
$transport = "";
@@ -678,7 +693,11 @@ MASTEREOF2;
touch("/etc/mail/aliases");
exec("/usr/local/bin/newaliases");
postfix_start();
- postfix_sync_on_changes();
+
+ #Do not sync during boot
+ if(!isset($boot_process))
+ postfix_sync_on_changes();
+
}
function postfix_start(){
global $config;