Hi, I try to use $tunnel with $smtp_url, but can't manage to do it.
I don't trust my wifi Internet connection, so I want my mail to pass through a ssh tunnel to a server I own, before reaching the smtp server. ME ---(smtp inside ssh)---> my_server ---(smtp)---> smtp_server. I don't own smtp_server (in fact it is gmail). For incoming mail, I've added a plugin line in my fetchmailrc and it's perfect : poll imap.gmail.com with proto IMAP timeout 20 plugin "ssh my_server nc %h %p" user "me" there is ... So fetchmail launches ssh to my_server, then nc (netcat) remotely. nc connects to the imap server (%h:%p), sends what it gets on stdin and writes to its stdout what the imap server answers. I guess it goes back to fetchmail the same way, using ssh' stdin and stdout. I'm trying to do it for outgoing mail, and I want to use mutt (because $smtp_url depends on hooks, and I want to deal with it inside mutt). I've found the tunnel variable, but can't make it work as I'd like. « Setting this variable will cause mutt to open a pipe to a command instead of a raw socket. You may be able to use this to set up preauthenticated connections to your IMAP/POP3/SMTP server. Example: set tunnel="ssh -q mailhost.net /usr/local/libexec/imapd" » I can't use ssh to connect to the smtp server (since it's gmail). I have smtp_url=smtps://"m...@gmail.com"@smtp.gmail.com:465 and smtp_pass defined (works fine when connecting directly). I tried setting tunnel="ssh my_server nc smtp.gmail.com 465", but it doesn't work and I don't manage to find why. The only thing I can see is that a ssh connection is opened and data is sent. I also tried smtp instead of smtps, but it doesn't work either. How does $tunnel work? Is $smtp_url ignored when $tunnel is set?