I'm using mutt to access three different accounts via IMAP over an SSH
tunnel.  Because I have three separate accounts (on two different servers),
I'm using three different preconnect strings and three different ssh
tunnels.  Here's an example of one:

#tunnel over ssh
unset preconnect
set preconnect="ssh -f -C -q -L 1432:mail.myserver.com:143 \
mail.myserver.com sleep 5"

The other tunnels are on 1430 and 1431, in case that matters.  This works
great, for the most part.  However, when switching back and forth between
mailboxes (via a macro), I will get an error message in mutt saying,
"Connection to localhost closed".  I can switch back to the account from
which I just came, but I have to restart mutt to be able to get into any
other accounts.

When this problem occurs, if I suspend mutt and telnet to localhost:1432, I
get a response from the IMAP server, just like I'd expect, so the ssh
tunnel is still there and working fine.  Thus, I think this is a mutt
problem.  I've tried increasing the sleep 5 value, even though I doubt
that's the problem.  I'm not sure what else to try.

I cannot reliably reproduce this problem, but it seems to be related to
long periods of inactvity on an account.  However, I've left an account
for 45 minutes at a time, come back and accessed it just fine, while other
times, I can't access the account after 15 minutes of inactivity.  In each
and every case, however, when I've tried telnetting to the local tunnel
port, I've *always* received a response from the imap server.  

Any suggestions?

--kurt

Reply via email to