[Imap-protocol] [noob] multiple fetch responses for the same message?

Dave Cridland dave at cridland.net
Mon Nov 14 01:13:53 PST 2011


On Sun Nov 13 21:30:49 2011, Mark Crispin wrote:

> On Sun, 13 Nov 2011, Arnt Gulbrandsen wrote:

>> It's safe for flags+rest. but not so safe for e.g. uid+rest:

>> * 42 FETCH (UID 100)

>> * 42 FETCH (RFC822.SIZE 12345)

>

> Those pair responses is completely compliant. Any client which has

> the

> slightest problem with it is broken.

>

> Servers can do this. There are servers that do it.


As a note without conclusion, there are two variations of this which
are significant when considered as the response to a UID FETCH:

1) Sending everything in one response, but not having UID first.

* 42 FETCH (RFC822.SIZE 12345 UID 100)

This is entirely legitimate, and trips up some clients.

2) Sending as Mark's example, but reversed:

* 42 FETCH (RFC822.SIZE 12345)
* 42 FETCH (UID 100 ENVELOPE (...))

This will trip up some clients; but in practise the RFC822.SIZE
response will simply be discarded. Still, this is particularly
pathological anyway.

In pragmatic terms, if I were doing a revision of IMAP, I'd have
these as MUST NOT send, SHOULD accept. (That is, I'd document that
existing deployed clients choke on such constructs, therefore these
actively harm interoperability; on the other hand servers exist that
send such things, and clients ought to be capable to accepting it). I
know this is nastier than people adhering to the specification in the
first place, but I think it'd be more practical at this stage.

Dave.
--
Dave Cridland - mailto:dave at cridland.net - xmpp:dwd at dave.cridland.net
- acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
- http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade



More information about the Imap-protocol mailing list