IMAP->cached_rfc822_msgnum = (-1);
IMAP->cached_rfc822_withbody = 0;
+ if (CC->nologin)
+ {
+ cprintf("* BYE; Server busy, try later\r\n");
+ CC->kill_me = 1;
+ return;
+ }
cprintf("* OK [");
imap_output_capability_string();
cprintf("] %s IMAP4rev1 %s ready\r\n", config.c_fqdn, CITADEL);
}
if (untagged_ok) {
- imap_print_instant_messages();
-
+
+ /* we can put any additional untagged stuff right here in the future */
+
/*
* Before processing the command that was just entered... if we happen
* to have a folder selected, we'd like to rescan that folder for new
* messages, and for deletions/changes of existing messages. This
- * could probably be optimized somehow, but IMAP sucks...
+ * could probably be optimized better with some deep thought...
*/
if (IMAP->selected) {
imap_rescan_msgids();
else if (!strcasecmp(parms[1], "LOGOUT")) {
if (IMAP->selected) {
- imap_do_expunge(); /* yes, we auto-expunge */
+ imap_do_expunge(); /* yes, we auto-expunge at logout */
}
cprintf("* BYE %s logging out\r\n", config.c_fqdn);
cprintf("%s OK Citadel IMAP session ended.\r\n",
gettimeofday(&tv2, NULL);
total_time = (tv2.tv_usec + (tv2.tv_sec * 1000000)) - (tv1.tv_usec + (tv1.tv_sec * 1000000));
+ CtdlLogPrintf(CTDL_INFO, "IMAP: %s\n", cmdbuf); // FIXME FIXME FIXME REMOVE THIS NOW
CtdlLogPrintf(CTDL_DEBUG, "IMAP command completed in %ld.%ld seconds\n",
(total_time / 1000000),
(total_time % 1000000)