$Log$
+ Revision 572.6 2000/06/21 03:46:20 ajc
+ * IMAP is now legal but useless, supporting NOOP, LOGIN, and LOGOUT.
+
Revision 572.5 2000/06/15 20:15:52 ajc
* Inserted a skeleton IMAP module into the build. IT DOES NOT WORK AT ALL.
Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Initial CVS import
+
extract_token(username, parms, 0, ' ');
extract_token(password, parms, 1, ' ');
- cprintf("%s BAD hi <%s> <%s>\r\n", username, password);
+ if (CtdlLoginExistingUser(username) == login_ok) {
+ if (CtdlTryPassword(password) == pass_ok) {
+ cprintf("%s OK login successful\r\n", tag);
+ return;
+ }
+ }
+
+ cprintf("%s BAD Login incorrect\r\n", tag);
}
+/*
+ * implements the CAPABILITY command
+ */
+void imap_capability(char *tag, char *cmd, char *parms) {
+ cprintf("* CAPABILITY IMAP4 IMAP4REV1 AUTH=LOGIN\r\n");
+ cprintf("%s OK CAPABILITY completed\r\n", tag);
+}
+
+
+
/*
* Main command loop for IMAP sessions.
}
else if (!strcasecmp(cmd, "LOGOUT")) {
+ cprintf("* BYE %s logging out\r\n", config.c_fqdn);
cprintf("%s OK thank you for using Citadel IMAP\r\n", tag);
CC->kill_me = 1;
return;
imap_login(tag, cmd, cmdbuf);
}
+ else if (!strcasecmp(cmd, "CAPABILITY")) {
+ imap_capability(tag, cmd, cmdbuf);
+ }
+
else if (!CC->logged_in) {
cprintf("%s BAD Not logged in.\r\n", tag);
}