IMAP Idle Plugin implements support for IMAP IDLE in Mail.app.
Apple's mail client (Mail.app) supports IMAP accounts, but does not support the IDLE extension (RFC 2177). IDLE is good, because it lets the server notify clients when new mail arrives, meaning that clients don't have to poll. Or at least, will get new mail more often than $POLL_INTERVAL.
The IMAP Idle Plugin implements support for IDLE in Mail.app. It opens a connection for each IMAP account, selects the INBOX, enters IDLE mode, and waits for messages. When it gets a message from the server