[PATCH 0/8] Reintroduce IDLE; update imaplib2

Antoine Levitt antoine.levitt at gmail.com
Tue Jan 4 11:22:02 GMT 2011


28/12/10 12:46, Ethan Glasser-Camp
> Hi guys,
>
> This is a rewrite of the branch I was working on to get IMAP IDLE
> readded. It uses a brand-spanking-new version of imaplib2 which Piers
> Lauder released to provide timeout functionality (thanks Piers!). I've
> been running this version here and it seems relatively robust, and
> when the connection breaks, timeouts occur consistently and in a
> timely fashion.
>
> I'm not done looking over IDLE support, but I would like feedback on
> this series since it is the foundation for getting IDLE into
> offlineimap. Would you prefer to have the imaplib2 update patches
> separated out, i.e. merge an "update imaplib2" branch? Should I munge
> the original patch series to combine the introduction/updates of
> imaplib2? Please advise.
>
> Thanks,
>
> Ethan

Hi,

This is excellent news! I look forward to using it, and hope it's
reliable enough to run in the background without being monitored. Right
now I'm using it and it seems to work just fine.

However, no hook is called after an idle sync. I'd guess many people use
hooks to be notified of incoming mail, so it'd be useful to add a hook
there. Something as simple as

        hook = account.getconf('postidlesynchook', '')
        account.callhook(hook)

in imapserver at line 446 seems to do the trick. Maybe a preidlesynchook
is also needed. It's probably best to keep hooks separate and not try
and use the same hook for both uses (sync and idle sync), though.

Thanks and keep up the great work,
Antoine





More information about the OfflineIMAP-project mailing list