Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Christoph Groth <christoph@grothesque.org>
To: info-gnus-english@gnu.org
Subject: Gnus stuck in nnimap-wait-for-response with local dovecot
Date: Fri, 03 Sep 2021 12:18:02 +0200	[thread overview]
Message-ID: <87h7f2dkth.fsf@drac> (raw)

[-- Attachment #1: Type: text/plain, Size: 2523 bytes --]

Hello,

I’m still using a mail setup that involves Gnus with nnimap and a local
dovecot that is run on demand.  I sync mail between the local maildir
(that is used by dovecot when it runs) and remote IMAP servers using
isync/mbsync.

I learned about this setup from Eric Abrahamsen on the ding mailing list
in the old days.  I believe that the original presentation of the idea
was this blog post:

https://web.archive.org/web/20160427162529/http://roland.entierement.nu/blog/2010/09/08/gnus-dovecot-offlineimap-search-a-howto.html

On the Gnus side, the setup is based on setting nnimap-shell-program to

"/usr/lib/dovecot/imap -o mail_location=maildir:$HOME/.mail/%s/ 2>>$HOME/.dovecot.err"

only that this happens inside a setup involving fancy splitting.  (This
way of using dovecot seems to be somewhat obscure, or at least
I haven’t been able to find much documentation about it.)

Anyway, my setup has been working like this for many years now, but
there’s a wart.  Whenever there is new mail and I launch M-x gnus, it
will typically freeze during startup and I have to abort with C-g and
retry.  After retrying one or two times Gnus does start and everything
seems to work normally.  The new mail is visible in Gnus.

Here is the kind of the backtrace that I can typically obtain in the
situation

Debugger entered: ("Quit")
  nnimap-wait-for-response(839)
  nnimap-get-groups()
  nnimap-split-incoming-mail()
  nnimap-request-scan(nil "cea")
  gnus-request-scan(nil (nnimap "xyz" (nnimap-stream shell) (nnimap-unsplittable-articles (%Deleted)) (nnimap-shell-program "/usr/lib/dovecot/imap -o mail_location=maildir:$HO...") (nnimap-split-methods (("blabla" "^list-id: .*<blabla\\.") ("mangled-own" my-mangled-own-p) ("\\1" "^Date: .* [a-z][a-z][a-z] +\\([12][0-9][0-9][0-9]\\)...") ("INBOX" ""))) (nnimap-inbox ("INBOX" "Sent Items"))))
  gnus-get-unread-articles(nil nil)
  gnus-setup-news(nil nil nil)
  #f(compiled-function () #<bytecode 0x15707aee41c5>)()
  gnus-1(nil nil nil)
  gnus(nil)
  funcall-interactively(gnus nil)
  call-interactively(gnus record nil)
  command-execute(gnus record)
  execute-extended-command(nil "gnus" "gnus")

Perhaps someone has an idea on how I could debug this further?  Or
perhaps there is a better setup to which I could switch?  Perhaps
I should consider
https://ericabrahamsen.net/tech/2014/oct/gnus-dovecot-lucene.html and do
away with notmuch and the hack that is needed to connect it to Gnus.

Cheers
Christoph

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 869 bytes --]

             reply	other threads:[~2021-09-03 10:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 10:18 Christoph Groth [this message]
2021-09-03 20:02 ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h7f2dkth.fsf@drac \
    --to=christoph@grothesque.org \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).