]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/imap/serv_imap.c
Completed HEADERS_FAST mode, which fetches only the top
[citadel.git] / citadel / modules / imap / serv_imap.c
index 2a47b4e223c7247356912faa56f7792b4860c3ca..af02dd68cb4da83c8c9cc08401c91ca0ecf760f8 100644 (file)
@@ -498,6 +498,12 @@ void imap_greeting(void)
        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);
@@ -1418,13 +1424,14 @@ void imap_command_loop(void)
        }
        
        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();
@@ -1452,7 +1459,7 @@ void imap_command_loop(void)
 
        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",
@@ -1625,6 +1632,7 @@ void imap_command_loop(void)
 
        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)