You are not logged in.

#1 2010-09-16 14:57:52

gammel.holte
Member
Registered: 2010-02-01
Posts: 53

Mutt (IMAP) freezes when Internet connection is lost

Hi all,

I'm currently using Mutt to read my mail, which is fetched using
offlineimap from Gmail. It works fine.

I'm trying to set up the same configuration on a small
netbook. Due to hard disk space constraints I prefer not to
download the mail. Instead I'm reading it directly from the
server using Mutt's own IMAP implementation.

However, this doesn't work very well. I get frequent freezes when
I loose my wireless Internet connection. Basically, Mutt becomes
completely unresponsive and I have to suspend and kill it.

You can reproduce this behaviour by simply shutting down the
Internet connection while Mutt is communicating with the IMAP
server. It waits indefinetely and pressing any key does not have
any effect.

I've tried setting different variables to avoid freezes without
any luck. Below you can have a look at my .muttrc file. Any
suggestion would be greatly appreciated. Thanks.

set realname = "Foo Bar"
set reverse_name = yes
set from = a@gmail.com
alternates a@gmail.com b@gmail.com

set imap_user = $from
set imap_pass = "foo"
set imap_keepalive = 300
set folder = imaps://imap.gmail.com/
set spoolfile = +INBOX
set postponed = +[Gmail]/Borradores

set smtp_url = smtp://a@smtp.gmail.com:587/
set smtp_pass = $imap_pass
set copy = no

set certificate_file = ~/.mutt/certificates
set header_cache = ~/.mutt/cache/headers
set message_cachedir = ~/.mutt/cache/bodies

set sort = threads
set sort_aux = reverse-last-date-received
set pager_index_lines = 6
set markers = no
set edit_headers = yes
set fast_reply = yes
set connect_timeout = 5
set delete = yes
set beep_new = yes
alternative_order text/plain text/html
auto_view text/html

Last edited by gammel.holte (2010-09-16 17:17:04)

Offline

#2 2010-09-16 15:59:43

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Mutt (IMAP) freezes when Internet connection is lost

I've always had this problem. Already accepted it ... But you are right, this shouldn't be.

Offline

#3 2010-09-16 18:56:38

codycarey
Member
Registered: 2009-08-21
Posts: 154

Re: Mutt (IMAP) freezes when Internet connection is lost

So mutt doesn't recover once your internet connection is reestablished?

Offline

#4 2010-09-16 19:20:12

gammel.holte
Member
Registered: 2010-02-01
Posts: 53

Re: Mutt (IMAP) freezes when Internet connection is lost

Well, it does, but it takes really long. Sometimes a few minutes.

I guess I'll have to stick to offlineimap + Mutt, which is very snappy but has the downside of downloading a lot of junk into my HD.

Offline

#5 2010-09-16 19:23:09

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Mutt (IMAP) freezes when Internet connection is lost

Maybe this is really a question for the devs of mutt!

Offline

#6 2010-09-16 19:48:48

gammel.holte
Member
Registered: 2010-02-01
Posts: 53

Re: Mutt (IMAP) freezes when Internet connection is lost

You're definitely right. I'll post a message on the dev mailing list / fill in a bug.

I asked here since I thought it was some kind of misconfiguration from my side.

Thanks!

Offline

#7 2010-09-16 19:59:49

codycarey
Member
Registered: 2009-08-21
Posts: 154

Re: Mutt (IMAP) freezes when Internet connection is lost

I've seen a few bug reports on other distributions with this same problem but it seems like most of the bug reporters never followed up so they were closed.

Offline

#8 2010-09-16 20:48:44

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: Mutt (IMAP) freezes when Internet connection is lost

I'd check the changelog of the latest version - 1.5.21. It may have been addressed in that. The current version in Arch is 1.5.20 so if it has, the upcoming upgrade will do it.
Apparently there were quite a lot of fixes in this latest version.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#9 2010-09-17 08:53:07

gammel.holte
Member
Registered: 2010-02-01
Posts: 53

Re: Mutt (IMAP) freezes when Internet connection is lost

That's right. I've gone through the whole changelog and there seem to be some IMAP-related fixes, although I'm not sure whether any of them addresses the issue. AFAIK, this one might remedy some of the freezes:

2010-08-12 16:04 -0700  Michael Elkins  <me@mutt.org>  (ced5d3dca974)

* imap/util.c: Fix bug in imap_keepalive() which erroneously free
    Context when the IMAP connection is shut down by the server.

I'll try to build 1.5.21 myself and check whether the bug is still there, before posting on Mutt devel.

An acceptable workaround is to use offlineimap, sync only the recent messages in the inbox and the all mail folders using the maxage option.

Offline

#10 2011-11-02 10:20:51

tuxjay
Member
Registered: 2010-01-10
Posts: 4

Re: Mutt (IMAP) freezes when Internet connection is lost

Mutt uses blocking IO.  This kind of design is unacceptable in modern software.

Unfortunately there are no decent mutt alternatives so we are stuck with this mess.

Offline

#11 2011-11-02 10:54:31

awayand
Member
Registered: 2009-09-25
Posts: 398

Re: Mutt (IMAP) freezes when Internet connection is lost

mutt would rock if it didn't have this issue and an offline feature in addition to the already existing caching feature. I got rid of mutt when I realized there was no solution to get rid of the 5 second delay when launching mutt because it insisted initiating a connection instead of just launching and letting me decide when to connect to IMAP... I would go back to mutt in a heartbeat, but I guess until this is getting fixed I am staying with firefox...

Offline

#12 2011-11-02 12:35:15

gammel.holte
Member
Registered: 2010-02-01
Posts: 53

Re: Mutt (IMAP) freezes when Internet connection is lost

awayand wrote:

mutt would rock if it didn't have this issue and an offline feature in addition to the already existing caching feature. I got rid of mutt when I realized there was no solution to get rid of the 5 second delay when launching mutt because it insisted initiating a connection instead of just launching and letting me decide when to connect to IMAP... I would go back to mutt in a heartbeat, but I guess until this is getting fixed I am staying with firefox...

I'm using offlineimap along with mutt to achieve roughly what you want and I couldn't be happier.

Besides, I'm also using notmuch (in AUR) to get super-fast Gmail-like search.

HTH,

Offline

#13 2011-11-02 13:01:03

awayand
Member
Registered: 2009-09-25
Posts: 398

Re: Mutt (IMAP) freezes when Internet connection is lost

thanks, gammel. I don't want to waste resources by copying every single email down to my local machine, plus having two apps for one purpose really is too clunky for me. I will check out notmuch though, looks interesting. smile

Offline

#14 2011-11-02 13:17:44

gammel.holte
Member
Registered: 2010-02-01
Posts: 53

Re: Mutt (IMAP) freezes when Internet connection is lost

awayand wrote:

thanks, gammel. I don't want to waste resources by copying every single email down to my local machine, plus having two apps for one purpose really is too clunky for me. I will check out notmuch though, looks interesting. smile

You're welcome. You won't be able to use notmuch without storing your mails locally, though.

offlineimap allows you to store locally only certain folders and/or mails of an specific age (e.g. latest 100 days).

Offline

#15 2011-11-02 15:18:46

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Mutt (IMAP) freezes when Internet connection is lost

IMHO, mutt was not designed to include serious networking support, like thunderbird. This is why I compile it off and
use fetchmail for imaps and msmtp for smpts.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

Board footer

Powered by FluxBB