to aplpy or not to apply - that's the question.

Sven Mueller sven at incase.de
Wed May 3 16:13:46 UTC 2006


Hi.

There is a small updated feature (or bugfix?) left in the current
upstream CVS, which I'm unsure about wether we should apply it or not:
Here is it's description from the upstream changes file:

*Changes to the Cyrus IMAP Server since 2.2.13*
- /ctl_mboxlist/ now dumps/undumps the mailbox type flags,
  making it useful for remote mailboxes.

Opinions?

Regards,
Sven
-------------- next part --------------
Index: cyrus-imapd-2.2.13/doc/changes.html
===================================================================
--- cyrus-imapd-2.2.13/doc/changes.html	(revision 374)
+++ cyrus-imapd-2.2.13/doc/changes.html	(working copy)
@@ -8,6 +8,12 @@
 </head>
 <body>
 
+<h1>Changes to the Cyrus IMAP Server since 2.2.13</h1> 
+<ul> 
+<li><tt>ctl_mboxlist</tt> now dumps/undumps the mailbox type flags,
+making it useful for remote mailboxes.</li>
+</ul>
+
 <h1>Changes to the Cyrus IMAP Server since 2.2.12</h1> 
 <ul> 
 <li>Allow sieve scripts to be run on shared mailboxes (via <tt>sieve</tt>
Index: cyrus-imapd-2.2.13/man/ctl_mboxlist.8
===================================================================
--- cyrus-imapd-2.2.13/man/ctl_mboxlist.8	(revision 374)
+++ cyrus-imapd-2.2.13/man/ctl_mboxlist.8	(working copy)
@@ -104,7 +104,9 @@
 .TP
 .B \-d
 Dump the contents of the database to standard output in a portable
-flat-text format.
+flat-text format.  NOTE: In Cyrus versions 2.2.13 and earlier, the dump
+format did not include the mailbox type flags, breaking remote
+mailboxes (frontends, mupdate master) when undumped.
 .TP
 .B \-x
 When performing a dump, remove the mailboxes dumped from the mailbox list
@@ -115,7 +117,9 @@
 .TP
 .B \-u
 Load the contents of the database from standard input.  The input MUST
-be in the format output using the \fB\-d\fR option.
+be in the format output using the \fB\-d\fR option.  NOTE: Both the
+old and new formats can be loaded, but the old format will break
+remote mailboxes.
 .TP
 .B \-m
 For backend servers in the Cyrus Murder, synchronize the local mailbox list
Index: cyrus-imapd-2.2.13/imap/ctl_mboxlist.c
===================================================================
--- cyrus-imapd-2.2.13/imap/ctl_mboxlist.c	(revision 374)
+++ cyrus-imapd-2.2.13/imap/ctl_mboxlist.c	(working copy)
@@ -187,7 +187,7 @@
     switch (d->op) {
     case DUMP:
 	if(!d->partition || !strcmp(d->partition, part)) {
-	    printf("%s\t%s\t%s\n", name, part, acl);
+	    printf("%s\t%d %s\t%s\n", name, mbtype, part, acl);
 	    if(d->purge) {
 		config_mboxlist_db->delete(mbdb, key, keylen, &(d->tid), 0);
 	    }
@@ -490,7 +490,7 @@
     while (fgets(buf, sizeof(buf), stdin)) {
 	char *name, *partition, *acl;
 	char *p;
-	int tries = 0;
+	int mbtype = 0, tries = 0;
 	
 	line++;
 
@@ -501,6 +501,12 @@
 	    continue;
 	}
 	*p++ = '\0';
+	if (isdigit((int) *p)) {
+	    /* new style dump */
+	    mbtype = strtol(p, &p, 10);
+	    /* skip trailing space */
+	    if (*p == ' ') p++;
+	}
 	partition = p;
 	for (; *p && *p != '\t'; p++) ;
 	if (!*p) {
@@ -523,7 +529,7 @@
 	}
 
 	key = name; keylen = strlen(key);
-	data = mboxlist_makeentry(0, partition, acl); datalen = strlen(data);
+	data = mboxlist_makeentry(mbtype, partition, acl); datalen = strlen(data);
 	
 	tries = 0;
     retry:


More information about the Pkg-Cyrus-imapd-Debian-devel mailing list