[Mutt] #3237: Documentation issue: tunnel affects IMAP and SMTP; suggest account-hook
#3237: Documentation issue: tunnel affects IMAP and SMTP; suggest account-hook
------------------------------+---------------------------------------------
Reporter: antonio@xxxxxxxx | Owner: mutt-dev
Type: defect | Status: new
Priority: minor | Milestone:
Component: mutt | Version:
Keywords: |
------------------------------+---------------------------------------------
Forwarding from http://bugs.debian.org/504530
{{{
I use 'set tunnel="ssh somewhere /my/imap/server"' to connect to IMAP
via SSH. This works great for IMAP, but it seems to prevent me from
using mutt to send mail via SMTP. I have
smtp_url=smtps://username@server/ , but when I tried to send mail mutt
opened the SSH tunnel and then printed an error message which started
with "SMTP session failed: * PREAUTH [CAPABILITY IMAP4rev1 ...". That
strongly suggests that mutt attempted to use the SSH tunnel to my IMAP
server for SMTP, which won't work.
If mutt's "set tunnel" intentionally affects both IMAP and SMTP, I
don't see how that can possibly work (without some strange IMAP/SMTP
multiplexer), and it seems inconsistent with every piece of
documentation I've seen.
}}}
This documentation update is proposed:
{{{
Turns out that tunnel intentionally affects all connection types,
including IMAP and SMTP. Brendan Cully explained to me how the
account-hook mechanism allows setting things like tunnel on a
per-connection basis, which worked perfectly (thanks Brendan!).
I'd suggest adding a note about this to the documentation for "tunnel"
in the muttrc manpage:
"""
Mutt uses the tunnel for all connections it makes, including SMTP, IMAP,
and POP3. If you want to use a different tunnel for different
connections, use account-hook to set or unset tunnel for each
connection.
"""
A "for example" couldn't hurt. Feel free to use something like the
configuration I ended up with:
account-hook . 'unset tunnel'
account-hook ^imaps://user@server/ 'set tunnel="ssh -q server dovecot
--exec-mail imap"'
}}}
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3237>
Mutt <http://www.mutt.org/>
The Mutt mail user agent