Hello,
On Mon, Mar 14, 2005 at 12:03:24PM -0500, sean finney wrote:
it seems that when you say "check for new mail" in apple mail, it sends a NOOP to the imap server to get the response. in uw, the conversation is something like:
25 NOOP 25 OK NOOP completed 26 NOOP
- 2796 EXISTS
- 7 RECENT 26 OK NOOP completed
however, with dovecot, if it has already notified the client that new mail has arrived, it will look something like:
- 24 EXISTS
- 2 RECENT 22 NOOP 22 OK NOOP completed. 23 NOOP 23 OK NOOP completed.
(the counts are different because these are seperate accounts)
so evidently, apple mail is too stupid to realize to read info from the server unless it asked for it...
so now that i think i have a short-term fix (disabling notification for new mail server-side), i can breathe a sigh of relief. for a long-term fix, would it be possible to have the server always notify the client of new mail after a NOOP?
According to RFC3501 (is this the right one?), NOOP can be used to check for new mail, but it doesn't say that the server should return status data every time NOOP is issued.
[...] The NOOP command always succeeds. It does nothing.
Since any command can return a status update as untagged data, the
NOOP command can be used as a periodic poll for new messages or
message status updates during a period of inactivity (this is the
preferred method to do this). The NOOP command can also be used
to reset any inactivity autologout timer on the server.
[...]
The RFC states that the IMAP server MUST send status data to the client if and when mailbox size changes (and I assume dovecot does that) but again, once is assumed enough and the client is REQUIRED to record any status updates (5.2): [...] Regardless of what implementation decisions a client makes on remembering data from the server, a client implementation MUST record mailbox size updates. It MUST NOT assume that any command after the initial mailbox selection will return the size of the mailbox. [...]
Clearly, Apple Mail breaks the RFC if it assumes that the server will report the same data over and over again after each NOOP. There is a standard way to poll for new messages, i.e. using RECENT and EXISTS commands (7.3.1 and 7.3.2). If Apple Mail did that instead of using NOOP, there'd be no problem.
Please, don't hesitate to correct me if I'm wrong.
Regards,
--
Dominik 'Rathann' Mierzejewski