info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Elisp: get pop3 password from .authinfo


From: Hadron Quark
Subject: Re: Elisp: get pop3 password from .authinfo
Date: Wed, 08 Nov 2006 14:02:14 +0100

Sebastian Schubert <sebastian-schubert@gmx.de> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]