Mail.app IMAP IDLE plugin

ImapidlepluginMichael Rothwell has written a plugin for Mail.app that adds support for IMAP’s IDLE command .

This feature allows the server to tell Mail.app when new mail arrives rather than Mail needing to poll the server.

As Michael explains,

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 indicating that new mail has arrived, it causes Mail.app to check for new mail in that account.

The plugin will work with any IMAP4 mail server that supports IDLE, is freeware and is available from Michael’s web site .

UPDATE: Michael has knocked out an updated version of the plugin (1.01).

It fixes a small kink: “Certain IMAP servers (like Cyrus) were sending a reponse to the IDLE request that I wasn’t handling correctly.” Good news for Fastmail users (and others).

He also provides a link to a page with some info on which mail servers support the IDLE feature (dotMac doesn’t).

UPDATED UPDATE: Michael has produced another update (1.0.2) which (a) respects the “enabled” setting for individual accounts, (b) handles accounts being taken “offline” and (c) checks the mail server’s capability to support the IDLE extension and reports yea or nay back in the console log (see /Applications/Utilities/Console.app). Excellent!

Tags: , , , , ,

Related posts

27 Responses to “Mail.app IMAP IDLE plugin”

  1. mazo says:

    Does this work for other IMAP folders (other than INBOX) as well? Or is there another plugin to force Mail to check all folders, instead of just checking the IMAP INBOX?

  2. Travis Bell says:

    Saweeeet! I alwaus wished Mail.app suported this be default.

  3. Senioré Soosy says:

    Wow, Mail doesn’t have this built in? For shame!

  4. VidKid says:

    Didn’t work for me… (well, it works in that it successfully logs on, issues idle, gets confirmation from the server, sees new mail arrive, but it doesn’t notify Mail - so the end result is nothing).

    VidKid

  5. Dave Hamilton says:

    I presume that I’m seeing the same thing as VidKid — no end result… But I’m curious, VidKid — how are you seeing it issue idle, etc?

  6. Travis Bell says:

    Dave/VidKid: Same here, and yeah, VidKid how are you checking whether it’s logging in and setting the IDLE status properly?

  7. Jeff B says:

    I’m seeing the same thing. It does not work. I am running 10.4.7, I checked the defaults commands carefully, etc. I am running a Courier IMAP server and it works great using IDLE with my Treo 650 and Chatter, so I know it is not the mail server.

  8. Mike says:

    O.T.

    Have you seen GNUMail has had another release - or rather pre-release - Tim?

    http://www.collaboration-world.com/cgi-bin/project/news.cgi?pid=2

    Of course, the application is mainly aimed at GNUstep users and doesn’t perhaps offer much to OS X users that Mail hasn’t already got without being quite as mature. But the OS X version has got PGP support and support for custom headers and a few other nice features.

    Anyway, just a heads up, as I know you like to keep an eye on email client news.

  9. Michael says:

    Hi — I’m the guy who wrote the plugin. Version 1.01 is available now. Certain IMAP servers (like cyrus) were sending a reponse to the IDLE request that I wasn’t handling correctly. Give 1.01 a shot!

  10. Tim says:

    @Mike — thanks for the news about GNUMail. I do keep half an eye on things like that, but missed this one.

    @Michael — thanks for tips about the update. Nice.

  11. Jeff B says:

    The 1.01 version now seems to work. I’ve set my Polling Interval to “Manually” and that seems to be fine. I did have to shutdown and startup Mail.app one more time to get it to open the IDLE connection and start working reliably. The first time I started Mail.app after installing 1.01 it did not work. Other than that, it’s nice. Coexists well with Chatter on my Treo. Also seems to handle disconnecting and reconnecting my Internet connection via turning my Airport Card off and then back on.

    Thanks for the app and the update. Nice work.

  12. Travis Bell says:

    > Jeff B: I’ve set my Polling Interval to “Manually” and that seems to be fine.

    Maybe something has been borked… where are you setting that? I follow his instructions to a T and get no pref pane or anything I can see to edit a single setting….

  13. Michael Rothwell says:

    The “polling interval” is a regular Mail preference. Look under “General” for “Check for new mail”.

    And you have correctly observed that my plugin has no UI! Not yet, anyway. There’s really no knobs to twist — its only job is to make Mail realize the server has told it that there’s new mail. Any suggestions for UI elements?

  14. Jeff B says:

    I may have spoken too soon. While 1.01 works, it still seems to be spotty. Sometimes new mail flows in as it arrives at the server, other times not. Much less reliable than Chatter on my Treo. It seems like at times it needs a little bump to start working. I wonder if IMAP can handle two different clients with connections for IDLE getting push info at the same time?

  15. Michael Rothwell says:

    @Jeff –
    Can you email me a copy of the text in your console log?

  16. Sherman says:

    FWIW, I’m using the plugin with ChatterEmail on my Treo, and both seem to be working just fine. Sometimes Chatter reacts first, sometimes Mail. But having two clients with IDLE connections seems to be working for me.

  17. Michael says:

    Version 1.02 is available!

  18. Tim says:

    Excellent! Thanks.

  19. Michael Rothwell says:

    I notice that a few of you use ChatterEmail. How do you like it? Do any of you use the Exchange plugin?

  20. Jeff B says:

    Chatter is great. Easily the best email I have used on the Treo. The UI is excellent, very easy to use and the price is minima.. It’s much better than Snapper and at a lower price and more functionality for IMAP. Not quite as responsive as a Blackberry, but damn close. I do not use Exchange, but I do use Chatter+ which has built in SSL for secure IMAP. It works great with IDLE. All messages are delivered nearly instantaneously. Highly recommend.

    Another note: as for 1.02, I still get very sporadic or no delivery of mail. Even while Chatter works perfectly. And if I turn off Chatter, 1.02 still behaves the same on my Powerbook. Not sure, maybe it has something to do with the fact that I use SSL for incoming IMAP mail and TLS for outsoing SMTP mail. For now, I’ve gone back to polling every 5 minutes.

  21. Jeff B says:

    Another bit of feedback. When I woke up my PB from sleep today, shortly thereafter, Mail.app crashed. This has never happened to me before, and seems related to the IDLE plugin. FYI.

  22. Michael says:

    Oo… crashes aren’t good. I’ll test that. Thanks!

  23. Michael Rothwell says:

    Version 1.03 is available here:
    http://fivepoundsflax.blogspot.com/2006/09/imap-idle-103-for-apples-mailapp.html

  24. Jeff B says:

    I tried 1.03. Still no luck. Basically, I see the plugin register with the mail server and report that it is entering IDLE mode and that it is SELECTED and IDLING, but nothing happens. The events never come from the server even though they come to Chatter on my Treo. Just a whole lot of sitting and waiting and nothing happening. Console log looks pretty much like what I sent before.

    Regards, Jeff

  25. Michael Rothwell says:

    Would you mind sending me a new log dump anyway?

  26. Hawk Wings » Blog Archive » IMAP IDLE plugin 1.03: Slimmer, more robust says:

    [...] Since first releasing his IMAP IDLE plugin for Mail.app just over a week ago, Michael Rothwell has been churning out the updates. [...]

  27. Hawk Wings » Blog Archive » IMAP-IDLE Plugin for Mail.app updated says:

    [...] Michael Rothwell has updated his excellent IMAP-IDLE plugin for Mail.app, which adds support to Mail for IMAP’s IDLE command , so that the server tells Mail.app when new mail arrives rather than Mail needing to poll the server. [...]

Leave a Reply