Package: cyrus21-admin
Version: 2.1.18-1
Severity: wishlist
Tags: patch

Hello,

Even if the use of NFS is deprecated with Cyrus the following
insignificant patch will correct an annoying problem: if you try to
delete a mailbox located on a NFS mailstore, all the content of the
mailbox is deleted, but the mailbox folder is not:

It seems that Cyrus tries to delete the mailbox directory before closing
these 3 files handles opened just before (cyrus.* files). That works on
local filesystem but doesn't over NFS.

Here is a patch (appliable to Debian 2.1.17 or upstream 2.1.18 or
2.2.12) in the mailbox_delete function in the imap/mailbox.c file which
corrects this behaviour and solves the reported problem:

+++ cut +++
diff -Naur cyrus-imapd-2.1.17/imap/mailbox.c 
cyrus-imapd-2.1.17.patched/imap/mailbox.c
--- cyrus-imapd-2.1.17/imap/mailbox.c   2003-11-04 22:43:00.000000000 +0100
+++ cyrus-imapd-2.1.17.patched/imap/mailbox.c   2005-03-24 
11:57:14.000000000 +0100
@@ -2275,13 +2275,14 @@
         closedir(dirp);
      }

+    /* Close mailbox directory before removing it */
+    mailbox_close(mailbox);
+
      /* Remove empty directories, going up path */
      tail--;
      do {
         *tail = '\0';
      } while (rmdir(buf) == 0 && (tail = strrchr(buf, '/')));
-
-    mailbox_close(mailbox);
      return 0;
  }

+++ cut +++

I suppose it doesn't introduce side effect as the mailbox is to be
deleted and the mailbox_delete function is only called from the
mboxlist.c file.

Is it possible to integrate this patch ?

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-ac12-ombos.ac12.1
Locale: LANG=fr_FR, LC_CTYPE=fr_FR (charmap=ISO-8859-1)

Versions of packages cyrus21-admin depends on:
ii  libcyrus-imap-perl21          2.1.18-1   Interface to Cyrus imap client imc

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to