I read gmail via IMAP with the mutt MUA. If I leave mutt open and idle for several minutes, then the program becomes unresponsive to keyboard input, requiring me to kill the process. I am not certain whether the issue is IMAP timeout or something else. I have changed pertinent IMAP settings to values that should preclude IMAP timeout. Relevant settings from my .muttrc configuration file:

unset imap_passive
set imap_keepalive = 120
set timeout = 30
set mail_check = 60

How can I troubleshoot the keyboard unresponsiveness especially with regard to determining whether it is attributable to loss of the IMAP connection. Thanks.


Check your logs for anything interesting, e.g. /var/log/messages or /var/log/mail.log.

You could also open up a separate SSH session or console and attach an strace to the mutt process once you've started it. Locate the pid with ps aux | grep mutt in your other session/console, and do

strace -p pid

You should be able to get an idea of what mutt is hanging/crashing on, or at least a new trail to follow for troubleshooting. You may also want add the -f switch to strace to follow the child processes if it forks. Let me know what you find...

  • Thanks for the suggestions. The messages log is filled with the message Calling CRDA to update world regulatory domain every ~3 minutes, which is unexpected because I thought I had disabled wireless (it must have turned itself back on after a reboot). I suppose this could relate to an IMAP timeout, although I had a simultaneous active Ethernet connection throughout. All the mail.* logs are empty. Thanks for suggesting strace, as I wasn't aware of this tool. I will let you know if there are any interesting system call errors. Thanks again.
    – user001
    Aug 1 '12 at 6:55
  • PS: Is it a bad idea to leave mutt running on my computer and then later ssh into my computer from another terminal and launch another instance of mutt for temporary use?
    – user001
    Aug 1 '12 at 7:30
  • @user001 If you run mutt inside a screen or tmux process, you can just attach to the running process.
    – user28446
    Dec 7 '12 at 14:13

It may be the network going down and up, particularly wireless. Mutt uses blocking IO which is an old design and is not likely to be fix anytime soon. See: https://bbs.archlinux.org/viewtopic.php?id=105030.

The issue is likely to be resolved by offlineimap + mutt setup.


It's most likely related to bug 2540 in which Mutt crashes after an IMAP timeout.

There are several other IMAP related crash tickets that have been closed for the 1.6 release. Hopefully it will be released soon as I am facing the same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.