Is IMAP CONDSTORE widely supported?
Asked Answered
P

4

6

I'm building a simple webmail and I would like to make use of the CONDSTORE extension for IMAP: it allows to fetch everything that has changed (messages, flags, …) since a date, which is very practical to synchronize the email client to the IMAP server.

However I have absolutely no idea if this IMAP extension is actually supported by most IMAP servers or not.

So is there any kind of source that could tell me how well this extension is supported? For example, does GMail or Hotmail support it?

(the hidden question behind this is obvious: is CONDSTORE the most appropriate way to synchronize my email client to the IMAP server? I store locally copies of emails, that's why I need synchronization)

Pediment answered 19/4, 2014 at 22:21 Comment(1)
Doesn't seem to be widely supported. I've just moved from hMailServer to Axigen for support of UIDPlus extension. I've looked at the specification for both of these and it doesnt seem supportedRunkle
P
2

No, it is not widely supported. You can treat it as an optimization to use when available, but you cannot depend on it. You also need a way to track removed messages, which is not something condstore can tell you

Gmail, however, just rolled out support for it recently.

Ptolemaeus answered 20/4, 2014 at 1:30 Comment(3)
Thanks. You also need a way to track removed messages, which is not something condstore can tell you: that's a serious problem for me :/, condstore is out thenPediment
@guettli definitely, I've been waiting for JMAP for 5 years! It's really great to see it's been accepted finally!Pediment
@MatthieuNapoli I just asked gmail via feedback page if they could support it. Which big mail provider could be asked next?Palinode
R
7

As I needed a more precise answer, I did a small node.js script and used some test accounts.

Here are the results, if you need more accounts, tell me.

yahoo

No CONDSTORE.

  • IMAP4REV1
  • ID
  • NAMESPACE
  • X-ID-ACLID
  • UIDPLUS
  • LITERAL+
  • XAPPLEPUSHSERVICE
  • XYMHIGHESTMODSEQ

gmail

CONDSTORE supported.

  • IMAP4REV1
  • UNSELECT
  • IDLE
  • NAMESPACE
  • QUOTA
  • ID
  • XLIST
  • CHILDREN
  • X-GM-EXT-1
  • UIDPLUS
  • COMPRESS=DEFLATE
  • ENABLE
  • MOVE
  • CONDSTORE
  • ESEARCH

outlook.com

No CONDSTORE.

  • IMAP4REV1
  • CHILDREN
  • ID
  • NAMESPACE
  • UIDPLUS
  • UNSELECT
River answered 23/4, 2014 at 9:23 Comment(2)
Interesting! Though the list is not easy to read to find whether or not it contains CONDSTORE ;)Pediment
changed it a little bit :)River
P
2

No, it is not widely supported. You can treat it as an optimization to use when available, but you cannot depend on it. You also need a way to track removed messages, which is not something condstore can tell you

Gmail, however, just rolled out support for it recently.

Ptolemaeus answered 20/4, 2014 at 1:30 Comment(3)
Thanks. You also need a way to track removed messages, which is not something condstore can tell you: that's a serious problem for me :/, condstore is out thenPediment
@guettli definitely, I've been waiting for JMAP for 5 years! It's really great to see it's been accepted finally!Pediment
@MatthieuNapoli I just asked gmail via feedback page if they could support it. Which big mail provider could be asked next?Palinode
M
2

Dovecot and gmail support condstore, and any marketing professional will tell you that they alone cover 70% of the users. Whether you believe marketing math is another question, and whether 70% is a lot in your eyes is a third, and neither of those questions are appropriate for SO.

To check any particular server, do either openssl s_client -connect asdf.example.org:993 -crlf or telnet asdf.example.org 143 to connect, then a login asdf fdsa to log in and finally b capability to get the list of extensions. You will see condstore listed in the reply. Or not, as the case may be.

Edit: Due to @guettli's request I took a convenient set of email addresses now, and for each address I determined a few possible IMAP server names heuristically and tried to connect to port 993. I see >80% CONDSTORE now, if I count only the addresses for whom I could connect, and do a little bit of guesswork, such as assuming that all Dovecot servers are new enough to support CONDSTORE.

However, your address mix isn't like mine (which happens to be dominated by one particular freemail provider), and the way to count depends on your purpose. Do you want to count the big providers that have CONDSTORE, but whose users mostly use the web interface?

If you want to count servers rather than users, Shodan can help. Searches for imap generally and for the most popular server says 75% of servers have condstore and the remaining 25% may or may not. But of course that's a misleading way to count: most users are on a few freemail services and most of the rest are on just a few thousand other providers.

If you want to run a survey yourself, connect to ports 143 and 993 and send a capability and then CRLF. Condstore is supported if the response includes either condstore, qresync, anything to do with modseq, or if the server banner names Dovecot or Cyrus. (Some servers won't tell you whether they support condstore until you have logged in, so looking at the server name is a good proxy.)

Maynardmayne answered 20/4, 2014 at 6:58 Comment(3)
Is Dovecot used by Yahoo and hotmail or something?Greaves
By a great many somethings. By 53% of sites/users, the dovecot people told me, and they mentioned a few big ones. I'm afraid my namedropping sensor activated itself, so I've forgotten the names.Maynardmayne
It should be noted that some IMAP servers (including Dovecot) disclose a full list of their capabilities only after a successful login.Buckles
G
0

So is there any kind of source that could tell me how well this extension is supported? For example, does GMail or Hotmail support it?

For gmail:

$ openssl s_client -connect imap.gmail.com:993 -crlf

t login [email protected] ******** 
* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH

Left as an exercise for other IMAP servers.

Greaves answered 22/4, 2014 at 19:59 Comment(2)
I don't have a GMail account, and I don't own an email account on 90% of email providers either. While I understand and I respect your point (i.e. just have a look yourself) I was more looking for someone with experience that might tell me straightaway "CONDSTORE is not the solution to your problem". And as a matter of fact that's exactly what I got.Pediment
@MatthieuNapoli gmail, yahoo, aol, and outlook accounts are free to sign up and cover > 90% of market share. I will tell you Yahoo doesn't support it but this doesn't really matter. It's an optimization on something you can manually do, which really should mean your Gmail users get lightning fast responsiveness on resynching and Yahoo users get to sit there and watch. So manually solve it and write the optimization when supported. I believe you can get an icloud account for free with a workaround if you don't have an Apple device.Greaves

© 2022 - 2024 — McMap. All rights reserved.