]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_imap.c
Checked in a skeleton of the IMAP METADATA extension
[citadel.git] / citadel / serv_imap.c
index bb28d45eb4cfb7daa29cd545a5abcab86a91bd46..8a7b713ebc3cd3482fac3b3617928cc8f98490a8 100644 (file)
@@ -56,6 +56,7 @@
 #include "imap_search.h"
 #include "imap_store.h"
 #include "imap_acl.h"
+#include "imap_metadata.h"
 #include "imap_misc.h"
 
 #ifdef HAVE_OPENSSL
@@ -437,9 +438,13 @@ void imap_cleanup_function(void)
  */
 void imap_output_capability_string(void) {
        cprintf("CAPABILITY IMAP4REV1 NAMESPACE ID ACL AUTH=LOGIN");
+
 #ifdef HAVE_OPENSSL
        if (!CC->redirect_ssl) cprintf(" STARTTLS");
 #endif
+
+       /* Comment this out if its unfinished state is choking your client */
+       cprintf(" METADATA LIST-EXTENDED");
 }
 
 /*
@@ -1450,6 +1455,14 @@ void imap_command_loop(void)
                imap_myrights(num_parms, parms);
        }
 
+       else if (!strcasecmp(parms[1], "GETMETADATA")) {
+               imap_getmetadata(num_parms, parms);
+       }
+
+       else if (!strcasecmp(parms[1], "SETMETADATA")) {
+               imap_setmetadata(num_parms, parms);
+       }
+
        else if (IMAP->selected == 0) {
                cprintf("%s BAD no folder selected\r\n", parms[0]);
        }