maildir-util.c revision ce8244c05b9f89d7729a5abe6f4838c1dce46c64
178N/A/* Copyright (c) 2004-2012 Dovecot authors, see the included COPYING file */ 178N/A /* don't even bother looking into new/ dir */ 178N/A /* probably in new/ dir, drop ":2," from fname */ 1400N/A /* let's see if we can guess the filename based on index */ 178N/A /* probably in new/ dir */ 178N/A /* file was found. make sure we remember its latest name. */ 178N/A /* file wasn't found. mark this message nonsynced, so we can 178N/A retry the lookup by guessing the flags */ /* most likely a symlink pointing to a nonexistent file */ "Maildir: Symlink destination doesn't exist: %s",
path);
"maildir_file_do(%s): Filename keeps changing",
path);
/* try guessing again with refreshed flags */ /* file is either renamed or deleted. sync the maildir and see which one. if file appears to be renamed constantly, don't try to open it more than 10 times. */ /* mailbox was being deleted just now */ /* should work now, try again */ "mkdir(%s) failed: %m",
path);
static const char *
subdirs[] = {
"cur",
"new",
"tmp" };
/* @UNSAFE: get a list of directories we want to create */ for (i = 0; i <
count; i++) {
"stat(%s) failed: %m",
path);
/* maildir itself exists. create all of its subdirectories in case /* There's a directory in maildir, get rid of it. In some installations this was caused by a messed up configuration where e.g. mails was initially delivered to new/new/ directory. Also Dovecot v2.0.0 - v2.0.4 sometimes may have renamed tmp/ directory under new/ or cur/. */ "Maildir: rmdir()ed unwanted empty directory: %s",
/* someone else rmdired or renamed it */ "Maildir: Found unwanted directory %s, " "but rmdir() failed: %m",
path);
/* It's not safe to delete this directory since it has some files in it, but it's also not helpful to log this message over and over again. Get rid of this error by renaming the directory elsewhere */ while (p !=
path && p[-
1] !=
'/') p--;
"Maildir: renamed unwanted directory %s to %s",
/* someone else renamed it (could have been flag change) */ "Maildir: Found unwanted directory, " "but rename(%s, %s) failed: %m",
path,
dest);