From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Phillip Lord Newsgroups: gmane.emacs.help Subject: Re: emacs MUAs with working smtp authentication? Date: Thu, 31 Aug 2006 12:11:53 +0100 Organization: University of Newcastle upon Tyne Message-ID: References: <1156912134.588551.151490@m73g2000cwd.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1157024540 31922 80.91.229.2 (31 Aug 2006 11:42:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 31 Aug 2006 11:42:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 31 13:42:17 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GIkuC-0000Dw-Ho for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Aug 2006 13:40:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIkuC-0001mJ-2C for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Aug 2006 07:40:20 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!feeder.news-service.com!newsfeed.freenet.de!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!demorgan.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!feed4.jnfs.ja.net!feed3.jnfs.ja.net!jnfs.ja.net!news.ncl.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 90 Original-NNTP-Posting-Host: dinley.ncl.ac.uk Original-X-Trace: ucsnew1.ncl.ac.uk 1157022713 358 128.240.150.78 (31 Aug 2006 11:11:53 GMT) Original-X-Complaints-To: abuse@newcastle.ac.uk Original-NNTP-Posting-Date: Thu, 31 Aug 2006 11:11:53 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) Cancel-Lock: sha1:mRgb0/v11vFh5/s1+pxN0YCyYW8= Original-Xref: shelby.stanford.edu gnu.emacs.help:141457 Original-To: help-gnu-emacs@gnu.org 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:37078 Archived-At: >>>>> "Eli" == Eli Zaretskii writes: >> From: "Bill White" Date: 29 Aug 2006 >> 21:28:54 -0700 >> >> Are there any emacs-based MUAs that handle smtp authentication >> more or less "out of the box" with the setting of a few >> clearly-documented variables? If so, can you point me to the >> documentation? >> >> I'm using cvs emacs from this afternoon. Eli> I might misunderstand what you mean by ``smtp authentication'', Eli> but it seems to me that smtpmail.el is what you are looking Eli> for. Eli> If smtpmail doesn't fit the bill, please tell what's missing Eli> there. Eli I've been having the same problems. Quite a few people have been having problems with setting up smtpmail to use authentication and encryption. I think that part of the problem is the protocol, part the documentation, part of the problem is the lack of good defaults within the code. Finally, part of the difficulty is that, as far as I can tell, it just doesn't work on windows. First, the protocol. SMTP uses tls for encryption. smtpmail uses gnutls to support this. Why smtp can't use an SSL layer, as IMAP (and most other things) does I don't know. Still, there is little that can be done about this. No doubt there are reasons that I am unaware of -- network/mail protocols are something I know little about. Second, the defaults. To use TLS, you have to reconfigure things like the ports manually, and have to do so in multiple places. So, for example, from the smtpmail documentation..... ;;(setq send-mail-function 'smtpmail-send-it) ; if you use `mail' ;;(setq message-send-mail-function 'smtpmail-send-it) ; if you use message/Gnus ;;(setq smtpmail-default-smtp-server "YOUR SMTP HOST") ;;(setq smtpmail-local-domain "YOUR DOMAIN NAME") ;;(setq smtpmail-sendto-domain "YOUR DOMAIN NAME") ;;(setq smtpmail-debug-info t) ; only to debug problems ;;(setq smtpmail-auth-credentials ; or use ~/.authinfo ;; '(("YOUR SMTP HOST" 25 "username" "password"))) ;;(setq smtpmail-starttls-credentials ;; '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert"))) Now authentication mail often uses a different port. So you have to change this. But this is done in smtpmail-smtp-service. The 25's in auth-credentials are only used to determine which credentials should be used. Confusing. I don't know what the standards are, but most mail readers you just click "SSL/TLS encryption" and the ports get set, or guessed, automatically. Third, the documentation. Take... ;;(setq smtpmail-starttls-credentials ;; '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert"))) So, whats .my_smtp_tls.key then? Where does it come from? How do I get it? Can I use gnutls to generate it? I have no idea at all. Further investigation suggests that actually you can leave this blank, and it should still work. Finally, it doesn't seem to work on windows. I spent three hours with a debugger a couple of days ago -- I figured this was the only way to see if I had the configuration right. It appears that starttls.el uses Unix specific process handling, so won't work with NTEmacs. At the moment, I have access to a non TLS based stream, but this isn't going to last for ever. I suspect that many people are in the same boat. Cheers Phil