serv_pop3.o \
serv_vcard.o vcard.o \
serv_mrtg.o \
- serv_imap.o imap_fetch.o imap_misc.o imap_search.o \
- imap_store.o imap_acl.o imap_tools.o imap_list.o \
- serv_fulltext.o ft_wordbreaker.o crc16.o \
+ serv_imap.o \
+ imap_fetch.o \
+ imap_misc.o \
+ imap_search.o \
+ imap_store.o \
+ imap_acl.o \
+ imap_metadata.o \
+ imap_tools.o \
+ imap_list.o \
+ serv_fulltext.o \
+ ft_wordbreaker.o \
+ crc16.o \
serv_network.o \
serv_listsub.o \
serv_netfilter.o \
serv_sieve.c serv_funambol.c setup.c snprintf.c imap_acl.c \
stress.c support.c sysdep.c tools.c user_ops.c userlist.c \
whobbs.c vcard.c serv_notes.c serv_fulltext.c ft_wordbreaker.c \
- crc16.c journaling.c citadel_dirs.c imap_list.c
+ crc16.c journaling.c citadel_dirs.c imap_list.c imap_metadata.c
DEP_FILES=$(SOURCES:.c=.d)
--- /dev/null
+/*
+ * $Id: $
+ *
+ * IMAP METADATA extension (yet another ugly disaster)
+ *
+ */
+
+
+#include "sysdep.h"
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <pwd.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+#include <sys/wait.h>
+#include <ctype.h>
+#include <string.h>
+#include <limits.h>
+#include "citadel.h"
+#include "server.h"
+#include "sysdep_decls.h"
+#include "citserver.h"
+#include "support.h"
+#include "config.h"
+#include "serv_extensions.h"
+#include "room_ops.h"
+#include "user_ops.h"
+#include "policy.h"
+#include "database.h"
+#include "msgbase.h"
+#include "tools.h"
+#include "internet_addressing.h"
+#include "serv_imap.h"
+#include "imap_tools.h"
+#include "imap_fetch.h"
+#include "imap_misc.h"
+#include "genstamp.h"
+
+
+
+/*
+ * Implements the GETMETADATA command.
+ (
+ ( This is currently a stub which returns no data, because we are not yet
+ * using any server annotations.
+ */
+void imap_getmetadata(int num_parms, char *parms[]) {
+
+ cprintf("%s OK GETMETADATA complete\r\n", parms[0]);
+ return;
+}
+
+
+/*
+ * Implements the SETMETADATA command.
+ *
+ * This is currently a stub which fools the client into thinking that there
+ * is no remaining space available to store annotations.
+ */
+void imap_setmetadata(int num_parms, char *parms[]) {
+
+ cprintf("%s NO [METADATA TOOMANY] SETMETADATA failed\r\n", parms[0]);
+ return;
+}
+
+
--- /dev/null
+/*
+ * $Id: imap_acl.h 5148 2007-05-08 15:40:16Z ajc $
+ *
+ */
+
+void imap_getmetadata(int num_parms, char *parms[]);
+void imap_setmetadata(int num_parms, char *parms[]);
#include "imap_search.h"
#include "imap_store.h"
#include "imap_acl.h"
+#include "imap_metadata.h"
#include "imap_misc.h"
#ifdef HAVE_OPENSSL
*/
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");
}
/*
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]);
}