MBOX-Line: From barryleiba at computer.org  Tue Mar 20 18:06:08 2012
To: imap-protocol@u.washington.edu
From: Barry Leiba <barryleiba@computer.org>
Date: Fri Jun  8 12:34:48 2018
Subject: [Imap-protocol] [ann] lua imap server
In-Reply-To: <C51F6872-1FC8-416A-9BEA-BEA1907ECCF1@mac.com>
References: <CBFD9662-269A-4573-8EF1-E07E7BE4671C@mac.com>
	<20120319204645.GA2859@launde.brong.net>
	<E9A1A407-E02D-4FE8-82EC-B5DDC8F0EDE2@mac.com>
	<17068.1332195426.345309@puncture>
	<17068.1332235633.171765@puncture>
	<C6227176-73D4-455D-91D1-601384A7591E@mac.com>
	<20897.1332282025.074478@puncture>
	<C51F6872-1FC8-416A-9BEA-BEA1907ECCF1@mac.com>
Message-ID: <CAC4RtVAtrYAge6zhoYZsLEiT=MncxLDi6XeEsm6keinMhFFF3A@mail.gmail.com>

>>> In any case, for my humble purpose the set of messages is frozen upon a SELECT and
>>> is only ever updated upon a NOOP request.
>>
>> That's definitely wrong.
>
> Wrong in what sense?

Wrong in that clients are never required to send NOOP commands, and
they expect to get updates at other times.  The protocol actually
requires you to send these sorts of updates when ANY command is
received, modulo the specific situation with EXPUNGE.

> As I see it, IMAP seems to imply a frozen set of messages, until either an EXISTS or
> EXPUNGE is observed. In my case, as timing is not critical, NOOP is the place where that
> observation happens as this seems to be the less troublesome spot to do so.

IMAP implies no such thing at all.
That most clients send a lot of NOOP commands basically speaks to most
clients being inefficient users of IMAP.  With a well written client
and an active user, you might never see NOOPs, and it's seriously
broken server behaviour to only update the message list when you see a
NOOP.

Suppose, for example, that I were using a client that wants to poll
for new mail every 2 minutes, and only sends a NOOP when there's been
nothing else sent to the server for 2 minutes.  My client uses UID
FETCH, so the EXPUNGE issue isn't a problem.  Now, suppose I'm busy
sifting through and cleaning up old mail, so I'm constantly opening
messages and deciding whether to keep them in this mailbox, delete
them, or move/copy them elsewhere.  So the client is sending a lot of
FETCH, STORE, and COPY commands, and sees no reason to send a NOOP.

Suppose I'm doing this for something like an hour and a half, and
imagine my surprise when I stop to take a break for a few minutes, and
suddenly get notified of 90 minutes' worth of new mail.

Please fix your server.

Barry

