From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.devel,gmane.emacs.bugs Subject: Re: smtpmail believes starttls is not needed Date: Fri, 26 Oct 2007 20:43:22 +0900 Organization: Emacsen advocacy group Message-ID: References: <18209.43812.217617.480295@gargle.gargle.HOWL> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1193399032 12840 80.91.229.12 (26 Oct 2007 11:43:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Oct 2007 11:43:52 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, emacs-devel@gnu.org To: =?iso-8859-1?Q?Fran=E7ois?= Puitg Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 26 13:43:52 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IlNbT-0001QX-Qs for ged-emacs-devel@m.gmane.org; Fri, 26 Oct 2007 13:43:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlNbL-0006MO-1X for ged-emacs-devel@m.gmane.org; Fri, 26 Oct 2007 07:43:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IlNbF-0006Jh-VO for emacs-devel@gnu.org; Fri, 26 Oct 2007 07:43:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IlNbE-0006HF-7Y for emacs-devel@gnu.org; Fri, 26 Oct 2007 07:43:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlNbE-0006Gu-3a; Fri, 26 Oct 2007 07:43:36 -0400 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IlNbD-0002A1-9H; Fri, 26 Oct 2007 07:43:35 -0400 Original-Received: from [66.225.201.151] (port=47553 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.68) (envelope-from ) id 1IlNb9-0003Ti-8G; Fri, 26 Oct 2007 06:43:31 -0500 X-Hashcash: 1:20:071026:francois.puitg@imag.fr::6ZUyX575fQt6T3Qy:000000000000000000000000000000000000000A0C0 X-Hashcash: 1:20:071026:bug-gnu-emacs@gnu.org::2Wge7+3erwwgFjem:000000000000000000000000000000000000000033sF X-Hashcash: 1:20:071026:emacs-devel@gnu.org::oLN9TUB1eYYGfk7P:0000000000000000000000000000000000000000000wHS X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:vS4irseF1RM0xz3Gajds89/+OgQ= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81770 gmane.emacs.bugs:16840 Archived-At: >>>>> Fran=E7ois 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 Date: Fri, 26 Oct 2007 20:16:46 +0900 Message-ID: References: Newsgroups: gnu.emacs.bug >>>>> Fran=E7ois 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 --------------------