Re: imap closed after leaving index screen for awhile

2009-07-21 Thread bill lam
On Wed, 22 Jul 2009, Kyle Wheeler wrote:
> If you want to use the IDLE feature of IMAP, then yes, you need to set 
> $imap_idle yourself.

Thanks Kyle, setting imap_idle solved the problem.

Another question about imap, does it require mutt to poll the server
just like pop3, or the imap server will actively notice mutt (email
client) when new emails arrives once the connection to imap server is
established?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3


Re: imap closed after leaving index screen for awhile

2009-07-21 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Wednesday, July 22 at 05:57 AM, quoth bill lam:
> Does the imap_idle or imap_keepalive need to set explicitly in 
> current HEAD version of mutt?

If you want to use the IDLE feature of IMAP, then yes, you need to set 
$imap_idle yourself. The reason it defaults to off is that there are 
several IMAP servers that claim to support IDLE but which have major 
problems if you try to use it. For example, when mutt first started 
supporting IDLE, it exposed a bug (the same bug, oddly) in both 
BincIMAP's and Dovecot's IDLE support: they didn't like it when the 
IDLE command was pipelined after another command, and that caused them 
to disconnect the client (mutt). To my knowledge, Gmail implements 
IDLE correctly, so you can safely enable $imap_idle.

The $imap_keepalive setting defaults to 900 seconds between IMAP 
commands; it should be small enough, but you may want to make it 
smaller. In the words of the muttrc man page:

 The default is well within the RFC-specified minimum amount of
 time (30 minutes) before a server is allowed to [disconnect you],
 but in practice the RFC does get violated every now and then.
 Reduce this number if you find yourself getting disconnected from
 your IMAP server due to inactivity.

> # refresh imap inbox
> # set imap_keepalive=300

You probably want to uncomment that.

> # Don't wait to enter mailbox manually #unset imap_passive
>
> # Automatically poll subscribed mailboxes for new mail (new in 1.5.11) 
> set imap_check_subscribed=yes
>
> # Reduce polling frequency to a sane level
> set mail_check=300
>
> # And poll the current mailbox more often (not needed with IDLE in 
> post 1.5.11)
> set timeout=300

That description is not quite accurate (I don't think). Check out this 
description: http://markmail.org/message/y7bbgghx4k2sxgtc

~Kyle
- -- 
Having a family is like having a bowling alley installed in your 
brain.
 -- Martin Mull
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKZqH5AAoJECuveozR/AWeaUMQALDaY0YYXOXeQZ9DZ23pgHRL
huac/ZeukQIWcNABm9XbI6NBEQD/dr+dLIj6cImMjeJ67OX2qPEInbIUOi4/QeLS
zoHm+4cY+SSKFehd1wECQMvep5oeMHxVV+pZKrl8Hmx+CRGicxqQibMbpYvh02Z+
Ajl4G0uqdUCmWT/858e3qCqpaxX24uAz3gUIgTCiYAMGnHuXOvFIfFJ3LeTjVwcr
uIxMCaz1blV+Bfh8xprFErIce0Uhk8XqL0Ni2RTHWEW7AXsfETN0EvqmWufzudeS
+0auD9xpICtC8589EaQxsBxRJhjTdb+C/ak0F69OFjCtpfPvluA5vY+pZJIc1cdd
nsxeAp9OdwTiDaliQHFJ061qW2xELnjP+afQEt0rEM98dPGLJKcLjqwsYSLUPieL
6xpGO2BYTTuuuZJxrNkMlrQf/rNOMLYwCN7XrdHh0cX/mYt3lHZe9uQw7vKfvmgE
7aMJZtsxWKQgmkRDB+5mlfNGg6lMV47W/B1zPxAYyosHqTEgMgxvflGPbXy6x7a6
BD0k75O+KxWylgCzda4Gq6rpGhuFJ5C1PHpvQCy5qzfkdT4b7LFluvGn4ooRE0WN
anogrkuYirC7ceWGqh1tPw1WUtTg0aiK7Ml+49dXYdjUH+GccIhal7oLm87dXuU1
W7nUe/a+c0Khe4HKNcAc
=HGRG
-END PGP SIGNATURE-


Re: imap closed after leaving index screen for awhile

2009-07-21 Thread bill lam
On Tue, 21 Jul 2009, Kyle Wheeler wrote:
> There's no quick answer to this, because it largely depends on why 
> you're being disconnected. For example, it could be that you have 
> imap_idle on, but a very high (or absurdly low) imap_keepalive (IDLE 
> may not be used for some reason while you're composing new messages). 
> What are your timeout- and imap-related settings?
> 

The followings is the imap and cache related entries.  Does the
imap_idle or imap_keepalive need to set explicitly in current HEAD
version of mutt?

# refresh imap inbox
# set imap_keepalive=300

set imap_list_subscribed="yes"

# Don't wait to enter mailbox manually
#unset imap_passive

# Automatically poll subscribed mailboxes for new mail (new in 1.5.11)
set imap_check_subscribed=yes

# Reduce polling frequency to a sane level
set mail_check=300

# And poll the current mailbox more often (not needed with IDLE in post 1.5.11)
set timeout=300

# keep a cache of headers for faster loading (2.5.9+?)
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies

set message_cache_clean=yes

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3


Re: imap closed after leaving index screen for awhile

2009-07-21 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Monday, July 20 at 09:30 AM, quoth bill lam:
> I use imap server for gmail. When a read an email in the pager or 
> composing a long new message and if that takes more than several 
> minute, the connection to imap server become disconnected.  It seems 
> the connection to imap can only be maintained alive in the index page. 
> Is there any workaround?

There's no quick answer to this, because it largely depends on why 
you're being disconnected. For example, it could be that you have 
imap_idle on, but a very high (or absurdly low) imap_keepalive (IDLE 
may not be used for some reason while you're composing new messages). 
What are your timeout- and imap-related settings?

> Another issue not sure related to imap or not.  Suppose I mark read 
> or delete some messages in the index and press $ to update.  It 
> seems updated, but if the connection to imap became broken before 
> closing down mutt. The next time opening the mailbox index it still 
> shows those messages as new or not deleted.  How to tell mutt to 
> really flush changes when press $.  I use header and body cache if 
> it matters.

That's supposed to work (and it works for me on my IMAP systems). If 
it doesn't work for you, either it's taking too long to sync and mutt 
isn't getting finished, or gmail isn't handling those commands 
correctly (gmail is notorious for IMAP bugs).

~Kyle
- -- 
As an adolescent I aspired to lasting fame, I craved factual 
certainty, and I thirsted for a meaningful vision of human life. So I 
became a scientist. This is like becoming an archbishop so you can 
meet girls.
 -- M. Cartmill
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKZitOAAoJECuveozR/AWe0ewQAKrqhh7910UTmPbrdf5bwCtR
VA2YsGePbFcmrUwSDLIsnqgRLAHNKNNDhOArxcsscJBACuIz6Ggehm+4z+IxIGsc
6m1Pfi+rMgI4EGGihTwbZyRgnyLtbDylQHVSc/sNc4Q9p6cD3gX/F7fJDMh97EU+
QdphmuJz2ZvtpbsBwtRO0ud+g2WRv+NYZp8PKW3tIM9ETxy5tu3BliD5gNAIuYBG
JkHhCwruHyqyDtCSLk7BpNqBU0URSLC/BStNgxOHFNRUv/0jHHRspyE/MtKgKSHe
9zs9Ekzc+W8mFwRaLOPQwUY53ZZTfb524xhXzaG0geq0XO+nOC8rrUHXGuu+vSUW
3Bk1V7JtLi7N5gOqfqg10LevJxxXOOY2ux5sfvKgpnyZbVT3uy1kQXHzluoRAuiy
tta+d4rfHavMrGT1Qz//HbImQc9rWANJuVnyD0+vjRCtTRBafc2g9kqbO9Q1n9j7
maG07eTWdVVkq1c2Fyqs5cNTVqkgsWWeYTzAFc32NzTRWB5ZCj3r1gCWKjFMxh9q
5CumbpFpQRbmiYspteo2FUmJOeJm4/K2GlMTtYuZkrXobFFqxvq8Amu2bF3m1b7M
faw2J1WotNIRBOvymJ6Lk7wb7PBchrTZeXOz7ICDbAZwEcYf9Q+Z8ayjugZ7is65
rQDanLZvMxS8myxmtyKY
=O96y
-END PGP SIGNATURE-