On Mon, 31 Mar 2008, simon haywood wrote:
Can you be more specific? Are you saying that new mail arrived, but that
even after waiting a minute or more you never say it?
Exactly.
Mail is sent. Postfix deals with it. Then nothing happens.
The logs of the mail client indicate that Idle mode is accepted, but the
client never polls for mail.
You may misunderstand the way that IDLE works. When a client issues an
IDLE command, it does not poll for new mail. Rather, it waits for server
announcement of new mail. IDLE is a declaration that the client is
actually prepared to read unsolicited server responses.
The first thing that you need to verify is that the client is actually
getting what the server is sending.
With UW imapd, every 2 minutes the client should receive a
* OK Timeout in 28 minutes
message (this will count down). This is an attempt to work around the NAT
box problem (not to mention effectively defeating the entire point of
IDLE) by keeping the session active enough to avoid the loss of NAT
mapping.
If your client is not getting those messages, then something is wrong with
either the client's reading or the communications path (perhaps a NAT box
has already destroyed the mapping). There is no hope of of getting
mailbox updates until you resolve whatever is causing the failure to get
these messages.
Assuming that you are receiving those "Timeout in .. minutes" messages,
then when new messages come in you should see
* 23 EXISTS
* 1 RECENT
(the actual numbers will vary) each time new mail arrives. When this
happens, the client should terminate the idle state by sending
DONE
and then go off to fetch the new messages.
As specified in the IDLE specification, it the session is in IDLE for 30
minutes without receiving a DONE, then the server will autologout and
terminate the session. So the client must send a DONE and restart the
IDLE at least every 29 minutes to keep the session alive.
Unfortunately, in spite of being a co-author of the IDLE specification,
Microsoft does not implement IDLE correctly in Outlook. Lots and lots of
Outlook users complained about "not being told about new mail any more"
and failed to notice the little icon that indicated that their connection
was broken. To work around Outlook's bug, after 29 minutes UW imapd sends
a fake announcement of new mail; this causes Outlook to exit the idle
state to fetch it but UW imapd immediately says that "new message" was
expunged.
What this all means is that IDLE is completely pointless. UW imapd
implements IDLE only as a checklist item, but because of the bugs in NAT
and in Outlook is compelled to implement IDLE in a way that no better (and
arguably worse) than client based polling.
I won't even go into the bugs in various mobile clients that do IDLE
without having a clue as to what it actually does. I wouldn't be at all
surprised if this is the cause of your problems.
-- Mark --
http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw