Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

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

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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