aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcelloc <marcellocoutinho@gmail.com>2013-02-11 10:30:58 -0200
committermarcelloc <marcellocoutinho@gmail.com>2013-02-11 10:30:58 -0200
commit330cb18c98016369e3c215b65bb475c90c8730dc (patch)
treea6e0b39f296c9f3f124663933de60f86b8167ca3
parentc81902f92799a1f566667f8fae07ecb92069372f (diff)
downloadpfsense-packages-330cb18c98016369e3c215b65bb475c90c8730dc.tar.gz
pfsense-packages-330cb18c98016369e3c215b65bb475c90c8730dc.tar.bz2
pfsense-packages-330cb18c98016369e3c215b65bb475c90c8730dc.zip
mailscanner - include postfix user and folder check to avoid boot errors
-rw-r--r--config/mailscanner/mailscanner.inc5
1 files changed, 3 insertions, 2 deletions
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')){