From 88856ad94b68390cb166ac5074b61b77632aa140 Mon Sep 17 00:00:00 2001 From: Marcello Coutinho Date: Thu, 9 May 2013 14:26:26 -0300 Subject: postfix - include helo acl option --- config/postfix/postfix.inc | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) (limited to 'config/postfix/postfix.inc') diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc index 83fc46e2..3f465969 100644 --- a/config/postfix/postfix.inc +++ b/config/postfix/postfix.inc @@ -278,7 +278,7 @@ function check_cron(){ } -function sync_package_postfix() { +function sync_package_postfix($via_rpc=false) { global $config; # detect boot process @@ -289,7 +289,7 @@ function sync_package_postfix() { $boot_process="on"; } - if(is_process_running("master") && isset($boot_process)) + if(is_process_running("master") && isset($boot_process) && $via_rpc==false) return; #check patch in /etc/inc/config. @@ -360,7 +360,7 @@ function sync_package_postfix() { $copyright=<< "postfix.sh", "start" => $start, "stop" => $stop)); - conf_mount_ro(); - sleep(1); - if ($config['installedpackages']['postfix']['config'][0]['enable_postfix']){ + if (is_array($config['installedpackages']['postfix']) && $config['installedpackages']['postfix']['config'][0]['enable_postfix']){ log_error("Reloading/starting postfix"); system('/bin/chmod +x /usr/local/etc/rc.d/postfix.sh'); mwexec_bg(POSTFIX_LOCALBASE."/sbin/postfix reload || /usr/local/etc/rc.d/postfix.sh start"); @@ -747,6 +763,8 @@ EOF; mwexec("/usr/local/etc/rc.d/postfix.sh stop"); system('/bin/chmod -x /usr/local/etc/rc.d/postfix.sh'); } + + conf_mount_ro(); } function postfix_validate_input($post, &$input_errors) { @@ -782,7 +800,8 @@ function postfix_php_install_command() { function postfix_php_deinstall_command() { global $config; #disable service - $config['installedpackages']['postfix']['config'][0]['enable_postfix']=""; + if (is_array($config['installedpackages']['postfix'])) + $config['installedpackages']['postfix']['config'][0]['enable_postfix']=""; write_config(); sync_package_postfix(); conf_mount_rw(); @@ -924,7 +943,7 @@ function postfix_do_xmlrpc_sync($sync_to_ip,$username,$password,$sync_type,$sync /* tell postfix to reload our settings on the destionation sync host. */ $method = 'pfsense.exec_php'; $execcmd = "require_once('/usr/local/pkg/postfix.inc');\n"; - $execcmd .= "sync_package_postfix();"; + $execcmd .= "sync_package_postfix(true);"; /* assemble xmlrpc payload */ $params = array( -- cgit v1.2.3 From d10fa5428841544605fc5768f0cd0305574ebf8d Mon Sep 17 00:00:00 2001 From: Marcello Coutinho Date: Mon, 13 May 2013 11:36:30 -0300 Subject: postfix - fix pcre helo acl file check on 2.1 --- config/postfix/postfix.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config/postfix/postfix.inc') diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc index 3f465969..b564fd47 100644 --- a/config/postfix/postfix.inc +++ b/config/postfix/postfix.inc @@ -463,7 +463,7 @@ EOF; } if ($antispam['reject_unknown_helo_hostname']){ $reject_unknown_helo_hostname = <<