From 6fed1f42c3b08ab0debd9d3a1e05202b2ba32760 Mon Sep 17 00:00:00 2001 From: marcelloc Date: Wed, 21 Dec 2011 15:32:10 -0200 Subject: postfix - fix system.inc crash in pfsense 2.0.1 --- config/postfix/postfix.inc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'config/postfix') diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc index 182f9d00..4d203474 100644 --- a/config/postfix/postfix.inc +++ b/config/postfix/postfix.inc @@ -300,14 +300,13 @@ function sync_package_postfix() { $found_mail=0; foreach ($sys_log as $line){ $new_line=preg_replace('/mail.(.|crit);/',$mail_syslog,$line); - #set syslog entry mail.* %/var/log/maillog when log_to = system - if (preg_match ('/mail.(.|crit);/',$line) && $postfix_config['log_to'] =="maillog") + if (preg_match('/mail.*system.log/',$line) && $postfix_config['log_to'] =="maillog"){ $new_sys_log .= 'mail.*'."\t\t\t\t\t\t".'/var/log/maillog'."\n"; - #remove syslog entry mail.* %/var/log/maillog when log_to != system - if (preg_match ("/^mail/",$line)) - $new_sys_log .=""; - else - $new_sys_log .= $new_line; + } + if (preg_match('/maillog/',$line)){ + $new_line =""; + } + $new_sys_log .= $new_line; } if (!file_exists('/root/system.inc.backup')) { copy ($sys_log_file,'/root/system.inc.backup'); -- cgit v1.2.3