aboutsummaryrefslogtreecommitdiffstats
path: root/config/postfix
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2013-05-27 19:11:02 -0300
committerMarcello Coutinho <marcellocoutinho@gmail.com>2013-05-27 19:11:02 -0300
commit2d84c9671fc8a0b78455372ef836c4510d18a5d4 (patch)
tree24e8aa57e446d37b572bc9d68e9c1d8b8528016e /config/postfix
parent63b058248193a778c20611326d7e3bc3de0651ff (diff)
downloadpfsense-packages-2d84c9671fc8a0b78455372ef836c4510d18a5d4.tar.gz
pfsense-packages-2d84c9671fc8a0b78455372ef836c4510d18a5d4.tar.bz2
pfsense-packages-2d84c9671fc8a0b78455372ef836c4510d18a5d4.zip
postfix - fix sync code via rpc using three or more hosts
Diffstat (limited to 'config/postfix')
-rwxr-xr-x[-rw-r--r--]config/postfix/postfix.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc
index b564fd47..4378a1f9 100644..100755
--- a/config/postfix/postfix.inc
+++ b/config/postfix/postfix.inc
@@ -278,9 +278,10 @@ function check_cron(){
}
-function sync_package_postfix($via_rpc=false) {
+function sync_package_postfix($via_rpc="no") {
global $config;
+ log_error("sync_package_postfix called with via_rpc={$via_rpc}");
# detect boot process
if (is_array($_POST)){
if (preg_match("/\w+/",$_POST['__csrf_magic']))
@@ -289,7 +290,7 @@ function sync_package_postfix($via_rpc=false) {
$boot_process="on";
}
- if(is_process_running("master") && isset($boot_process) && $via_rpc==false)
+ if(is_process_running("master") && isset($boot_process) && $via_rpc=="no")
return;
#check patch in /etc/inc/config.
@@ -731,7 +732,7 @@ MASTEREOF2;
postfix_start();
#Do not sync during boot
- if(!isset($boot_process))
+ if(!isset($boot_process) || $via_rpc=="yes")
postfix_sync_on_changes();
}
@@ -944,7 +945,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(true);";
+ $execcmd .= "sync_package_postfix('yes');";
/* assemble xmlrpc payload */
$params = array(