From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Gardella Newsgroups: gmane.emacs.help Subject: Re: smtpmail/starttls starts connection but never sends Date: Tue, 13 Nov 2012 22:01:28 -0500 Organization: Aioe.org NNTP Server Message-ID: <874nksanw7.fsf@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1352862314 5602 80.91.229.3 (14 Nov 2012 03:05:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Nov 2012 03:05:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 14 04:05:25 2012 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 1TYTI3-0005IH-Pe for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Nov 2012 04:05:23 +0100 Original-Received: from localhost ([::1]:49193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYTHt-0001z1-Up for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Nov 2012 22:05:13 -0500 Original-Path: usenet.stanford.edu!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 66 Original-NNTP-Posting-Host: sypdE5dyfWYz8sfAApD9Aw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:2+O5m5Ghiskw+efYZl6FYHuah80= Original-Xref: usenet.stanford.edu gnu.emacs.help:195358 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:87681 Archived-At: Hello Joost, Joost Kremers writes: > Hi all, > > I'm running Emacs 24.2 on OS X Lion (more precisely, I'm using the > emacs-mac-port from ) and > using it for email with mu4e. The other day, I ran into a problem with > sending mail, in that I can't anymore... > > The emacs-mac-port is compiled without tls, so it uses the external > gnutls program for establishing tls connections, which worked fine, > until Homebrew upgraded gnutls. The problem is that gnutls-cli stopped > accepting certificates that cannot be verified. As a result, the > connection would be dropped and Emacs would tell me that no smtpmail > process was running. (Note: mu4e uses message-mode for composing and > smtpmail for sending email, so this issue shouldn't be mu4e-specific). > > After some googling, I found that one way to get around this *should* be > to establish a connection manually once with the --tofu option, accept > the certificate when asked to, and then add the --tofu option to > starttls-extra-arguments, as explained in a post to gnu.emacs.gnus: > . I wonder if you've tried playing around with the `tls-checktrust' variable. If you (setq tls-checktrust 'ask), you should be able to manually accept untrusted SSL/TLS keys by responding to a dialog in Emacs. Along with setting `tls-checktrust' to ask, you can set `tls-program' to have a command line that will allow you to call gnutls-cli with your own private list of certificates. For me here in Debian GNU/Linux, the following is a working TLS configuration that checks certs but also lets me use invalid/self-signed ones when I wish: (setq tls-checktrust 'ask tls-program '("gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h" "gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h --protocols ssl3" "openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2 -ign_eof")) Maybe this will help you if gnutls --insecure is no longer working. > In my case, this doesn't entirely work, however. Although the connection > appears to be established, nothing is actually sent. I get the following > message in the minibuffer: > > Opening STARTTLS connection to `mailer.gwdg.de:25'...done > > and that's where it stays. Emacs is locked, the message buffer remains > open and active and nothing happens. I have to hit C-g to get control > back. > > Anyone know what might be going on, or how I could debug this further? > > TIA If the above doesn't work, you can use strace or dtrace to see where in the TLS-calling process Emacs hangs. You can also try writing out an `open-network-stream' function call of your Emacs trying to talk to your mail server and stepping through it with (edebug-defun). HTH, WGG -- I use grml (http://grml.org/)