mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
If we can write to the logfile, and syslog is off, enable logging to the logfile.
This commit is contained in:
parent
e0438a703b
commit
b5275bb4af
@ -163,6 +163,15 @@ if (-f '/etc/mail/postfixadmin/vacation.conf') {
|
||||
|
||||
# =========== end configuration ===========
|
||||
|
||||
# Try and enable log_to_file if syslog is disabled
|
||||
if ($syslog == 0 && $log_to_file == 0 && (
|
||||
(-f $logfile && -w $logfile)
|
||||
||
|
||||
(! -f $logfile && -w dirname($logfile)))
|
||||
) {
|
||||
$log_to_file=1;
|
||||
}
|
||||
|
||||
if($log_to_file == 1) {
|
||||
if (( ! -w $logfile ) && (! -w dirname($logfile))) {
|
||||
# Cannot log; no where to write to.
|
||||
|
Loading…
Reference in New Issue
Block a user