diff options
author | marcelloc <marcellocoutinho@gmail.com> | 2012-02-16 20:40:44 -0200 |
---|---|---|
committer | marcelloc <marcellocoutinho@gmail.com> | 2012-02-16 20:40:44 -0200 |
commit | 7b5250ddad2ae8502f159f5c812fe43655f2be36 (patch) | |
tree | f16230e243e1c8d23418c7dd4649c3c6ea78de3f /config/postfix/postfix.inc | |
parent | b4b24f1dcaa4249d52faf1cb7ba4f1d192779477 (diff) | |
download | pfsense-packages-7b5250ddad2ae8502f159f5c812fe43655f2be36.tar.gz pfsense-packages-7b5250ddad2ae8502f159f5c812fe43655f2be36.tar.bz2 pfsense-packages-7b5250ddad2ae8502f159f5c812fe43655f2be36.zip |
postfix - change local file recipients to url fetch with cron
Diffstat (limited to 'config/postfix/postfix.inc')
-rw-r--r-- | config/postfix/postfix.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc index 831e6bb2..5fde243e 100644 --- a/config/postfix/postfix.inc +++ b/config/postfix/postfix.inc @@ -56,14 +56,17 @@ function sync_relay_recipients($via_cron="cron"){ $ad_export="/usr/local/etc/postfix/adexport.pl"; $postfix_enabled=$config['installedpackages']['postfix']['config'][0]['enable_postfix']; if (is_array($config['installedpackages']['postfixrecipients']['config'])) { - $postfix_recipients_config=$config['installedpackages']['postfixrecipients']['config'][0]; - if($postfix_recipients_config['location'] && file_exists($postfix_recipients_config['location'])) - $relay_recipients .= file_get_contents($postfix_recipients_config['location']); + $relay_ldap_recipients=""; + $postfix_recipients_config=$config['installedpackages']['postfixrecipients']['config'][0]; + if($postfix_recipients_config['enable_url'] && is_URL($postfix_recipients_config['custom_url'])){ + print "extracting from ".$postfix_recipients_config['custom_url']."..."; + $relay_recipients .= file_get_contents($postfix_recipients_config['custom_url']); + print "(". count(file($postfix_recipients_config['custom_url'])).")\n"; + } if($postfix_recipients_config['custom_recipients']) $relay_recipients .= px_text_area_decode($postfix_recipients_config['custom_recipients']); if($postfix_recipients_config['enable_ldap']){ #validate cront job - $relay_ldap_recipients=""; if ($via_cron == "gui"){ #running via pfsense gui, not time for ldap fetch. $ldap_recipients='/usr/local/etc/postfix/relay_ldap_recipients.txt'; |