[Imap-protocol] [ann] lua imap server
dave at cridland.net
Tue Mar 20 15:22:44 PDT 2012
On Tue Mar 20 21:33:37 2012, PA wrote:
> Thanks for the feedback though as I have to confess that sometime
> both the letter and the spirit of the protocol escapes me. Talking
> it through helps :)
Also, read the original IMAP RFCs. They're much more vague than the
newer ones, but they do give a much better insight into what the
protocol is trying to do. Unfortunately, the later RFCs concentrate
more on the mechanics and less on the model.
Loosely, a client selects a mailbox, and then you send it arbitrary
data about the mailbox whenever you feel like. The client uses this
information to update and fill its cache.
Certain things, though, you must tell the client about - particularly
mailbox size changes, although as you've noted, expunges can only be
sent when the client won't get confused.
A client may ask for specific data (via FETCH), and the server
responds (with a tagged OK) once this has been sent. I seem to recall
that (very) early servers were allowed to simply respond with OK if
the data had already been sent - that is, not send data twice even if
The modern protocol requires that if you're asked for data (via
FETCH), you must then send it, even if the client really ought to
know the data already. This makes the protocol less confusing,
particular for those of us trying to test things on telnet, but it
makes the protocol look like a request/response protocol, which it
isn't - conceptually, the FETCH command and its response, and the
data that the server sends via untagged FETCH responses, are
unrelated - with the single exception that the server has been
requested to send them.
It might be better to imagine that untagged traffic is sent through a
different connection - you'd then see the model more clearly, perhaps.
But I'm waffling...
Dave Cridland - mailto:dave at cridland.net - xmpp:dwd at dave.cridland.net
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade
More information about the Imap-protocol