Implements the RFC 2177 IDLE extension.
The IDLE extension permits IMAP clients to remain idle, while the IMAP server may send EXPUNGE, EXISTS and flag updates at any time.
This implementation differs from that implied by the RFC in that +/DONE is not actually part of the command; Idle prints the + itself and waits for DONE during command execution. Thus, "parse errors" are not handled in parse().
For some reason, RFC 2177 permits IDLE to be called in authenticated state. We must be careful not to assume otherwise.
Switches to IDLE mode and grabs the input, such that the DONE can be properly processed.
Reads the "DONE" line and switches off IDLE mode.
This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.