Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* How to use `~/.authfile' for POP account
@ 2005-08-09 17:24 Yuan MEI
  2005-08-10  7:01 ` Frank Schmitt
  0 siblings, 1 reply; 3+ messages in thread
From: Yuan MEI @ 2005-08-09 17:24 UTC (permalink / raw)


My solution is
(defun passwd-from-authinfo (machine)
  (let* ((x (gnus-parse-netrc "~/.authinfo"))
         (y (gnus-netrc-machine x machine))
         (z (gnus-netrc-get y "password")))
    z))
and
(pop :server "foo.com" :user "bar"
         :password (passwd-from-authinfo "foo.com"))

Is there any ``Official'' solution to this?  Since smtp and imap could
utilize `.authfile' directly.
-- 
Yuan MEI


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to use `~/.authfile' for POP account
  2005-08-09 17:24 How to use `~/.authfile' for POP account Yuan MEI
@ 2005-08-10  7:01 ` Frank Schmitt
  2005-08-15 14:52   ` Yuan MEI
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Schmitt @ 2005-08-10  7:01 UTC (permalink / raw)


"Yuan MEI" <yuan.mei@gmail.com> writes:

> My solution is
> (defun passwd-from-authinfo (machine)
>   (let* ((x (gnus-parse-netrc "~/.authinfo"))
>          (y (gnus-netrc-machine x machine))
>          (z (gnus-netrc-get y "password")))
>     z))
> and
> (pop :server "foo.com" :user "bar"
>          :password (passwd-from-authinfo "foo.com"))
>
> Is there any ``Official'' solution to this?  Since smtp and imap could
> utilize `.authfile' directly.

You should use ~/.authinfo (for all protocols).
Write something like this in it:
machine pop.isp.com login ymei password f.h637Fj

-- 
Did you ever realize how much text fits in eighty columns? If you now consider
that a signature usually consists of up to four lines, this gives you enough
space to spread a tremendous amount of information with your messages. So seize
this opportunity and don't waste your signature with bullshit nobody will read.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to use `~/.authfile' for POP account
  2005-08-10  7:01 ` Frank Schmitt
@ 2005-08-15 14:52   ` Yuan MEI
  0 siblings, 0 replies; 3+ messages in thread
From: Yuan MEI @ 2005-08-15 14:52 UTC (permalink / raw)


I think you missed the point.  I know how to write a valid
`.authinfo'.  The problem is, 
for `imap',
(nnimap-authinfo-file "~/.authinfo") works,
for `smtp',
(setq smtpmail-auth-credentials "~/.authinfo") works,
however, for pop, I don't know which already-written function is
available, so I write that one to process it.

Frank Schmitt <usereplyto2005@frank-schmitt.net> writes:

> You should use ~/.authinfo (for all protocols).
> Write something like this in it:
> machine pop.isp.com login ymei password f.h637Fj

-- 
Yuan MEI


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-08-15 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-09 17:24 How to use `~/.authfile' for POP account Yuan MEI
2005-08-10  7:01 ` Frank Schmitt
2005-08-15 14:52   ` Yuan MEI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).