IMAP Idle Timeout

Posted by Paul on Stack Overflow See other posts from Stack Overflow or by Paul
Published on 2010-03-25T05:08:31Z Indexed on 2010/03/25 5:13 UTC
Read the original article Hit count: 705

Filed under:
|

Lets say I am using IMAP IDLE to monitor changes in a mail folder.

The IMAP spec says that IDLE connections should only stay alive for 30 minutes max, but it is recommended that a lower number of minutes is selected - say 20 minutes, then cancel the idle and restart.

I am wondering what would happen if the mail contents changed between the idle canceling, and the new idle being created. An email could potentially be missed. Given that RECENT is a bit vague, this could lead to getting a message list before the old idle ends, and a new idle starts.

But this is almost the same as polling every 20 minutes, and defeats some of the benefit of idle.

Alternatively, a new idle session could be started prior to terminating the expiring one.

But in any case, I think this problem has already been solved so here I am asking for recommendations.

Thanks,

Paul

© Stack Overflow or respective owner

Related posts about imap

Related posts about idle