From b4f7e40e49c1f91c45bc0018d378e75936733f24 Mon Sep 17 00:00:00 2001 From: marcelloc Date: Mon, 5 Sep 2011 16:38:32 -0300 Subject: postfix v2 fix postfix_recipients.php file --- config/postfix/postfix.inc | 12 ++++++------ config/postfix/postfix_recipientes.php | 4 ---- config/postfix/postfix_recipients.php | 4 ++++ config/postfix/postfix_view_config.php | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 config/postfix/postfix_recipientes.php create mode 100644 config/postfix/postfix_recipients.php (limited to 'config/postfix') diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc index 3d1ff947..5577f4d5 100644 --- a/config/postfix/postfix.inc +++ b/config/postfix/postfix.inc @@ -59,7 +59,7 @@ function sync_relay_recipients($via_cron="cron"){ if($postfix_recipients_config['enable_ldap']){ #validate cront job if(preg_match("/(\d+)(\w)/",$postfix_recipients_config['freq'],$matches)){ - $cron_sufix="\t*\t*\troot\t/usr/local/bin/php /usr/local/www/postfix_recipientes.php"; + $cron_sufix="\t*\t*\troot\t/usr/local/bin/php /usr/local/www/postfix_recipients.php"; switch ($matches[2]){ case m: $cron= "*/".$matches[1]."\t*\t*".$cron_sufix; @@ -76,9 +76,9 @@ function sync_relay_recipients($via_cron="cron"){ #update cront job file $crontab = file('/etc/crontab'); foreach ($crontab as $line) - $new_cron.=(preg_match("/postfix_recipientes.php/",$line)?$cron."\n":$line); + $new_cron.=(preg_match("/postfix_recipients.php/",$line)?$cron."\n":$line); #include if conf does not exist in crontab - $new_cron.=(!preg_match("/postfix_recipientes.php/",$new_cron)?"\n".$cron."\n\n":""); + $new_cron.=(!preg_match("/postfix_recipients.php/",$new_cron)?"\n".$cron."\n\n":""); file_put_contents("/etc/crontab",$new_cron, LOCK_EX); #check crontab changes $md5_new_file = trim(md5_file('/etc/crontab')); @@ -139,12 +139,12 @@ function sync_relay_recipients($via_cron="cron"){ } } #save all relay recipients and reload postfix - file_put_contents("/usr/local/etc/postfix/relay_recipientes",$relay_ldap_recipients."\n".$relay_recipients, LOCK_EX); - exec("/usr/local/sbin/postmap /usr/local/etc/postfix/relay_recipientes"); + file_put_contents("/usr/local/etc/postfix/relay_recipients",$relay_ldap_recipients."\n".$relay_recipients, LOCK_EX); + exec("/usr/local/sbin/postmap /usr/local/etc/postfix/relay_recipients"); mwexec("/usr/local/sbin/postfix reload"); } if($relay_recipients !="" || $relay_ldap_recipients!="") - return("relay_recipient_maps = hash:/usr/local/etc/postfix/relay_recipientes\n"); + return("relay_recipient_maps = hash:/usr/local/etc/postfix/relay_recipients\n"); } function sync_package_postfix() { global $config; diff --git a/config/postfix/postfix_recipientes.php b/config/postfix/postfix_recipientes.php deleted file mode 100644 index 0deb2f79..00000000 --- a/config/postfix/postfix_recipientes.php +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/config/postfix/postfix_recipients.php b/config/postfix/postfix_recipients.php new file mode 100644 index 00000000..0deb2f79 --- /dev/null +++ b/config/postfix/postfix_recipients.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/config/postfix/postfix_view_config.php b/config/postfix/postfix_view_config.php index ac6ad36b..1b3e9fc5 100644 --- a/config/postfix/postfix_view_config.php +++ b/config/postfix/postfix_view_config.php @@ -86,7 +86,7 @@ include("head.inc");