Greetings,

I have a few questions, but I'll break them up into two posts.

The first is regard to MS Outlook.*, and the the IDLE extension.
Tomas Fasth posted back in April:
<http://groups.google.com/groups?hl=en&th=6d27bc7bc07df69c&rnum=1>
...
Outlook does not select a folder before issuing IDLE.  He posted a patch that
would simply select the inbox in this case, instead of returning an error.  I
was wondering what the status of this patch was in the minds of the courier
author, as I found it (slightly modified), eases the problems I'm  having
with the my outlook clients.  (well the IDLE extension seems to do this, this
patch just allows me advertise it to them without error).

I know very little about IMAP, and have no idea if the RFC requires a folder
to be selected first, but it doesn't seem like a very expensive patch... What
do I know. :)
    
Here is the patch again, modified slightly.  I have one question about the
imapscan_maildir() function -- should it be called with ro=1 in this case?:

--- imapd.c.orig        Thu Feb 21 20:10:28 2002
+++ imapd.c     Thu Feb 21 20:41:47 2002
@@ -1380,22 +1380,25 @@
                writes(" OK NOOP completed\r\n");
                return (0);
        }
-       if (strcmp(curtoken->tokenbuf, "IDLE") == 0)
-       {
+       if (strcmp(curtoken->tokenbuf, "IDLE") == 0)       {
                if (nexttoken()->tokentype != IT_EOL)   return (-1);
-               if (current_mailbox)
-               {
-                       read_eol();
-                       imapidle();
-                       curtoken=nexttoken();
-                       if (strcmp(curtoken->tokenbuf, "DONE") == 0)
-                       {
-                               if (current_mailbox)
-                                       noop();
-                               writes(tag);
-                               writes(" OK IDLE completed\r\n");
-                               return (0);
-                       }
+               if (!current_mailbox)  {
+                  char * p=decode_valid_mailbox("inbox",1);
+                  if (imapscan_maildir(&current_mailbox_info, p,1,1)) {
+                      free (p);
+                      return (-1);
+                  }
+                  current_mailbox=p;
+              }
+               
+              read_eol();
+               imapidle();
+               curtoken=nexttoken();
+               if (strcmp(curtoken->tokenbuf, "DONE") == 0)  {
+                   if (current_mailbox)  noop();
+                    writes(tag);
+                    writes(" OK IDLE completed\r\n");
+                    return (0);
                }
                return (-1);
        }

--
Matt (s/reverse-lavm/mval/)




_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to