From 330cb18c98016369e3c215b65bb475c90c8730dc Mon Sep 17 00:00:00 2001 From: marcelloc Date: Mon, 11 Feb 2013 10:30:58 -0200 Subject: mailscanner - include postfix user and folder check to avoid boot errors --- config/mailscanner/mailscanner.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'config/mailscanner') diff --git a/config/mailscanner/mailscanner.inc b/config/mailscanner/mailscanner.inc index 3ff4cd40..32cecf4f 100644 --- a/config/mailscanner/mailscanner.inc +++ b/config/mailscanner/mailscanner.inc @@ -383,7 +383,8 @@ Country Sub-Domains List = %etc-dir%/country.domains.conf chown ("/var/spool/MailScanner/{$msc_dir}",'postfix'); } } - chown ('/var/spool/postfix','postfix'); + if (is_dir('/var/spool/postfix')) + chown ('/var/spool/postfix','postfix'); $mlang=strtolower($report['language']); $mfiles[]="/usr/local/etc/MailScanner/virus.scanners.conf"; @@ -590,7 +591,7 @@ Country Sub-Domains List = %etc-dir%/country.domains.conf } } file_put_contents($script, $new_clamav_startup, LOCK_EX); - + mwexec("/usr/sbin/pw user show postfix || /usr/sbin/pw user add -n postfix -s /usr/sbin/nologin"); chmod ($script,0755); if($config['installedpackages']['mailscanner']['config'][0]['enable']){ if (is_process_running('clamd')){ -- cgit v1.2.3