Gmail supports IMAP IDLE

About a week after Gmail begins enabling IMAP, my account has it.

To my surprise, Gmail implemented IMAP IDLE:

~$ openssl s_client -crlf -quiet -connect imap.gmail.com:993
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc/CN=imap.gmail.com
verify error:num=21:unable to verify the first certificate
verify return:1
\* OK Gimap ready for requests from 11.22.33.44 q196f2e0411bog
. capability
\* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA XYZZY
. OK Thats all she wrote! q196f2e0411bog
. login username password
. OK username@gmail.com authenticated (Success)
. examine inbox
\* FLAGS (\\Answered \\Flagged \\Draft \\Deleted \\Seen \\\*)
\* OK [PERMANENTFLAGS ()]
\* OK [UIDVALIDITY 594706426]
\* 469 EXISTS
\* 0 RECENT
\* OK [UNSEEN 1]
\* OK [UIDNEXT 772]
. OK [READ-ONLY] inbox selected. (Success)
. idle
+ idling
(some time passes while I send myself a test message)
\* 470 EXISTS

I wonder what XYZZY does.


[UPDATE Feb 21, 2008] They added two more IMAP extensions:

. capability
\* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA XLIST CHILDREN XYZZY

What does XLIST do?

Comments:

. XYZZY
. OK Nothing happens.

Notice that the XYZZY capability goes away after logging in, so it is unlikely to be anything but a joke.

BTW, thanks for the hint about -crlf -- I couldn't understand why Gmail seemingly froze, not accepting commands, after logging in...

Posted by Kjetil Torgrim Homme on November 30, 2007 at 12:29 PM PST #

XYZZY was a magic word used in one of the earliest computer adventure games - Colossal Cavern. It would transport you between two different parts of the map.

Posted by Stony on December 10, 2007 at 11:59 PM PST #

IT WILL NOT LET ME LONG ON TO ANYTHING WITH THIS EMAIL 85

Posted by TODD on December 20, 2007 at 07:11 AM PST #

XYZZY didn't seem to do anything before logging in. After logging in, the capability disappears as was mentioned previously.

\* OK Gimap ready for requests from 1.2.3.4 6if440734ywp.3
1 CAPABILITY
\* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA XLIST CHILDREN XYZZY
1 OK Thats all she wrote! 6if440734ywp.3
2 XYZZY
2 OK Nothing happens. 6if440734ywp.3
3 LOGOUT
\* BYE Logout Requested 6if440734ywp.3
3 OK Quoth the raven, nevermore... 6if440734ywp.3

Posted by Willie on August 06, 2008 at 07:08 AM PDT #

There are no well-know name for common folders such as Drafts, Trash, Spam, ...
on IMAP server.
User has to manually configure which folder is used for what. If user doesn't
do it IMAP client create folder with his favorite names on server. It causes
duplicated/multiplicated folders on server e.g. Deleted Items / Deleted
Messages / Trash. The problem is even worse when you use localized version of
IMAP client.

Google and Apple developed special IMAP command XLIST to address this issue.
XLIST command is supported on Gmail and iPhone.

IMAP XLIST command return list of folder and their type (\\Inbox, \\Drafts,
\\Trash, \\Sent, \\Spam).
Therefore, IMAP client gets information about folder type from server
automatically. User do not need to configure it.

Posted by guest on January 29, 2009 at 06:05 PM PST #

Don't mean to hijack topic, but has anyone else noticed that Gmail returns both \\HasChildren and \\HasNoChildren for some folders?

Posted by list list list on December 14, 2009 at 08:15 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

I currently live in San Francisco Bay Area. For the past seven years, I have been designing and building messaging solutions for Sun.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today