From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44301 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: smtpmail-auth-credentials from authinfo Date: Fri, 19 Apr 2002 17:33:43 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1019233755 17813 127.0.0.1 (19 Apr 2002 16:29:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 19 Apr 2002 16:29:15 +0000 (UTC) Cc: scranefield@infoscience.otago.ac.nz Return-path: Original-Received: from hermes.netfonds.no ([195.204.10.138]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16ybAn-0003l7-02 for ; Fri, 19 Apr 2002 18:23:45 +0200 Original-Received: from malifon.math.uh.edu (malifon.math.uh.edu [129.7.128.13]) by hermes.netfonds.no (8.10.1/8.9.3) with ESMTP id g3JFd5f30497 for ; Fri, 19 Apr 2002 17:39:05 +0200 (CEST) Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16yaT5-0004Bw-00; Fri, 19 Apr 2002 10:38:35 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 19 Apr 2002 10:38:47 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id KAA04289 for ; Fri, 19 Apr 2002 10:38:33 -0500 (CDT) Original-Received: (qmail 24081 invoked by alias); 19 Apr 2002 15:38:07 -0000 Original-Received: (qmail 24076 invoked from network); 19 Apr 2002 15:38:06 -0000 Original-Received: from waldorf.cs.uni-dortmund.de (129.217.4.42) by gnus.org with SMTP; 19 Apr 2002 15:38:06 -0000 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id g3JFXnb25949; Fri, 19 Apr 2002 17:33:49 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id RAA15496; Fri, 19 Apr 2002 17:33:43 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id B4FE93B390; Fri, 19 Apr 2002 17:33:43 +0200 (CEST) Original-To: ding In-Reply-To: (Ted Zlatanov's message of "Fri, 19 Apr 2002 10:21:29 -0400") Original-Lines: 32 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44301 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44301 Ted Zlatanov writes: > I had to write this for my own authentication (so I could share my > .gnus.el). I didn't want my smtpmail-auth-credentials to be in the > clear, and it seemed like a better idea to do it through authinfo. I use something similar for POP retrieval, but my code is quite a bit shorter... (defun ls6-pop-passwd-from-authinfo () "Get POP password from ~/.authinfo file. Example line: machine pop password verysecret" (require 'nntp) (let* ((x (gnus-parse-netrc nntp-authinfo-file)) (item (gnus-netrc-machine x "pop")) (pw (gnus-netrc-get item "password"))) pw)) But this code does something else. It appears that you would want to do gnus-parse-netrc and walk the resulting list to look that the port is "smtp" or 25, and then you would add a corresponding entry to the smtpmail-auth-credentials. Or maybe smtpmail could be changed to grok stuff that comes from gnus-parse-netrc? That would be cool. It seems that Simon's suggestion of factoring out a library for ~/.authinfo handling seems to be the way to go. kai -- Silence is foo!