]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/imap/serv_imap.c
Completed the implementation of RFC2359
[citadel.git] / citadel / modules / imap / serv_imap.c
index 19299eba19812ba13d906f6f8aa5845d91849088..098ce942f5c520b402bac201ebb1a4fed42de264 100644 (file)
@@ -435,7 +435,7 @@ void imap_cleanup_function(void)
  * output this stuff in other places as well)
  */
 void imap_output_capability_string(void) {
-       cprintf("CAPABILITY IMAP4REV1 NAMESPACE ID AUTH=PLAIN AUTH=LOGIN");
+       cprintf("CAPABILITY IMAP4REV1 NAMESPACE ID AUTH=PLAIN AUTH=LOGIN UIDPLUS");
 
 #ifdef HAVE_OPENSSL
        if (!CC->redirect_ssl) cprintf(" STARTTLS");
@@ -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);
        }