diff src/pop3/commands.c @ 1059:d805c2f1d6a9 HEAD

Support for CAPA command (rfc2449).
author Timo Sirainen <tss@iki.fi>
date Thu, 30 Jan 2003 21:52:39 +0200
parents a9b499b2611e
children d71e0aa00d75
line wrap: on
line diff
--- a/src/pop3/commands.c	Thu Jan 30 21:01:40 2003 +0200
+++ b/src/pop3/commands.c	Thu Jan 30 21:52:39 2003 +0200
@@ -6,6 +6,7 @@
 #include "str.h"
 #include "message-size.h"
 #include "mail-storage.h"
+#include "capability.h"
 #include "commands.h"
 
 #define MSGS_BITMASK_SIZE(client) \
@@ -84,6 +85,12 @@
 	return args;
 }
 
+static int cmd_capa(struct client *client, const char *args __attr_unused__)
+{
+	client_send_line(client, "+OK\r\n"POP3_CAPABILITY_REPLY".");
+	return TRUE;
+}
+
 static int cmd_dele(struct client *client, const char *args)
 {
 	unsigned int msgnum;
@@ -401,6 +408,10 @@
 	while (*args == ' ') args++;
 
 	switch (*name) {
+	case 'C':
+		if (strcmp(name, "CAPA") == 0)
+			return cmd_capa(client, args);
+		break;
 	case 'D':
 		if (strcmp(name, "DELE") == 0)
 			return cmd_dele(client, args);