Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IMAP connection timing out?

1,779 views
Skip to first unread message

Grant Edwards

unread,
Feb 1, 2008, 5:38:39 PM2/1/08
to
If I'm connected to Gmail's IMAP server and I spend too long
editing an e-mail, it _appears_ that the IMAP connection is
timing out. After I finish editing the e-mail and hit 'y' to
send it, mutt tries to save the message to my "fcc" folder
which is the IMAP folder "[Gmail]/Sent mail" on Gmail's IMAP
server. At that point, mutt just hangs.

If I hit ctrl-C it says the mailbox is closed. I can postpone
the message, re-open the IMAP connection, recall the message,
and hit 'y' to send. Then it works just fine: the message is
saved in "[Gmail]/Sent messages" and then handed off my my
local "sendmail".

If I don't spend too long editing the e-mail it's fine.

Does mutt stop sending "idle" commands to the IMAP server while
I'm editing the message?

--
Grant Edwards grante Yow! I think my career
at is ruined!
visi.com

Grant Edwards

unread,
Feb 1, 2008, 5:53:23 PM2/1/08
to
On 2008-02-01, Grant Edwards <gra...@visi.com> wrote:

> Does mutt stop sending "idle" commands to the IMAP server while
> I'm editing the message?

I've been looking through the source code, and it sure looks
like imap_wait_keepalive(pid_t pid) is supposed to be sending
idle commands to the server while I'm editing.

I wonder if the Gmail server timeout is a lot shorter than the
IMAP spec allows...

--
Grant Edwards grante Yow! I always have fun
at because I'm out of my
visi.com mind!!!

Grant Edwards

unread,
Feb 1, 2008, 5:59:52 PM2/1/08
to
On 2008-02-01, Grant Edwards <gra...@visi.com> wrote:
> On 2008-02-01, Grant Edwards <gra...@visi.com> wrote:
>
>> Does mutt stop sending "idle" commands to the IMAP server while
>> I'm editing the message?
>
> I've been looking through the source code, and it sure looks
> like imap_wait_keepalive(pid_t pid) is supposed to be sending
> idle commands to the server while I'm editing.
>
> I wonder if the Gmail server timeout is a lot shorter than the
> IMAP spec allows...

It sure looks like the Gmail server is timing out connections
in less that 15 minutes:

4< * OK [UIDNEXT 49]
Getting mailbox UIDNEXT
4< a0004 OK [READ-WRITE] inbox selected. (Success)
IMAP queue drained
Mailbox flags: [\Answered] [\Flagged] [\Draft] [\Deleted]
[\Seen] [\*]
imap_open_mailbox: msgcount is 0
mutt_index_menu[613]: Got op 97
send.c:1176: mutt_mktemp returns "/tmp/mutt-grante-1001-5193-0".
4> a0005 NOOP
mutt_socket_write: error writing, closing socket

--
Grant Edwards grante Yow! I'm into SOFTWARE!
at
visi.com

Grant Edwards

unread,
Feb 2, 2008, 9:57:34 AM2/2/08
to
On 2008-02-01, Grant Edwards <gra...@visi.com> wrote:
> On 2008-02-01, Grant Edwards <gra...@visi.com> wrote:
>> On 2008-02-01, Grant Edwards <gra...@visi.com> wrote:
>>
>>> Does mutt stop sending "idle" commands to the IMAP server while
>>> I'm editing the message?
>>
>> I've been looking through the source code, and it sure looks
>> like imap_wait_keepalive(pid_t pid) is supposed to be sending
>> idle commands to the server while I'm editing.
>>
>> I wonder if the Gmail server timeout is a lot shorter than the
>> IMAP spec allows...
>
> It sure looks like the Gmail server is timing out connections
> in less that 15 minutes:

Gmail's imap server is definitely violating the spec and timing
out somewhere at between 10-15 minutes. Setting the keepalive
time to 5 minutes in muttrc solves the problem.

--
Grant Edwards grante Yow! Am I elected yet?
at
visi.com

Harold Stevens

unread,
Feb 2, 2008, 10:06:58 AM2/2/08
to
In <13q916u...@corp.supernews.com> Grant Edwards:

[Snip...]

> Gmail's imap server is definitely violating the spec

FWIW, Mark Crispin isn't exactly enthused with Google's "IMAP" either:

Ahem, Gmail team: Mark Crispin wants to know when your implementation
of his protocol is going to be fully compliant.

With Gmail's adoption of IMAP, one of electronic messaging's best-kept
secrets has been thrust suddenly into the spotlight. But IMAP's
inventor says the move, while overdue, doesn't deserve the fanfare it
received.

More:

http://www.wired.com/software/webservices/news/2007/10/imap

Maybe The Google Gropers Cabal wasn't happy hosing only Usenet.

--
Regards, Weird (Harold Stevens) * IMPORTANT EMAIL INFO FOLLOWS *
Pardon any bogus email addresses (wookie) in place for spambots.
Really, it's (wyrd) at airmail, dotted with net. DO NOT SPAM IT.
Kids jumping ship? Looking to hire an old-school type? Email me.

Grant Edwards

unread,
Feb 2, 2008, 11:05:14 AM2/2/08
to
On 2008-02-02, Harold Stevens <woo...@aces.localdomain> wrote:
> In <13q916u...@corp.supernews.com> Grant Edwards:
>
> [Snip...]
>
>> Gmail's imap server is definitely violating the spec
>
> FWIW, Mark Crispin isn't exactly enthused with Google's "IMAP"
> either:

That's hardly news. AFAICT, he hates everything and everybody.

> Maybe The Google Gropers Cabal wasn't happy hosing only
> Usenet.

Now that I've figured out the timout issue, I find Google's
IMAP service to be quite servicable. I'm sure it's got bugs,
but it sucks a lot less that the other IMAP server I use.

--
Grant Edwards grante Yow! Hmmm... an arrogant
at bouquet with a subtle
visi.com suggestion of POLYVINYL
CHLORIDE...

Kevin T. Neely

unread,
Feb 14, 2008, 6:35:31 PM2/14/08
to
On 2008-02-02, Grant Edwards <gra...@visi.com> wrote:
>> It sure looks like the Gmail server is timing out connections
>> in less that 15 minutes:
>
> Gmail's imap server is definitely violating the spec and timing
> out somewhere at between 10-15 minutes. Setting the keepalive
> time to 5 minutes in muttrc solves the problem.


Thank you for taking the time to research this and continuing to post
your results. I have recently begun using mutt +Gmail with one of my
secondary accounts and encountered this issue. I've now set
imap_keepalive to 240. Hopefully that will solve my problem!

cheers,
K


--
In Vino Veritas
http://astroturfgarden.com

Grant Edwards

unread,
Feb 15, 2008, 12:09:09 PM2/15/08
to
On 2008-02-14, Kevin T. Neely <ktn...@astroturfgarden.com> wrote:

>> Gmail's imap server is definitely violating the spec and
>> timing out somewhere at between 10-15 minutes. Setting the
>> keepalive time to 5 minutes in muttrc solves the problem.
>
> Thank you for taking the time to research this and continuing
> to post your results. I have recently begun using mutt +Gmail
> with one of my secondary accounts and encountered this issue.
> I've now set imap_keepalive to 240. Hopefully that will solve
> my problem!

Other users have reported that testing indicates gmail's IMAP
server times out connections after 10 minutes. I filed a bug
report a couple weeks ago, but haven't gotten any response from
Google. I also can't figure out if there's any way to search
bug reports or check their status.

I haven't had any problems since setting mutts keepalive time
to 5 minutes.

It's awfully nice of all those web-mail users to subsidize a
free IMAP server for us by clicking on ads, eh?

--
Grant Edwards grante Yow! I want my nose in
at lights!
visi.com

Angel

unread,
Feb 23, 2008, 8:29:45 AM2/23/08
to
Grant Edwards <gra...@visi.com> wrote:
> Then it works just fine: the message is
> saved in "[Gmail]/Sent messages" and then handed off my my

(How) Is it possible to see the list of mail folders through mutt IMAP?
If it is not possible, how can one reach them?

--
Saludos,
Angel

O< ascii ribbon campaign - stop html mail and posts - www.asciiribbon.org

Grant Edwards

unread,
Feb 23, 2008, 8:40:52 AM2/23/08
to
On 2008-02-23, Angel <an...@hell.es> wrote:
> Grant Edwards <gra...@visi.com> wrote:
>> Then it works just fine: the message is
>> saved in "[Gmail]/Sent messages" and then handed off my my
>
> (How) Is it possible to see the list of mail folders through mutt IMAP?
> If it is not possible, how can one reach them?

I don't really see what that has to do with Gmail's timeout,
but yes you can get a list of folders:

Hit 'c', then '=', then hit tab two or three times.

--
Grant

0 new messages