MBOX-Line: From gds at chartertn.net  Sat Feb 18 15:19:49 2017
To: imap-protocol@u.washington.edu
From: Gene Smith <gds@chartertn.net>
Date: Fri Jun  8 12:34:55 2018
Subject: [Imap-protocol] Is SELECT required before FETCH to detect new
 mail?
In-Reply-To: <58A8D4EA.24417.4193CD74@David.Harris.pmail.gen.nz>
References: <bb8d0ae1-dda0-dbce-186a-2a668946ec7b@chartertn.net>
	<CABa8R6tLdckvJ9c-UHHijbvJ95fBGBN41fxhypO1yWzt0tGOMQ@mail.gmail.com>
	<3e01f804-163d-cda3-f5bb-b495fa5a1d50@chartertn.net>
	<58A8D4EA.24417.4193CD74@David.Harris.pmail.gen.nz>
Message-ID: <d6d36078-ac6e-459e-619c-1cfee1dc703b@chartertn.net>

On 02/18/2017 06:12 PM, David Harris wrote:
> On 18 Feb 2017 at 17:29, Gene Smith wrote:
>
>> The charter IMAP server is openwave according the login response. So
>> are you saying it is OK for the IMAP server to require a new SELECT
>> before doing a FETCH on an already selected mailbox for the FETCH
>> response to indicate new email? If so, this is a bug in thunderbird.
>
> One of the major reasons IMAP has such detailed provision for unsolicited
> responses is so that the server can report the arrival of new messages in a
> mailbox *without* the client having to re-select it. Depending on the back-end,
> SELECT can be a fantastically "expensive" operation, and even on servers
> where it's well-optimized, it's probably going to incur significant overhead.
>
> Speaking without any pretence of being authoritative, I'd say that if the only way
> the server can report new messages in a mailbox is through reselection, then it's
> broken, if only because there's no way for a client to learn procedurally that
> that's what the server wants.
>
> In my own client code, I issue periodic NOOP commands and expect to see new
> messages reported as part of the response sequence to that command: that's
> how I would have expected most clients would do it.

Thunderbird sends a NOOP when get mail timer expires on "get new mail" 
button is clicked, before doing the FETCH. However, the charter IMAP 
server always just responds with "OK NOOP completed" and provides no 
additional update info even when new email is definitely present on the 
server.
(Note: other IMAP servers that I access with thunderbird have no 
problem, e.g., gmail, yahoo, and cyrus.)

-gene

