unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Uday S Reddy <uday.s.reddy@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>, 11037@debbugs.gnu.org
Subject: bug#11037: 24.0.94; gnutls-cli.exe program not found
Date: Sat, 17 Mar 2012 20:14:38 +0000	[thread overview]
Message-ID: <20324.61614.373000.866203@gargle.gargle.HOWL> (raw)
In-Reply-To: <83ipi32j7l.fsf@gnu.org>

The error trace isn't all that helpful, because I think the error message is
getting constructed from somewhere deeper using property lists.  In any
case, here it is:

Debugger entered--Lisp error: (error "Sending failed: Emacs does not support TLS, and no external `gnutls-cli' program was found")
  signal(error ("Sending failed: Emacs does not support TLS, and no external `gnutls-cli' program was found"))
  error("Sending failed: %s" "Emacs does not support TLS, and no external `gnutls-cli' program was found")
  (progn (error "Sending failed: %s" result))
  (if (setq result (smtpmail-via-smtp smtpmail-recipient-address-list tembuf)) (progn (error "Sending failed: %s" result)))
  (when (setq result (smtpmail-via-smtp smtpmail-recipient-address-list tembuf)) (error "Sending failed: %s" result))
  (if (not (null smtpmail-recipient-address-list)) (when (setq result (smtpmail-via-smtp smtpmail-recipient-address-list tembuf)) (error "Sending failed: %s" result)) (error "Sending failed; no recipients"))
  (if (not smtpmail-queue-mail) (if (not (null smtpmail-recipient-address-list)) (when (setq result (smtpmail-via-smtp smtpmail-recipient-address-list tembuf)) (error "Sending failed: %s" result)) (error "Sending failed; no recipients")) (let* ((file-data (expand-file-name (format "%s_%i" (format-time-string "%Y-%m-%d_%H:%M:%S") (setq smtpmail-queue-counter (1+ smtpmail-queue-counter))) smtpmail-queue-dir)) (file-data (convert-standard-filename file-data)) (file-elisp (concat file-data ".el")) (buffer-data (create-file-buffer file-data)) (buffer-elisp (create-file-buffer file-elisp)) (buffer-scratch "*queue-mail*")) (unless (file-exists-p smtpmail-queue-dir) (make-directory smtpmail-queue-dir t)) (with-current-buffer buffer-data (erase-buffer) (set-buffer-file-coding-system (coding-system-change-eol-conversion (or smtpmail-code-conv-from (quote undecided)) (quote unix)) nil t) (insert-buffer-substring tembuf) (write-file file-data) (set-buffer buffer-elisp) (erase-buffer) (insert (concat "(setq smtpmail-recipient-address-list '" (prin1-to-string smtpmail-recipient-address-list) ")\n")) (write-file file-elisp) (set-buffer (generate-new-buffer buffer-scratch)) (insert (concat file-data "\n")) (append-to-file (point-min) (point-max) (expand-file-name smtpmail-queue-index-file smtpmail-queue-dir))) (kill-buffer buffer-scratch) (kill-buffer buffer-data) (kill-buffer buffer-elisp)))
  (save-current-buffer (set-buffer tembuf) (erase-buffer) (set-buffer-file-coding-system smtpmail-code-conv-from nil t) (insert-buffer-substring mailbuf) (goto-char (point-max)) (or (= (preceding-char) 10) (insert 10)) (mail-sendmail-undelimit-header) (setq delimline (point-marker)) (if mail-aliases (expand-mail-aliases (point-min) delimline)) (goto-char (point-min)) (while (and (re-search-forward "\n\n\n*" delimline t) (< (point) delimline)) (replace-match "\n")) (let ((case-fold-search t)) (goto-char (point-min)) (if (re-search-forward "^Subject:\\([ 	]*\n\\)+\\b" delimline t) (replace-match "") (if (and (re-search-forward "^Subject:\\([ 	]*\n\\)+" delimline t) (= (match-end 0) delimline)) (replace-match ""))) (goto-char (point-min)) (if (not (re-search-forward "^From:" delimline t)) (let* ((login smtpmail-mail-address) (fullname (user-full-name))) (cond ((eq mail-from-style (quote angles)) (insert "From: " fullname) (let (... ...) (goto-char fullname-start) (if ... ...)) (insert " <" login ">\n")) ((eq mail-from-style (quote parens)) (insert "From: " login " (") (let (...) (insert fullname) (let ... ... ... ... ...)) (insert ")\n")) ((null mail-from-style) (insert "From: " login "\n"))))) (goto-char (point-min)) (unless (re-search-forward "^Message-Id:" delimline t) (insert "Message-Id: " (message-make-message-id) "\n")) (goto-char (point-min)) (unless (re-search-forward "^Date:" delimline t) (insert "Date: " (message-make-date) "\n")) (let (charset) (goto-char (point-min)) (and (eq mail-send-nonascii (quote mime)) (not (re-search-forward "^MIME-version:" delimline t)) (progn (skip-chars-forward "
  (with-current-buffer tembuf (erase-buffer) (set-buffer-file-coding-system smtpmail-code-conv-from nil t) (insert-buffer-substring mailbuf) (goto-char (point-max)) (or (= (preceding-char) 10) (insert 10)) (mail-sendmail-undelimit-header) (setq delimline (point-marker)) (if mail-aliases (expand-mail-aliases (point-min) delimline)) (goto-char (point-min)) (while (and (re-search-forward "\n\n\n*" delimline t) (< (point) delimline)) (replace-match "\n")) (let ((case-fold-search t)) (goto-char (point-min)) (if (re-search-forward "^Subject:\\([ 	]*\n\\)+\\b" delimline t) (replace-match "") (if (and (re-search-forward "^Subject:\\([ 	]*\n\\)+" delimline t) (= (match-end 0) delimline)) (replace-match ""))) (goto-char (point-min)) (if (not (re-search-forward "^From:" delimline t)) (let* ((login smtpmail-mail-address) (fullname (user-full-name))) (cond ((eq mail-from-style (quote angles)) (insert "From: " fullname) (let (... ...) (goto-char fullname-start) (if ... ...)) (insert " <" login ">\n")) ((eq mail-from-style (quote parens)) (insert "From: " login " (") (let (...) (insert fullname) (let ... ... ... ... ...)) (insert ")\n")) ((null mail-from-style) (insert "From: " login "\n"))))) (goto-char (point-min)) (unless (re-search-forward "^Message-Id:" delimline t) (insert "Message-Id: " (message-make-message-id) "\n")) (goto-char (point-min)) (unless (re-search-forward "^Date:" delimline t) (insert "Date: " (message-make-date) "\n")) (let (charset) (goto-char (point-min)) (and (eq mail-send-nonascii (quote mime)) (not (re-search-forward "^MIME-version:" delimline t)) (progn (skip-chars-forward "
  (unwind-protect (with-current-buffer tembuf (erase-buffer) (set-buffer-file-coding-system smtpmail-code-conv-from nil t) (insert-buffer-substring mailbuf) (goto-char (point-max)) (or (= (preceding-char) 10) (insert 10)) (mail-sendmail-undelimit-header) (setq delimline (point-marker)) (if mail-aliases (expand-mail-aliases (point-min) delimline)) (goto-char (point-min)) (while (and (re-search-forward "\n\n\n*" delimline t) (< (point) delimline)) (replace-match "\n")) (let ((case-fold-search t)) (goto-char (point-min)) (if (re-search-forward "^Subject:\\([ 	]*\n\\)+\\b" delimline t) (replace-match "") (if (and (re-search-forward "^Subject:\\([ 	]*\n\\)+" delimline t) (= (match-end 0) delimline)) (replace-match ""))) (goto-char (point-min)) (if (not (re-search-forward "^From:" delimline t)) (let* ((login smtpmail-mail-address) (fullname (user-full-name))) (cond ((eq mail-from-style ...) (insert "From: " fullname) (let ... ... ...) (insert " <" login ">\n")) ((eq mail-from-style ...) (insert "From: " login " (") (let ... ... ...) (insert ")\n")) ((null mail-from-style) (insert "From: " login "\n"))))) (goto-char (point-min)) (unless (re-search-forward "^Message-Id:" delimline t) (insert "Message-Id: " (message-make-message-id) "\n")) (goto-char (point-min)) (unless (re-search-forward "^Date:" delimline t) (insert "Date: " (message-make-date) "\n")) (let (charset) (goto-char (point-min)) (and (eq mail-send-nonascii (quote mime)) (not (re-search-forward "^MIME-version:" delimline t)) (progn (skip-chars-forward "
  (let ((errbuf (if mail-interactive (generate-new-buffer " smtpmail errors") 0)) (tembuf (generate-new-buffer " smtpmail temp")) (case-fold-search nil) delimline result (mailbuf (current-buffer)) (smtpmail-mail-address (or (and mail-specify-envelope-from (mail-envelope-from)) (smtpmail-user-mail-address) (let ((from (mail-fetch-field "from"))) (and from (cadr (mail-extract-address-components from)))))) (smtpmail-code-conv-from (if enable-multibyte-characters (let ((sendmail-coding-system smtpmail-code-conv-from)) (select-message-coding-system))))) (unwind-protect (with-current-buffer tembuf (erase-buffer) (set-buffer-file-coding-system smtpmail-code-conv-from nil t) (insert-buffer-substring mailbuf) (goto-char (point-max)) (or (= (preceding-char) 10) (insert 10)) (mail-sendmail-undelimit-header) (setq delimline (point-marker)) (if mail-aliases (expand-mail-aliases (point-min) delimline)) (goto-char (point-min)) (while (and (re-search-forward "\n\n\n*" delimline t) (< (point) delimline)) (replace-match "\n")) (let ((case-fold-search t)) (goto-char (point-min)) (if (re-search-forward "^Subject:\\([ 	]*\n\\)+\\b" delimline t) (replace-match "") (if (and (re-search-forward "^Subject:\\([ 	]*\n\\)+" delimline t) (= ... delimline)) (replace-match ""))) (goto-char (point-min)) (if (not (re-search-forward "^From:" delimline t)) (let* ((login smtpmail-mail-address) (fullname ...)) (cond (... ... ... ...) (... ... ... ...) (... ...)))) (goto-char (point-min)) (unless (re-search-forward "^Message-Id:" delimline t) (insert "Message-Id: " (message-make-message-id) "\n")) (goto-char (point-min)) (unless (re-search-forward "^Date:" delimline t) (insert "Date: " (message-make-date) "\n")) (let (charset) (goto-char (point-min)) (and (eq mail-send-nonascii (quote mime)) (not (re-search-forward "^MIME-version:" delimline t)) (progn (skip-chars-forward "
  smtpmail-send-it()
  mail-send()
  vm-mail-send()
  vm-mail-send-and-exit(nil)
  call-interactively(vm-mail-send-and-exit nil nil)

You would probably need to reproduce the error to figure out where the
message is coming from.  The way to reproduce it is:

- to make sure that Emacs isn't able to use GnuTLS
- set smtpmail-stream-type to 'starttls
- invoke smtpmail on some message asking for starttls (I use smtp.gmail.com
on port 587).

On |Emacs 23.3, this would hang, because starttls.el would try SIGALRM which
Windows doesn't respond to.

But, on Emacs 24.0.94, it is coming back and giving an error message.  They
seem to, but the current behaviour was unexpected.

> Why is that needed?  Emacs supports linking against GnuTLS now,
> including on Windows (see below).  Can you use the built-in GnuTLS
> support instead of starttls?

I probably could.  But my interest is first in checking what Emacs is able
to deliver, because we end up having to spend enormous amounts of time in
answering queries from VM users about how to configure various things for
email servers.  The users who have been using starttls.el with Emacs23 will
assume that it will continue to work because the NEWS file says:

    **** smtpmail now uses encrypted connections (via STARTTLS) by default
    if the mail server supports them.  This uses either built-in GnuTLS
    support, or the starttls.el library.  Customize `smtpmail-stream-type'
    to change this.

Please feel free to get rid of starttls.el from here.  I wouldn't object.

> As you see, your Emacs was built with GnuTLS support, you just need
> the binaries and DLLs to be able to use that.  One place you can find
> them is here
> 
>   http://sourceforge.net/projects/ezwinports/files/gnutls-3.0.9-w32-bin.zip/download

Thanks.  I will try these binaries.

Cheers,
Uday

  reply	other threads:[~2012-03-17 20:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-17 17:24 bug#11037: 24.0.94; gnutls-cli.exe program not found Uday S Reddy
2012-03-17 18:09 ` Eli Zaretskii
2012-03-17 20:14   ` Uday S Reddy [this message]
2012-03-27  0:11     ` Glenn Morris
2012-03-17 21:31   ` Uday S Reddy
2012-03-18  3:48     ` Eli Zaretskii
2012-03-22 18:33 ` Lars Magne Ingebrigtsen
2012-03-22 20:16   ` Eli Zaretskii
2012-03-22 20:45     ` Uday S Reddy
2012-03-23  8:01       ` Eli Zaretskii
2012-03-23  8:18         ` Uday S Reddy
2012-03-23  8:33           ` Eli Zaretskii
2012-03-23 12:30           ` Stefan Monnier
2012-03-22 21:05     ` Lars Magne Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20324.61614.373000.866203@gargle.gargle.HOWL \
    --to=uday.s.reddy@gmail.com \
    --cc=11037@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=u.s.reddy@cs.bham.ac.uk \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).