* gnus nnimap intermittent login failure
@ 2017-11-25 21:11 Vivishek Sudhir
2017-11-28 12:56 ` Byung-Hee HWANG (황병희, 黃炳熙)
0 siblings, 1 reply; 5+ messages in thread
From: Vivishek Sudhir @ 2017-11-25 21:11 UTC (permalink / raw)
To: ding
Hi,
I've been using gnus to fetch/reply-to emails on my gmail via gnus'
in-built nniamp backend. The minimal working configuration (in my init.el) is as follows:
(use-package gnus
:config
(require 'nnir) ; for searching through imap
(require 'epa-file) ; to be able to code/decode gpg files in emacs
(epa-file-enable)
(setq epa-pinentry-mode 'loopback
epa-file-cache-passphrase-for-symmetric-encryption t)
(require 'auth-source) ; setup gpg file access
(setq auth-sources '((:source "./authinfo.gpg"))) ; this is where to find the login details
; set gmail as the primary source of incoming mail
(setq gnus-select-method
'(nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnir-search-engine imap)
)
; ensure gnus doesnt ignore gmail folders
gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\”]\”[#’()]"
; mark all sent messages as read
gnus-gcc-mark-as-read t
)
; configure sending email via gmail smtp, with starttls encryption
(setq message-send-mail-function 'smtpmail-send-it
smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
smtpmail-auth-credentials '(("smtp.gmail.com" 587 "myemail@gmail.com" nil))
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
starttls-use-gnutls t)
; cache emails
(setq message-directory "~/gmail"
gnus-use-cache t
gnus-cache-directory "~/gmail/cache"
gnus-cache-enter-articles '(ticked dormant read unread)
gnus-cache-remove-articles nil
gnus-cacheable-groups "^nnimap"
gnus-keep-backlog 200
)
; set gnus parameters
(setq gnus-parameters
'((".*"
(gnus-use-scoring nil)
(expiry-wait . 2)
(display . all)
)))
; retrieve 100 newest messages from all groups by default
; (setq gnus-parameter-large-newsgroup-initial-alist ((".*" . 100)))
(setq gnus-large-newsgroup 100)
)
There is also some buffer formatting settings I've omitted in the above.
Essentially, the file authinfo.gpg contains my login credentials for
gmail's imap and smtp servers, which is read by gnus to log in to fetch/reply-to emails.
The problem is that *sometimes* when I start gnus, things work
perfectly; but about 3 out of 5 times, it would get stuck and show
something like "IMAP user at gmail (default <myemail>):" on the
minibuffer, and if I do RET, it would ask for my password. It seems that
on these occasions, gnus doesn't read the authinfo.gpg file, and falls
back to asking me for the login credentials.
Why is this happening, and how can this be solved?
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus nnimap intermittent login failure
2017-11-25 21:11 gnus nnimap intermittent login failure Vivishek Sudhir
@ 2017-11-28 12:56 ` Byung-Hee HWANG (황병희, 黃炳熙)
2017-11-28 13:51 ` Robert Pluim
2017-11-28 15:03 ` Adam Sjøgren
0 siblings, 2 replies; 5+ messages in thread
From: Byung-Hee HWANG (황병희, 黃炳熙) @ 2017-11-28 12:56 UTC (permalink / raw)
To: The Gnus
In Article <m28teu3vxp.fsf@gmail.com>,
Vivishek Sudhir <vivishek.sudhir@gmail.com> writes:
> [...sorry for snip...]
> (setq auth-sources '((:source "./authinfo.gpg"))) ; this is where to find the login details
It's odd, "./authinfo.gpg" <-- What is it?
Sincerely, Byung-Hee.
--
^고맙습니다 _救濟蒼生_ 감사합니다_^))//
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus nnimap intermittent login failure
2017-11-28 12:56 ` Byung-Hee HWANG (황병희, 黃炳熙)
@ 2017-11-28 13:51 ` Robert Pluim
2017-11-29 21:38 ` Vivishek Sudhir
2017-11-28 15:03 ` Adam Sjøgren
1 sibling, 1 reply; 5+ messages in thread
From: Robert Pluim @ 2017-11-28 13:51 UTC (permalink / raw)
To: Byung-Hee HWANG "(황병희,
黃炳熙)"
Cc: The Gnus, Vivishek Sudhir
soyeomul@doraji.xyz (Byung-Hee HWANG "(황병희, 黃炳熙)") writes:
> In Article <m28teu3vxp.fsf@gmail.com>,
> Vivishek Sudhir <vivishek.sudhir@gmail.com> writes:
>
>> [...sorry for snip...]
>> (setq auth-sources '((:source "./authinfo.gpg"))) ; this is where to find the login details
>
> It's odd, "./authinfo.gpg" <-- What is it?
True. My auth-sources entries are all fully qualified
filenames. Looking through the auth-sources library, it uses
'file-exists-p', which will do filename expansion. Without a '~' in
the filename it will default to looking in the current directory. The
documentation also says:
If you have problems with the search, set ‘auth-source-debug’ to
‘'trivia’ and see what host, port, and user the library is
checking in the ‘*Messages*’ buffer. Ditto for any other
problems, your first step is always to see what’s being checked.
The second step, of course, is to write a blog entry about it and
wait for the answer in the comments.
Regards
Robert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus nnimap intermittent login failure
2017-11-28 13:51 ` Robert Pluim
@ 2017-11-29 21:38 ` Vivishek Sudhir
0 siblings, 0 replies; 5+ messages in thread
From: Vivishek Sudhir @ 2017-11-29 21:38 UTC (permalink / raw)
To: ding
In fact, the diagnosis by Byung-Hee and Adam are spot on!
Gnus had not problem when it was started from a buffer containing a file
in the same directory as authinfo.gpg, and not otherwise.
Having used full paths for authinfo.gpg, things work now.
All this came from the fact that my init file was tangled from an org
file; and the authinfo was in the same directory as the latter.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus nnimap intermittent login failure
2017-11-28 12:56 ` Byung-Hee HWANG (황병희, 黃炳熙)
2017-11-28 13:51 ` Robert Pluim
@ 2017-11-28 15:03 ` Adam Sjøgren
1 sibling, 0 replies; 5+ messages in thread
From: Adam Sjøgren @ 2017-11-28 15:03 UTC (permalink / raw)
To: ding
Byung-Hee writes:
> In Article <m28teu3vxp.fsf@gmail.com>,
> Vivishek Sudhir <vivishek.sudhir@gmail.com> writes:
>
>> [...sorry for snip...]
>> (setq auth-sources '((:source "./authinfo.gpg"))) ; this is where to find the login details
>
> It's odd, "./authinfo.gpg" <-- What is it?
Well spotted!
I would bet that the problem happens when Vivishek starts Emacs from
another directory than where his authinfo.gpg file is, and it works when
he starts Emacs from that dir.
Best regards,
Adam
--
"Det er Thomas Treo, han kan _kun_ lide Sort Sol." Adam Sjøgren
asjo@koldfront.dk
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-29 21:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-25 21:11 gnus nnimap intermittent login failure Vivishek Sudhir
2017-11-28 12:56 ` Byung-Hee HWANG (황병희, 黃炳熙)
2017-11-28 13:51 ` Robert Pluim
2017-11-29 21:38 ` Vivishek Sudhir
2017-11-28 15:03 ` Adam Sjøgren
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).