From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87836 Path: news.gmane.org!.POSTED!not-for-mail From: Vivishek Sudhir Newsgroups: gmane.emacs.gnus.general Subject: gnus nnimap intermittent login failure Date: Sat, 25 Nov 2017 16:11:46 -0500 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1511832684 2386 195.159.176.226 (28 Nov 2017 01:31:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Nov 2017 01:31:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) To: ding@gnus.org Original-X-From: ding-owner+m36050@lists.math.uh.edu Tue Nov 28 02:31:20 2017 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from mxfilter-048034.atla03.us.yomura.com ([107.189.48.34]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJUjz-0008Sp-0Z for ding-account@gmane.org; Tue, 28 Nov 2017 02:31:15 +0100 X-Yomura-MXScrub: 1.0 Original-Received: from lists1.math.uh.edu (unknown [129.7.128.208]) by mxfilter-048034.atla03.us.yomura.com (Halon) with ESMTPS id d57302fe-d3db-11e7-a8eb-b499baa2b07a; Tue, 28 Nov 2017 01:31:20 +0000 (UTC) Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.89) (envelope-from ) id 1eJUjB-0007Nq-91; Mon, 27 Nov 2017 19:30:25 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eIkgI-00023E-3s for ding@lists.math.uh.edu; Sat, 25 Nov 2017 18:20:22 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.89) (envelope-from ) id 1eIkgG-00068q-RG for ding@lists.math.uh.edu; Sat, 25 Nov 2017 18:20:21 -0600 Original-Received: from [195.159.176.226] (helo=blaine.gmane.org) by quimby.gnus.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1eIkgF-0000Py-GY for ding@gnus.org; Sun, 26 Nov 2017 01:20:19 +0100 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eIkg1-0002nk-I0 for ding@gnus.org; Sun, 26 Nov 2017 01:20:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 77 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:Z2mC4hPsimxtTfCmqL+bxFiEIaA= List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87836 Archived-At: 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 ):" 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.