]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
rawlog: If mail_debug=yes, log if dovecot.rawlog/ directory doesn't exist.
authorTimo Sirainen <tss@iki.fi>
Wed, 29 Apr 2009 18:49:10 +0000 (14:49 -0400)
committerTimo Sirainen <tss@iki.fi>
Wed, 29 Apr 2009 18:49:10 +0000 (14:49 -0400)
--HG--
branch : HEAD

src/util/rawlog.c

index ca0b8655c5a26fbc49719b6eeb94d1a85e15467f..21c550448aebaa28df412d6b54182a008972992e 100644 (file)
@@ -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--;