[PATCH] Allow setting custom annotations through cyradm
Hello, please find attached a patch, that allows the configuration of custom annotations on mailboxes through cyradm.sh. This patch had been pending submission for a while, as it depended on the annotation_definitions patch accepted in 2.3.16[1]. I hope you will find this patch applies to CVS HEAD cleanly. [1] http://lists.andrew.cmu.edu/pipermail/cyrus-announce/2009- December/69.html -- Jeroen van Meeuwen Senior Engineer, Kolab Systems AG e: vanmeeu...@kolabsys.com t: +316 42 801 403 w: http://www.kolabsys.com pgp: 9342 BF08 From bf3ed165f8bfdeb7585e89c059f94b36b4b5aeb9 Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen (Ergo Project) jeroen.van.meeu...@ergo-project.org Date: Mon, 2 Aug 2010 16:36:24 +0200 Subject: [PATCH] Allow configuration of custom annotations through cyradm --- perl/imap/IMAP/Admin.pm |8 perl/imap/IMAP/Shell.pm |6 +++--- perl/imap/cyradm.sh |4 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/perl/imap/IMAP/Admin.pm b/perl/imap/IMAP/Admin.pm index a33713e..c0a6670 100644 --- a/perl/imap/IMAP/Admin.pm +++ b/perl/imap/IMAP/Admin.pm @@ -797,12 +797,12 @@ sub mboxconfig { return undef; } - if(!exists($values{$entry})) { -$self-{error} = Unknown parameter $entry; + if(exists($values{$entry})) { +$entry = $values{$entry}; + } else { +$self-{error} = Unknown parameter $entry unless substr($entry,0,1) eq /; } - $entry = $values{$entry}; - my ($rc, $msg); $value = undef if($value eq none); diff --git a/perl/imap/IMAP/Shell.pm b/perl/imap/IMAP/Shell.pm index 7fed400..c605079 100644 --- a/perl/imap/IMAP/Shell.pm +++ b/perl/imap/IMAP/Shell.pm @@ -127,7 +127,7 @@ my %builtins = (exit = [\_sc_info, '[mailbox]', 'display mailbox/server metadata'], mboxcfg = - [\_sc_mboxcfg, 'mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat] value', + [\_sc_mboxcfg, 'mailbox [comment|condstore|expire|news2mail|sieve|squat|/explicit annotation] value', 'configure mailbox'], mboxconfig = 'mboxcfg', reconstruct = @@ -1437,7 +1437,7 @@ sub _sc_mboxcfg { while (defined ($opt = shift(@argv))) { last if $opt eq '--'; if ($opt =~ /^-/) { - die usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat] value\n; + die usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat|/explicit annotation] value\n; } else { push(@nargv, $opt); @@ -1446,7 +1446,7 @@ sub _sc_mboxcfg { } push(@nargv, @argv); if (@nargv 2) { -die usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat] value\n; +die usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat|/explicit annotation] value\n; } if (!$cyrref || !$$cyrref) { die mboxconfig: no connection to server\n; diff --git a/perl/imap/cyradm.sh b/perl/imap/cyradm.sh index 708aebc..5e2ecf9 100644 --- a/perl/imap/cyradm.sh +++ b/perl/imap/cyradm.sh @@ -241,6 +241,10 @@ mailboxes). Indicates that the mailbox should have a squat index created for it. +=item C/explicit/annotation + +Sets the annotation I/explicit/annotation on Imailbox to Ivalue. + =back =item Crenamemailbox [C--partition Ipartition] Ioldname Inewname -- 1.7.1.1
Re: Closing old idle bugs?
On Mon, Aug 02, 2010 at 05:10:26PM +0200, Jeroen van Meeuwen (Kolab Systems) wrote: Hi there, would it be acceptable if old, idle bugs in bugzilla were closed after due consideration? That would be a great idea! For example, I encounter bug #2590[1] with status NEW; I would like to close it to clean up the bug database, possibly only after requesting some feedback (like I did with this one). [1] https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2590 Maybe we should do a bug cleaning week? I'm on leave at the moment. I think we should probably go through all the bugs as a group and decide on their status and applicability. I suspect quite a few of them are no longer valid or already solved - just not updated. Perhaps if we posted one email per bug to the mailing list and asked for a discussion on its merits. Maybe not all at once so they don't get lost in the haze, but we could group them up. I'm on vacation for a couple more days, so I'd prefer to do it next week, but let's make sure we do it. It would be good to make Bugzilla less scary for new users! (and more useful for us...) Bron.
Re: Closing old idle bugs?
Bron Gondwana wrote: On Mon, Aug 02, 2010 at 05:10:26PM +0200, Jeroen van Meeuwen (Kolab Systems) wrote: Hi there, would it be acceptable if old, idle bugs in bugzilla were closed after due consideration? That would be a great idea! ;-) For example, I encounter bug #2590[1] with status NEW; I would like to close it to clean up the bug database, possibly only after requesting some feedback (like I did with this one). [1] https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2590 Maybe we should do a bug cleaning week? I'm on leave at the moment. I think we should probably go through all the bugs as a group and decide on their status and applicability. I suspect quite a few of them are no longer valid or already solved - just not updated. It seems that I do not have any permissions to change a bug's status; I have a new account. Perhaps if we posted one email per bug to the mailing list and asked for a discussion on its merits. Maybe not all at once so they don't get lost in the haze, but we could group them up. One bug a day through the list would be very inefficient, and I'm sure there's bugs that actually do deserve love attention. There's a number of bugs that have been resolved already, just haven't been closed. Let's remember that if a bug is closed while not satisfactory to the reporter, the bugs can simply be reopened. Most of them look like they just need some follow-up and can be closed in 2/4/6 weeks if no response has been given to any inquiries for more information (like #2590, the time window is a project choice of course). -- Jeroen van Meeuwen Senior Engineer, Kolab Systems AG e: vanmeeu...@kolabsys.com t: +316 42 801 403 w: http://www.kolabsys.com pgp: 9342 BF08
Re: Closing old idle bugs?
I think 20 a day is probably sane... Prod Dave McMurtrie at CMU if you need bugzilla permissions. I'm sure we're happy to have anyone squishing bugs! Jeroen van Meeuwen (Kolab Systems) vanmeeu...@kolabsys.com wrote: Bron Gondwana wrote: On Mon, Aug 02, 2010 at 05:10:26PM +0200, Jeroen van Meeuwen (Kolab Systems) wrote: Hi there, would it be acceptable if old, idle bugs in bugzilla were closed after due consideration? That would be a great idea! ;-) For example, I encounter bug #2590[1] with status NEW; I would like to close it to clean up the bug database, possibly only after requesting some feedback (like I did with this one). [1] https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2590 Maybe we should do a bug cleaning week? I'm on leave at the moment. I think we should probably go through all the bugs as a group and decide on their status and applicability. I suspect quite a few of them are no longer valid or already solved - just not updated. It seems that I do not have any permissions to change a bug's status; I have a new account. Perhaps if we posted one email per bug to the mailing list and asked for a discussion on its merits. Maybe not all at once so they don't get lost in the haze, but we could group them up. One bug a day through the list would be very inefficient, and I'm sure there's bugs that actually do deserve love attention. There's a number of bugs that have been resolved already, just haven't been closed. Let's remember that if a bug is closed while not satisfactory to the reporter, the bugs can simply be reopened. Most of them look like they just need some follow-up and can be closed in 2/4/6 weeks if no response has been given to any inquiries for more information (like #2590, the time window is a project choice of course). -- Jeroen van Meeuwen Senior Engineer, Kolab Systems AG e: vanmeeu...@kolabsys.com t: +316 42 801 403 w: http://www.kolabsys.com pgp: 9342 BF08 -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.