From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/8173 Path: news.gmane.org!not-for-mail From: Hadron Quark Newsgroups: gmane.emacs.gnus.user Subject: Re: Elisp: get pop3 password from .authinfo Date: Wed, 08 Nov 2006 14:02:14 +0100 Message-ID: <87slgu5bxl.fsf@gmail.com> References: <87psbyw5do.fsf@Satux.Puorg> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1162993237 12681 80.91.229.2 (8 Nov 2006 13:40:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Nov 2006 13:40:37 +0000 (UTC) Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Wed Nov 08 14:40:36 2006 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GhnfE-0000Gh-DZ for gegu-info-gnus-english@m.gmane.org; Wed, 08 Nov 2006 14:40:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GhnfD-0005kO-Ty for gegu-info-gnus-english@m.gmane.org; Wed, 08 Nov 2006 08:40:23 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 44 Original-X-Trace: individual.net F/1auQg08VCPwwyLiGvw6ATOt5Aq4RX/eflwARRDq3o4QHe38p X-Orig-Path: news.ibm.net!news X-Face: 2h#||Cd#d%F*NCm59[_6/{1a@jy%; |j>{D~4^gKg(^i%7j0IK?+,/GmW&:CD5fEKb_! Cancel-Lock: sha1:37tbPUGIQRthNNBeDvpI0MihNH4= Original-Xref: shelby.stanford.edu gnu.emacs.gnus:78358 Original-To: info-gnus-english@gnu.org X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:8173 Archived-At: Sebastian Schubert writes: > Hallo, > > I want to get the pop3 password from the .authinfo file to have all > password together. I found a function to do it: > http://groups.google.de/group/de.comm.software.gnus/msg/d3e772d5f684ce68?hl=de& > > ,---- > | (setq mail-sources `(... (pop :server "foo" :user "bar" > | :passwd ,(pw-from-authinfo)) ...)) > | > | (defun pw-from-authinfo () > | (require 'nntp) > | (let* ((x (gnus-parse-netrc nntp-authinfo-file)) > | (item (gnus-netrc-machine x "pop")) > | (pw (gnus-netrc-get item "password"))) > | pw)) > `---- > > > I need an additional argument for the server, so I changed the function > to: > > ,---- > | (defun pw-from-authinfo (popserver) > | (require 'nntp) > | (let* ((x (gnus-parse-netrc nntp-authinfo-file)) > | (item (gnus-netrc-machine x popserver)) > | (pw (gnus-netrc-get item "password"))) > | pw)) > `---- > > and use > > :passwd ,(pw-from-authinfo("my.server.org")) > > That does not work. Why? Because of the let? What is correct? Can I use > the server string I added in the mail-sources? I look forward to seeing the solution to this : I ended up "require"ing an external file with the smtp specifics for my outgoing email in order to keep passwords hidden should I ever publish my .gnus or sections of to help someone.