I want to be able to send email through an ssh tunnel using mutt. I can ssh into the smtp server, but I don't know how to tell mutt how to do this...

Can someone help me out? Thanks

link|improve this question

65% accept rate
feedback

1 Answer

up vote 2 down vote accepted

Using remote SMTP is described here: http://wiki.mutt.org/?MuttFaq/Sendmail
So with the tunnel you'd set up your SMTP to localhost, but with the tunnel port. Eg. you create tunnel 8025->25 on remote:

ssh -L8025:smtp.example.com:25 serv.example.com

And in Mutt configuration (.muttrc) you put:

set smtp_url="smtp://username@localhost:8025/"

BTW. Using remote POP/IMAP here: http://wiki.mutt.org/?MuttFaq/RemoteFolder

link|improve this answer
good advice. I was wrong though, I didn't even need an SSH tunnel, just TLS. – devin May 11 '09 at 20:05
oh, you should have asked ;-) I've though that you're doing poor man's VPN ;-) – vartec May 11 '09 at 20:46
feedback

Your Answer

 
or
required, but never shown

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