]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/imap/imap_metadata.c
* More license declarations
[citadel.git] / citadel / modules / imap / imap_metadata.c
index 4dde983f9792799d650984badac55d8006417b9d..54f17ccb27883fdc03a8561ef0fe1db3130df52a 100644 (file)
@@ -5,6 +5,21 @@
  *
  * This is an implementation of the Bynari variant of the METADATA extension.
  *
+ * Copyright (c) 2007-2009 by the citadel.org team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 
@@ -33,6 +48,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <limits.h>
+#include <libcitadel.h>
 #include "citadel.h"
 #include "server.h"
 #include "sysdep_decls.h"
@@ -44,7 +60,6 @@
 #include "policy.h"
 #include "database.h"
 #include "msgbase.h"
-#include "tools.h"
 #include "internet_addressing.h"
 #include "serv_imap.h"
 #include "imap_tools.h"
@@ -123,7 +138,7 @@ void imap_setmetadata(int num_parms, char *parms[]) {
                set_view = VIEW_MAILBOX;
        }
 
-       ret = imap_grabroom(roomname, parms[2], 0);
+       ret = imap_grabroom(roomname, parms[2], 1);
        if (ret != 0) {
                cprintf("%s NO Invalid mailbox name or access denied\r\n",
                        parms[0]);
@@ -200,7 +215,7 @@ void imap_getmetadata(int num_parms, char *parms[]) {
                return;
        }
 
-       ret = imap_grabroom(roomname, parms[2], 0);
+       ret = imap_grabroom(roomname, parms[2], 1);
        if (ret != 0) {
                cprintf("%s NO Invalid mailbox name or access denied\r\n",
                        parms[0]);
@@ -228,6 +243,9 @@ void imap_getmetadata(int num_parms, char *parms[]) {
        else if (!strcasecmp(&CC->room.QRname[11], SENTITEMS)) {
                cprintf("mail.sentitems");
        }
+       else if (!strcasecmp(&CC->room.QRname[11], USERDRAFTROOM)) {
+               cprintf("mail.drafts");
+       }
        else if (!strcasecmp(&CC->room.QRname[11], USERCALENDARROOM)) {
                cprintf("event.default");
        }