MBOX-Line: From dave at cridland.net  Tue Mar 20 02:27:13 2012
To: imap-protocol@u.washington.edu
From: Dave Cridland <dave@cridland.net>
Date: Fri Jun  8 12:34:48 2018
Subject: [Imap-protocol] [ann] lua imap server
In-Reply-To: <17068.1332195426.345309@puncture>
References: <CBFD9662-269A-4573-8EF1-E07E7BE4671C@mac.com>
	<20120319204645.GA2859@launde.brong.net>
	<E9A1A407-E02D-4FE8-82EC-B5DDC8F0EDE2@mac.com>
	<17068.1332195426.345309@puncture>
Message-ID: <17068.1332235633.171765@puncture>

On Mon Mar 19 22:17:06 2012, Dave Cridland wrote:
> On Mon Mar 19 21:29:08 2012, PA wrote:
>> 
>> On Mar 19, 2012, at 9:46 PM, Bron Gondwana wrote:
>> 
>> > Have you looked at http://imapwiki.org/ImapTest ?
>> 
>> Yes, I have looked at ImapTest.  Didn't quite manage to use it,   
>> even though looking at the test case themselves was instructive.
> 
> It works against Polymer. I can read all the mailboxes, and they  
> seem  reasonable.

TRACE: imap://lua@svr225.stepx.com:1143/ 159.693 '9>>> CB NOOP\r\n'
TRACE: imap://lua@svr225.stepx.com:1143/ 159.767 '9<<< * 312  
exists\r\n'
TRACE: imap://lua@svr225.stepx.com:1143/ 159.819 '9<<< CB ok noop\r\n'
TRACE: imap://lua@svr225.stepx.com:1143/ 219.818 '9>>> DB NOOP\r\n'
TRACE: imap://lua@svr225.stepx.com:1143/ 219.891 '9<<< * 312  
exists\r\n'
TRACE: imap://lua@svr225.stepx.com:1143/ 219.937 '9<<< DB ok noop\r\n'
TRACE: imap://lua@svr225.stepx.com:1143/ 279.860 '9>>> EB NOOP\r\n'
TRACE: imap://lua@svr225.stepx.com:1143/ 279.934 '9<<< * 312  
exists\r\n'
TRACE: imap://lua@svr225.stepx.com:1143/ 279.980 '9<<< EB ok noop\r\n'

No, NOOP is a command that does nothing; an EXISTS response is not  
automatically generated - it can be generated during any command (or,  
for extra bonus points, not during any command), but only when there  
are new messages.

 From ?7.3.1:

      The EXISTS response reports the number of messages in the  
mailbox.
      This response occurs as a result of a SELECT or EXAMINE command,
      and if the size of the mailbox changes (e.g., new messages).

Polymer (and probably other clients) doesn't care, but technically  
they could behave oddly in this case.

Incidentally, there are two commands that do nothing in IMAP, and  
both are typically used for checking for new mail. NOOP returns  
instantly, whereas IDLE returns only after the client sends DONE.  
They're allowed to do whatever you want to make this happen behind  
the scenes in your server, of course, they just don't affect the  
state of the mailbox from the client's point of view.

But a client *could* check the mailbox by repeatedly polling with a  
SEARCH command, too.

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

