all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: William Gardella <gardellawg@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: smtpmail/starttls starts connection but never sends
Date: Tue, 13 Nov 2012 22:01:28 -0500	[thread overview]
Message-ID: <874nksanw7.fsf@gmail.com> (raw)
In-Reply-To: slrnka5bf7.enq.joostkremers@j.kremers4.news.arnhem.chello.nl

Hello Joost,

Joost Kremers <joostkremers@yahoo.com> writes:

> Hi all,
>
> I'm running Emacs 24.2 on OS X Lion (more precisely, I'm using the
> emacs-mac-port from <https://github.com/railwaycat/emacs-mac-port>) 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:
> <mailman.471.1333501703.20052.info-gnus-english@gnu.org>.

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/)


  reply	other threads:[~2012-11-14  3:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-13 20:30 smtpmail/starttls starts connection but never sends Joost Kremers
2012-11-14  3:01 ` William Gardella [this message]
2012-11-14 20:42   ` Joost Kremers
2012-11-14 23:26     ` Peter Dyballa
     [not found]     ` <mailman.12998.1352935577.855.help-gnu-emacs@gnu.org>
2012-11-16  8:14       ` Joost Kremers
2012-11-16  9:21         ` Peter Dyballa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874nksanw7.fsf@gmail.com \
    --to=gardellawg@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.