From: Timo Sirainen Date: Wed, 29 Apr 2009 18:49:10 +0000 (-0400) Subject: rawlog: If mail_debug=yes, log if dovecot.rawlog/ directory doesn't exist. X-Git-Tag: 2.0.alpha1~879 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=05489ca6a5e1d1fc808f6de8a9701fcb5840603c;p=thirdparty%2Fdovecot%2Fcore.git rawlog: If mail_debug=yes, log if dovecot.rawlog/ directory doesn't exist. --HG-- branch : HEAD --- diff --git a/src/util/rawlog.c b/src/util/rawlog.c index ca0b8655c5..21c550448a 100644 --- a/src/util/rawlog.c +++ b/src/util/rawlog.c @@ -291,10 +291,15 @@ static void rawlog_open(enum rawlog_flags flags) 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 @@ int main(int argc, char *argv[], char *envp[]) flags = RAWLOG_FLAG_LOG_INPUT | RAWLOG_FLAG_LOG_OUTPUT; lib_init(); + i_set_failure_internal(); process_title_init(argv, envp); argc--;