[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: smtpmail believes starttls is not needed
From: |
Katsumi Yamaoka |
Subject: |
Re: smtpmail believes starttls is not needed |
Date: |
Fri, 26 Oct 2007 20:43:22 +0900 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) |
>>>>> François Puitg wrote:
> Seems there's a bug in smtpmail.el : smtpmail-open-stream believes
> that starttls is not needed, though smtpmail-starttls-credentials is
> set in my init file:
I posted a reply to your message to the gnu.emacs.bug newsgroup
as attached below. But I don't know why `smtpmail-open-stream'
uses `with-no-warnings'. In Emacs, this is provided in byte-run.el
for the run-time use and is also provided in bytecomp.el as a
compiler macro. Both are quite simple. My doubt is why smtpmail
doesn't simply use `progn'.
-------------------- Start of forwarded message --------------------
Subject: Re: smtpmail believes starttls is not needed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Date: Fri, 26 Oct 2007 20:16:46 +0900
Message-ID: <mailman.2588.1193397420.18990.bug-gnu-emacs@gnu.org>
References: <mailman.2587.1193394072.18990.bug-gnu-emacs@gnu.org>
Newsgroups: gnu.emacs.bug
>>>>> François Puitg wrote:
> If I comment the suspected lines in smtpmail-open-stream as shown
> below, the authentification takes place and everything works as
> expected (I'm not greylisted any more) :
> (defun smtpmail-open-stream (process-buffer host port)
> (let ((cred (smtpmail-find-credentials
> smtpmail-starttls-credentials host port)))
> ; (if (null (and cred (condition-case ()
> ; (with-no-warnings
> (require 'starttls)
> ; (call-process (if starttls-use-gnutls
> ; starttls-gnutls-program
> ; starttls-program)))
> ; (error nil))))
> ; ;; The normal case.
> ; (progn
> ; (insert-string "open-network-stream\n" mondebug)
> ; (open-network-stream "SMTP" process-buffer host port))
You use XEmacs 21.4.20, right? I believe the real cause of your
problem is there is not the `with-no-warnings' function. How
about adding the following?
;; Extracted from byte-run.el in GNU Emacs.
(defun with-no-warnings (&rest body)
"Like `progn', but prevents compiler warnings in the body."
;; The implementation for the interpreter is basically trivial.
(car (last body)))
;; The byte compiler version of this function is similar to:
;;
;;(defmacro with-no-warnings (&rest body)
;; (cons 'progn body))
;;
;; See bytecomp.el.
I think what should be suspected is the usage of `with-no-warnings'
in smtpmail.el.
Regards,
-------------------- End of forwarded message --------------------