From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jonathan Groll Newsgroups: gmane.emacs.help Subject: Re: SMTP with SOCKS proxy? Date: Thu, 31 Jul 2014 10:53:42 +0200 Message-ID: <87egx1rjs9.wl%lists@groll.co.za> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1406796918 19031 80.91.229.3 (31 Jul 2014 08:55:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Jul 2014 08:55:18 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 31 10:55:08 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XCm8g-00005Z-TT for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Jul 2014 10:55:07 +0200 Original-Received: from localhost ([::1]:55034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCm8g-0001IY-Ik for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Jul 2014 04:55:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCm8N-0001EG-3o for help-gnu-emacs@gnu.org; Thu, 31 Jul 2014 04:54:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCm8I-0000vY-Pm for help-gnu-emacs@gnu.org; Thu, 31 Jul 2014 04:54:47 -0400 Original-Received: from mail.groll.co.za ([166.84.7.40]:51052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCm8I-0000tf-MA for help-gnu-emacs@gnu.org; Thu, 31 Jul 2014 04:54:42 -0400 Original-Received: from mail.groll.co.za.groll.co.za (unknown [IPv6:::1]) by mail.groll.co.za (Postfix) with ESMTP id DFCCE5FE0A for ; Thu, 31 Jul 2014 10:53:42 +0200 (SAST) In-Reply-To: User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 166.84.7.40 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99016 Archived-At: On Wed, 30 Jul 2014 11:38:55 +0200, Alan Schmitt wrote: > [1 ] > On 2014-07-30 03:51, Leon Baum writes: > > > I use the mu4e mail reader with the native emacs SMTP library. I would > > like to configure SMTP to use a SOCKS proxy so that I can send my email > > with tor. I don't see any configuration options in the documentation. Is > > this not possible? > > I'm also very interested in this. I tried several approaches to have > emacs network connexion use a SOCKS proxy, and both failed. > > What I tried: > > 1. From within emacs > > #+begin_src emacs-lisp > (setq socks-override-functions 1) > (setq socks-noproxy '("localhost")) > (require 'socks) > #+end_src > > (source: http://www.emacswiki.org/emacs/ErcProxy) > > Trying to open a server using erc-tls then failed, because of an extra > argument ":tls" in the open-network function call. > > 2. From outside emacs > > I started emacs with torsocks. Unfortunately launching gnus failed > because I was not able to decrypt authinfo.gpg. > > I would prefer a solution from inside emacs (solution 1) but I don't > know if it's possible. > Two good possibilities from outside Emacs that I have used are: - proxychains - see http://proxychains.sourceforge.net/ You'll first have to start a proxychains shell or subshell where all connections in that shell are routed through the SOCKS proxy. Then launch Emacs from that shell. - tun2socks - see https://code.google.com/p/badvpn/wiki/tun2socks I'm really fond of this one, but it is more tricky to install than proxychains. "tun2socks is used to "socksify" TCP (IPv4 and IPv6) connections at the network layer. It implements a TUN virtual network interface which accepts all incoming TCP connections (regardless of destination IP), and forwards them through a SOCKS server." Disclaimer: never used either of them for SMTP specifically , but can't see why it won't work. Cheers, Jonathan -- jjg: Jonathan J. Groll : groll co za has_one { :blog => "http://bloggroll.com" } Any other Disclaimer in this mail is Wrong.