On Mon, 2007-10-08 at 16:39 -0500, Steven F Siirila wrote: > And in fact your tests (below) reproduced this. The problem with this is > that if even one file or directory within the user's IMAP folder space is > currently unavailable (due to an NFS server being down), the user cannot > log in at all to access any of their other folders. In out scenario, we > would prefer that the user simply not see the folders (treat the error the > same as "file not found"). BTW, the errno seen is ETIMEDOUT (we are soft > mounting the NFS filesystem in question). Any thoughts on how we can > accomplish this? We don't normally expect this NFS filesystem to become > unavailable, but when it is, we don't want it to prevent all users from > being able to log in, since this NFS filesystem only holds folders of an > archival nature.
Does the attached patch help? It should work pretty nicely if index files are still available. If they aren't, it shows the mailbox as being empty.
diff -r ed09701ff3d0 src/lib-storage/index/mbox/mbox-sync.c --- a/src/lib-storage/index/mbox/mbox-sync.c Sat Oct 20 22:00:57 2007 +0300 +++ b/src/lib-storage/index/mbox/mbox-sync.c Sat Oct 20 22:08:02 2007 +0300 @@ -1496,6 +1496,12 @@ int mbox_sync_has_changed(struct mbox_ma } } else { if (stat(mbox->path, &statbuf) < 0) { + if (errno == ETIMEDOUT && + strcmp(mbox->ibox.box.name, "INBOX") != 0) { + /* NFS server down? Ignore for all mailboxes + except INBOX. */ + return 0; + } mbox_set_syscall_error(mbox, "stat()"); return -1; }
signature.asc
Description: This is a digitally signed message part