How to keep mutt alive

mutt.png

In many instances you will notice, over IMAP, that Mutt may just close your mailbox.

There is probably a firewall or NAT router between you and your server which drops connections that don’t get traffic frequently enough. Mutt by default will send keepalive traffic every 15 minutes, which is well within the IMAP specification (servers are required to hold connections open for 30 minutes).

Unfortunately some routers will drop you after as little as one minute. You can try adjusting $timeout (reducing this polls the current mailbox more often), $mail_check (this controls how frequently other mailboxes are polled), or $imap_keepalive (which controls how often keepalive messages are sent in non-interactive contexts, eg while composing email messages). Lower these until your router stops disconnecting you, but don’t make them so low that mutt starts to feel sluggish.

In my .muttrc file i have the following listed:

set imap_keepalive=300
set timeout=300

Related Posts

Comments are closed.