

What Google protocol does it use for Gmail? (not IMAP or POP)
source link: https://www.codesd.com/item/what-google-protocol-does-it-use-for-gmail-not-imap-or-pop.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

What Google protocol does it use for Gmail? (not IMAP or POP)
You can access gmail either using the web interface, Google's Android client or using IMAP. As far as I can tell, the web interface and the Android app uses a completely different protocol than IMAP -- they are not just interfaces on top of it. The reason I'm sure of that is because the Android app can without problem open a folder with 1m mail in < 3 seconds. No plain IMAP client can do that.
So my question is what is known about this secret protocol? Where is the reference documentation for it? Has it been reverse engineered? Does Google sanction its use?
arnt's answer provides an excellent method to test gmail's raw imap speed:
$ openssl s_client -host imap.gmail.com -port 993 -crlf
...
* OK Gimap ready for requests from 12.34.56.78
$ a LOGIN ***@*** ***
a OK
$ c SELECT "[Gmail]/All mail" !!!!
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)] Flags permitted.
* OK [UIDVALIDITY 673376278] UIDs valid.
* 1142417 EXISTS
* 0 RECENT
* OK [UIDNEXT 1159771] Predicted next UID.
* OK [HIGHESTMODSEQ 8670601]
c OK [READ-WRITE] [Gmail]/All mail selected. (Success)
The command I've marked, c SELECT "[Gmail]/All mail"
takes about 20 seconds to complete. Since that time is larger than it takes for the GMail app on my relatively underpowered Android phone to startup and load the All mail label which does it in less than 6 seconds even after I purged its caches. The web client is even faster.
Unless I'm missing something basic this proves "beyond reasonable doubt" that Google's GMail clients does not use IMAP since you never ever have to wait 20 seconds for any SELECT command to complete.
The Android app (at least the ones I've used) use IMAP. You can verify this by running Wireshark on the server.
As to why the Android app is so fast - what I know is that it uses the SEARCH command to select the most recent n messages. Desktop clients such as Thunderbird or Outlook are much more heavy-weight and download headers and metadata for every message in the folder, despite recommendations for them not to.
A smartphone does not have the resources to store and process millions of emails (although more modern ones might be getting there) so the SEARCH approach allowed quick mail access for handheld devices.
Anyhow, Wireshark can reveal a great deal about the behaviour of IMAP clients and servers. If you're really curious, give it a shot. You can't do this if the server is Gmail, but you can try it out on another server (e.g. hMailServer).
Recommend
-
22
With the new year upon us, I decided it was time to do something ambitious for my Open Source project. This is where I normally quip about never mentioning my project before, even though I literally always do. A new year...
-
22
Recently, I had some issues with my email provider and it gave me a bit of a scare as I realized that I had taken email for granted and did not have a backup in case things went south. Since my email address is run off of...
-
11
渗透基础——利用IMAP协议读取邮件 22 Jan 20210x00 前言 在渗透测试中,当我们获得了用户的邮箱凭据,需要对邮箱内容进行分析时,可以选择通过IMAP协议实现自动化来提高效率。 本文以Exchange为例,介绍通过IMAP协议下载邮件...
-
16
Sending IMAP commands using php advertisements I'm trying to access yahoo mail IMAP server with a php script. I read that yahoo requires a spe...
-
6
【程式範例】使用Gmail IMAP讀取信件 2011-01-18 05:59 AM 26 27,528 工作上有從Gmail讀信取出附檔的需求,先前在點部落
-
13
如何正确设置QQ邮箱IMAP服务 2021年10月20日 132点热度 0人点赞...
-
4
How to Retrieve Emails Using IMAP in Python I am FSD (Full-stack developer) and I have expertise with Angular ,PHP, Node JS, Laravel, Codeigniter and front end. Location...
-
17
imap-backup Backup GMail (or other IMAP) accounts to disk Installation $ gem install 'imap-backup' Commands For a full list, run $ imap-backup help
-
21
Imap_search () unknown search criteria & ldquo; OR & rdquo; advertisements Trying to build a IMAP Search query to filter...
-
8
What's That Font
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK