On Mon, Nov 22, 2010 at 08:51:15AM -0800, Michael Elkins wrote:
> On Sun, Nov 21, 2010 at 05:34:04PM +0100, Raph wrote:
> >I wanted to try imap_idle=yes, with gmail.
> >I unset mail_check and timeout, then
> 
> These two variables are integers, not booleans, and thus you can't
> unset them.  $mail_check controls checking of the mailboxes
> specified by the `mailboxes` command, which is separate from polling
> of the currently opened mailbox.
thank you for the clarification

> 
> >set imap_passive and imap_idle to 'yes'.
> >
> >I run tcpdump to see what happens (gmail TLS though)
> >I saw that when sending a new email (from another account), gmail send a
> >packet to mutt (which reply), but sadly, the index is not refreshed
> >until I hit, eg, the 'i' key.
> >I would have expected that imap_idle would refresh the screen as a new
> >email is received but that's not the case.
> >
> >I _guess_ that it may be hard to check whether or not the email has been
> >received in the currently opened (displayed) mailbox and refresh it only
> >if needed but I thought it was what imap_idle was there for in the first
> >place. (but I would be surprised if the IMAP IDLE spec would not deal
> >with this problem)
> >
> >Did I missed an option ? Do you know about a thread/ticket on this
> >subject ? I wasn't able to find one so far.
> 
> You just need to set $timeout to a smaller value.  Even though the
> IMAP server has sent a notification that the mailbox has changed
> while the client is waiting on IDLE, Mutt won't notice it until the
> $timeout expires.  You can set it to something small like 5 seconds
> if you're using IDLE, and it won't cause excessive traffic to the
> IMAP server.
Ok, I understand now.

But ... I may have missed the point as it does not work as expected.
If I set the timeout (to, eg, 5), tcpdump shows traffic every 5
seconds. imap_idle is set to "yes", and gmail:imaps supports IDLE
(checked with openssl s_client)

so I still need to dig this ...

Raph

Reply via email to