Gmail issues investigated

Every once in a while, I've seen users complain that LogicMail behaves strangely when trying to access Gmail. They usually say that it only loads the oldest messages, instead of the newest ones. While actual configuration details are rarely given, I did finally luck out on this discussion thread. The gist of it is that these users are configuring LogicMail to access Gmail via POP, and they are seeing the wrong messages at the top of their Inbox. Once reconfigured to use IMAP, this problem goes away.

That all being said, I did still want to investigate. Did I have some strange POP bug I was previously unaware of, or was something else going on? Gmail already has a pretty bad reputation in the IMAP world, as far as standards-compliance goes, possibly even likened to the reputation IE6 had on the web. However, I had not previously run into user-reported issues with Gmail and IMAP. Could there be issues with POP as well?

While I'm normally a  FastMail user myself, I do keep a Gmail account around for testing (and access to other Google services). So I decided to do a 3-way comparison.


First, let's see what the website shows for my Inbox:

Okay, looks like 154 messages, of which the first several are auto-generated Trac ticket modification notices.


Now let's see what Gmail gives us via IMAP:
(actual transcript edited for privacy and brevity)

$ openssl s_client -crlf -connect imap.gmail.com:993
CONNECTED(00000003)
* OK Gimap ready for requests from a.b.c.d q41if4775955yba.118
A01 LOGIN ****@gmail.com ****
* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE
A01 OK ****@gmail.com Derek Konigsberg authenticated (Success)
A02 SELECT INBOX
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
* OK [UIDVALIDITY 2]
* 183 EXISTS
* 0 RECENT
* OK [UIDNEXT 208]
A02 OK [READ-WRITE] INBOX selected. (Success)
A03 FETCH 180:183 (ENVELOPE)
* 180 FETCH (ENVELOPE (
    "Wed, 04 May 2011 21:05:04 -0000"
    "Re: [LogicMail for BlackBerry] #170: Implement BrowserField2 for OS 5.0"
    . . .)
* 181 FETCH (ENVELOPE (
    "Sun, 08 May 2011 19:58:06 -0000"
    "Re: [LogicMail for BlackBerry] #301: Support updating Draft messages in local folders"
    . . .)
* 182 FETCH (ENVELOPE (
    "Mon, 09 May 2011 00:05:04 -0000"
    "Re: [LogicMail for BlackBerry] #79: Implement server polling"
    . . .)
* 183 FETCH (ENVELOPE (
    "Tue, 17 May 2011 02:05:04 -0000"
    "Re: [LogicMail for BlackBerry] #325: Add support for the IMAP COMPRESS Extension (RFC4978)"
    . . .)
A03 OK Success

This time, the Inbox contains 183 messages! Of course the web interface may present its content differently, so it may not be the end of the world. But what's important to note is that the same messages are at the top of the mailbox.


Now let's see what Gmail gives us via POP:
(actual transcript also edited for privacy and brevity)

$ openssl s_client -crlf -connect pop.gmail.com:995
CONNECTED(00000003)
+OK Gpop ready for requests from a.b.c.d c30pf10276912ana.19
USER ****@gmail.com
+OK send PASS
PASS ****
+OK Welcome.
STAT
+OK 268 1789575
TOP 266 0
+OK message follows
Date: Sat, 26 Jun 2010 13:43:04 -0700 (PDT)
Subject: Buzz from Derek Konigsberg
.
TOP 267 0
+OK message follows
Date: Sat, 26 Jun 2010 17:09:47 -0700 (PDT)
Subject: Buzz from Derek Konigsberg
.
TOP 268 0
+OK message follows
Date: Sun, 27 Jun 2010 04:30:54 -0700 (PDT)
Subject: Buzz from Derek Konigsberg
.

Did you see that? POP now tells us there are a whopping 268 messages, and the first couple are a bunch of old Google Buzz notifications! No wonder users accessing Gmail via POP were seeing strange results.


So what have we learned from this? It is actually Gmail's fault that POP users are only seeing old messages. The obvious recommendation is to only use IMAP when accessing Gmail.

That being said, if your mail service of choice supports IMAP, then you really should never use POP. The reasons have absolutely nothing to do with the above issue, however. IMAP is a far more sophisticated and efficient protocol, and will work a lot better with clients like LogicMail that try to optimize their data usage and local storage needs.

  • Posted: 2011-05-18 20:33 (Updated: 2011-05-18 20:49)
  • Categories: (none)

Attachments

Comments

No comments.