[dovecot-cvs] dovecot-lda/src deliver.c,1.45,1.46

cras at dovecot.org cras at dovecot.org
Thu Apr 13 22:46:10 EEST 2006


Update of /var/lib/cvs/dovecot-lda/src
In directory talvi:/tmp/cvs-serv20394

Modified Files:
	deliver.c 
Log Message:
Use syslog_facility setting



Index: deliver.c
===================================================================
RCS file: /var/lib/cvs/dovecot-lda/src/deliver.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- deliver.c	13 Apr 2006 18:45:50 -0000	1.45
+++ deliver.c	13 Apr 2006 19:46:08 -0000	1.46
@@ -452,9 +452,11 @@
 
 static void open_logfile(void)
 {
-	if (getenv("LOG_PATH") == NULL)
-		i_set_failure_syslog("deliver", LOG_NDELAY, LOG_MAIL);
-	else {
+	if (getenv("USE_SYSLOG") != NULL) {
+		const char *env = getenv("SYSLOG_FACILITY");
+		i_set_failure_syslog("deliver", LOG_NDELAY,
+				     env == NULL ? LOG_MAIL : atoi(env));
+	} else {
 		/* log to file or stderr */
 		i_set_failure_file(getenv("LOG_PATH"), "deliver");
 	}



More information about the dovecot-cvs mailing list