[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Two problems with gnus
From: |
Simon Josefsson |
Subject: |
Re: Two problems with gnus |
Date: |
Sat, 21 Aug 2004 13:59:39 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
"Tang Yan" <tang.yan@gmail.com> writes:
> 64 UID SEARCH UID 81
> * SEARCH
> 64 OK UID SEARCH completed
> 65 UID FETCH 81 (UID RFC822.SIZE BODY BODY.PEEK[HEADER.FIELDS (Subject
>>From Date Message-Id References In-Reply-To Xref)])
The server appear to be broken, if UID 81 exists, a search for 'UID
SEARCH UID 81' should return 81. Do you know which server this is?
> (setq gnus-select-method '(nnimap "imap.bar.org"
> (nnimap-server-port 143)
> (nnimap-authenticator login)
> (nnimap-stream network)
> (nnimap-authinfo-file (expand-file-name
> "~/.authinfo"))
> ))
> ----------------------------------------
>
> And in "~/.authinfo" I wrote:
> ---------------------------------
> machine imap.bar.org login foo password !@#%$
> ---------------------------------
> But when I start gnus I get an error: "error stringp nil..."
> OK, so I guess somewrong with the new line I added
> (nnimap-authinfo...),
> so I rewrote it like this:
> (nnimap-authinfo-file "~/.authinfo")
> Well, this time it works, but why?
Because you are quoting the expression, not evaluating it. Try:
(setq gnus-select-method `(nnimap "imap.bar.org"
(nnimap-server-port 143)
(nnimap-authenticator login)
(nnimap-stream network)
(nnimap-authinfo-file ,(expand-file-name
"~/.authinfo"))))
But I believe it would be more reliable to use the value you use now.
Nnimap invoke expand-file-name on the file name internally.
> What's the worse, I still have to input the user&password pair.
> Then I read almost all the manual of gnus but no explanation.
> At last I found a trick in google: add "port 143" in .authinfo file:
> -----------------------------------
> machine imap.bar.org login foo password !@#%$ port 143
> -------------------------------------
> And this time, I don't need to input the pair. But all the examples in
> manual just say machine, login, password.
The manual has been fixed, there are now examples for nnimap too:
`nnimap-authinfo-file'
A file containing credentials used to log in on servers. The
format is (almost) the same as the `ftp' `~/.netrc' file. See the
variable `nntp-authinfo-file' for exact syntax; also see *Note
NNTP::. An example of an .authinfo line for an IMAP server, is:
machine students.uio.no login larsi password geheimnis port imap
Note that it should be `port imap', or `port 143', if you use a
`nnimap-stream' of `tls' or `ssl', even if the actual port number
used is port 993 for secured imap.