From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Newsgroups: gmane.emacs.help Subject: Re: SMTP library problem Date: Fri, 07 Mar 2008 16:03:21 +0100 Message-ID: References: <954cc8bb0803041009pda5f74aq23323b1e9dc4e85b@mail.gmail.com> <87zltdwhl7.fsf@escher.local.home> <87tzjlvtzs.fsf@escher.local.home> <87r6eo1zht.fsf@escher.local.home> <87r6emtxts.fsf@escher.local.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204902264 24506 80.91.229.12 (7 Mar 2008 15:04:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Mar 2008 15:04:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 07 16:04:52 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JXe7p-00027l-2U for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Mar 2008 16:04:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXe7H-0002WL-8i for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Mar 2008 10:04:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXe6g-0002J7-KB for help-gnu-emacs@gnu.org; Fri, 07 Mar 2008 10:03:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXe6f-0002Hp-Hb for help-gnu-emacs@gnu.org; Fri, 07 Mar 2008 10:03:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXe6f-0002HH-6J for help-gnu-emacs@gnu.org; Fri, 07 Mar 2008 10:03:33 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JXe6e-0007L1-ET for help-gnu-emacs@gnu.org; Fri, 07 Mar 2008 10:03:32 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JXe6a-0007P1-5D for help-gnu-emacs@gnu.org; Fri, 07 Mar 2008 15:03:28 +0000 Original-Received: from kafka.physik3.gwdg.de ([134.76.92.48]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Mar 2008 15:03:28 +0000 Original-Received: from de_bb by kafka.physik3.gwdg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Mar 2008 15:03:28 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 45 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: kafka.physik3.gwdg.de User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:ftQfEeYemKExb271g2uz5GwwsdY= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:52128 Archived-At: Stephen Berman writes: >> swaks --auth --tls-on-connect -p 465 -s mail.myprovider.com > > Ah, thanks. That works. OK, then it's ssmtp. >> If the above swaks command works, you can use an external tool like >> stunnel to set up the SSL connection. If you have root on the machine, >> you can use stunnel like this >> >> stunnel -f -c -d localhost:2000 -r mail.myprovider.com:465 >> >> You should then be able to send mails through your localhost on port >> 2000. Note that the '-f' option lets stunnel run in the foreground for >> testing purposes. If it works, you can omit this option and let stunnel >> run as daemon. > > I don't have root access to the machine that hosts the mail server, or > do you mean the machine I use to send mail via the server? The latter. > If the latter, how would I make Gnus aware of the tunnel? Just point smptmail.el to your localhost on port 2000 (or whatever you're writing in the above stunnel command). > I instrumented smtpmail.el for Edebug and stepped through the code as I > tried to send a mail. The "freeze" occurred in smtpmail-read-response > at the call to accept-process-output, which is from the Emacs C code. I > assume this means gnutls is not providing the server what it needs, so > it just waits until it hits the timeout, but I don't know how to proceed > to find out what is going wrong. smptmail.el waits for the server greeting, which doesn't happen since the server waits for you to initiate the TLS connection first (which you can do using stunnel). It shouldn't be too difficult to adapt smtpmail.el to deal with this, but AFAIK ssmtp simply isn't standardized and every good mail provider should support SMTP+STARTTLS on the standard port. -David