Subject: [lemonade] Query regarding RFC4551

From: Jayantheesh S B <[email-masked]>
Date: Fri, 4 Apr 2014 14:39:38 +0000

Dear All,

Kindly clarify my below query regarding "CONDSTORE" extension.  In rfc4551, its mentioned that IMAP server supports, this extension

should publish "CONDSTORE" as one of the supported capabilities in the IMAP CAPABILITY command response.

RFC 4551 snippet:
   The Conditional STORE extension is present in any IMAP4
   implementation that returns "CONDSTORE" as one of the supported
   capabilities in the CAPABILITY command response.

As per the above statement, IMAP client i.e., device always relay on the CAPABILITY command response sent by the IMAP server and it enable the CONDSTORE feature on the device dynamically. But some commercial IMAP server in the market, publishes the "CONDSTORE" capability in the response, but for SELECT/EXAMINE command, its responding with NOMODSEQ response. Please find the IMAP transaction below.

IMAP Server Response:
>>> 312 EXAMINE "INBOX"
<<< #null# ["OK", ["NOMODSEQ"], "Sorry, modsequences have not been enabled on this mailbox"]

RFC 4551 snippet:

When opening a mailbox, the server must check if the mailbox supports

   the persistent storage of mod-sequences.  If the mailbox supports the

   persistent storage of mod-sequences and the mailbox open operation

   succeeds, the server MUST send the OK untagged response including

   HIGHESTMODSEQ response code.  If the persistent storage for the

   mailbox is not supported, the server MUST send the OK untagged

   response including NOMODSEQ response code instead.

Could you please clarify device behavior in this situation ? Enabling the CONDSTORE feature based on the CAPABILITY is right implementation ?
As well, I would like to know, this commercial IMAP server compliant to this RFC4551 ? Kindly clarify.

Regards,

Jay

---

From: Jan Kundrát <[email-masked]>
Date: Fri, 04 Apr 2014 16:55:44 +0200

On Friday, 4 April 2014 16:39:38 CEST, Jayantheesh S B wrote:
> Enabling the CONDSTORE feature based on the CAPABILITY is right 
> implementation

If you see CONDSTORE in the capability list, you know that the server 
understands these commands and therefore "supports" the extension. However, 
some servers might be operated in a degraded mode where they choose not to 
offer the CONDSTORE functionality for some of the exported mailboxes -- 
perhaps deliberately, perhaps due to some operator error. It's possible 
that the e-mails are stored on punch cards and there is no space to punch 
enough holes for the HIGHESTMODSEQ on the card which repreents a mailbox, 
for example. Or maybe your client is talking to an IMAP proxy which exports 
data from an ancient server which was released back when CONDSTORE was 
still in the womb. Either way, your client cannot effectively use any 
benefits that CONDSTORE brings within that particular connection to that 
mailbox. It's also possible that the next SELECT will return a MODSEQ, 
that's also allowed by the spec.

> As well, I would like to know, this commercial IMAP server 
> compliant to this RFC4551 ?

Yes, that IMAP server "complies" with the extension specification. I would 
argue that it is either misconfigured, buggy or just broken. As an example, 
an IMAP server which would e.g. increment UIDVALIDITY upon each SELECT 
still "conforms" to all applicable standards, and it's perfectly legal to 
behave in this way. Such a server would also be almost completely useless, 
but they will still be able to tick that mandatory "supports IMAP" checkbox 
on their product datasheet.

With kind regards,
Jan

-- 
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/