Began implementing the UIDPLUS extension.
authorArt Cancro <ajc@citadel.org>
Wed, 10 Oct 2007 21:28:25 +0000 (21:28 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 10 Oct 2007 21:28:25 +0000 (21:28 +0000)
[APPENDUID xxx yyy] response is complete.
UID EXPUNGE is complete (uses 'fallback' methodology described in RFC2359)
Still need to do COPYUID and UID COPY before we can advertise this extension.

citadel/modules/imap/imap_misc.c
citadel/modules/imap/serv_imap.c
citadel/modules/imap/serv_imap.h

index 3b87e25c0b52609c488d032b2dbc3982dca31cd1..d75db8a34448c19bfb8255a9f9af6d51c0d2dc7c 100644 (file)
@@ -445,7 +445,8 @@ void imap_append(int num_parms, char *parms[]) {
                        new_msgnum = CtdlSubmitMsg(msg, NULL, "");
                }
                if (new_msgnum >= 0L) {
-                       cprintf("%s OK APPEND completed\r\n", parms[0]);
+                       cprintf("%s OK [APPENDUID %ld %ld] APPEND completed\r\n",
+                               parms[0], GLOBAL_UIDVALIDITY_VALUE, new_msgnum);
                }
                else {
                        cprintf("%s BAD Error %ld saving message to disk.\r\n",
index 19299eba19812ba13d906f6f8aa5845d91849088..b7d44b5579310712d81e9c87422925e29a341e52 100644 (file)
@@ -738,7 +738,7 @@ void imap_select(int num_parms, char *parms[])
        cprintf("* %d EXISTS\r\n", msgs);
        cprintf("* %d RECENT\r\n", new);
 
-       cprintf("* OK [UIDVALIDITY 1] UID validity status\r\n");
+       cprintf("* OK [UIDVALIDITY %ld] UID validity status\r\n", GLOBAL_UIDVALIDITY_VALUE);
        cprintf("* OK [UIDNEXT %ld] Predicted next UID\r\n", CitControl.MMhighest + 1);
 
        /* Note that \Deleted is a valid flag, but not a permanent flag,
@@ -1552,8 +1552,7 @@ void imap_command_loop(void)
                imap_copy(num_parms, parms);
        }
 
-       else if ((!strcasecmp(parms[1], "UID"))
-                && (!strcasecmp(parms[2], "COPY"))) {
+       else if ((!strcasecmp(parms[1], "UID")) && (!strcasecmp(parms[2], "COPY"))) {
                imap_uidcopy(num_parms, parms);
        }
 
@@ -1561,6 +1560,10 @@ void imap_command_loop(void)
                imap_expunge(num_parms, parms);
        }
 
+       else if ((!strcasecmp(parms[1], "UID")) && (!strcasecmp(parms[2], "EXPUNGE"))) {
+               imap_expunge(num_parms, parms);
+       }
+
        else if (!strcasecmp(parms[1], "CLOSE")) {
                imap_close(num_parms, parms);
        }
index c7d932a97e1dc34301bcd161d67c2fd8b89745d3..59e30643e851576470a22876a607e89dc3cb21ec 100644 (file)
@@ -2,6 +2,9 @@
  */
 
 
+#define GLOBAL_UIDVALIDITY_VALUE       1L
+
+
 void imap_cleanup_function(void);
 void imap_greeting(void);
 void imap_command_loop(void);