changeset 8994:ace37e01c2e0 HEAD

rawlog: If mail_debug=yes, log if dovecot.rawlog/ directory doesn't exist.
author Timo Sirainen <tss@iki.fi>
date Wed, 29 Apr 2009 14:49:10 -0400
parents 739c4e372140
children e14f1d4b6688
files src/util/rawlog.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/util/rawlog.c	Wed Apr 29 14:26:09 2009 -0400
+++ b/src/util/rawlog.c	Wed Apr 29 14:49:10 2009 -0400
@@ -291,10 +291,15 @@
 	if (lstat(path, &st) < 0) {
 		if (errno != ENOENT)
 			i_warning("lstat() failed for %s: %m", path);
+		else if (getenv("DEBUG") != NULL)
+			i_info("rawlog: %s doesn't exist", path);
 		return;
 	}
-	if (!S_ISDIR(st.st_mode))
+	if (!S_ISDIR(st.st_mode)) {
+		if (getenv("DEBUG") != NULL)
+			i_info("rawlog: %s is not a directory", path);
 		return;
+	}
 
 	if (chroot_dir != NULL) {
 		/* we'll chroot soon. skip over the chroot in the path. */
@@ -342,6 +347,7 @@
 	flags = RAWLOG_FLAG_LOG_INPUT | RAWLOG_FLAG_LOG_OUTPUT;
 
 	lib_init();
+	i_set_failure_internal();
 	process_title_init(argv, envp);
 
 	argc--;