From: Garjola Dindi <garjola@garjola.net>
To: info-gnus-english@gnu.org
Subject: Re: Configuration example for mbsync + dovecot + Gnus
Date: Sun, 31 Jan 2021 11:56:30 +0100 [thread overview]
Message-ID: <87ft2h5q8x.fsf@pc-117-162.ovh.com> (raw)
In-Reply-To: <875z3k50ow.fsf@ericabrahamsen.net>
On Mon 25-Jan-2021 at 19:30:23 +01, Eric Abrahamsen
<eric@ericabrahamsen.net> wrote:
> Garjola Dindi <garjola@garjola.net> writes:
>
>> On Mon 25-Jan-2021 at 17:31:14 +01, Eric Abrahamsen
>> <eric@ericabrahamsen.net> wrote:
>>> Garjola Dindi <garjola@garjola.net> writes:
>>>
>>>> Hi,
>>>>
>>>> I would like to move from a nnmaildir + OfflineIMAP configuration to
>>>> something which:
>>>>
>>>> 1. scales better for large number of messages than nnmaildir and
>>>> 2. does not use OfflineIMAP (Python 2 based and sometimes slow).
>>>>
>>>> I understand that some Gnus users use a local IMAP server with dovecot
>>>> and the nnimap backend.
>>>>
>>>> I found these interesting instructions here:
>>>>
>>>> https://ericabrahamsen.net/tech/2014/oct/gnus-dovecot-lucene.html
>>>
>>> I'm still using this setup! You didn't say what was going wrong, but
>>> here's a sample config block for one of my IMAP accounts:
>>
>> Thanks for your answer!
>>
[...]
Hi,
Thanks to Eric Abrahamsen and Jeffrey DeLeo for their help. I finally
managed configuring dovecot + mbsync + gnus to my liking.
Actually, the original post from Eric just needed a couple of tweaks to
work. As pointed out before, in the mbsync config, I had to change this
,----
| UseIMAPS no
| UseTLSV1 no
`----
to this
,----
| SSLType IMAPS
| SSLVersions TLSv1.2
`----
and also add the port
,----
| Port 993
`----
For the local dovecot, I had to add this
,----
| AuthMechs LOGIN
`----
Since my email provider uses Microsoft Exchange (or Outlook or Office365
or whatever they call it these days), I had to add a couple of options
to go around bugs in their server. These are documented in [1] and [2].
FWIW, my final mbsync config looks like this:
#+begin_src conf :tangle mbsync/.mbsyncrc :mkdirp yes
IMAPAccount garjola
Host imap.domain.net
Port 993
User login@domain.net
PassCmd "emacsclient -e \"(my/lookup-password :host
\\\"imap.domain.net\\\" :user \\\"login@domain.net\\\")\" | cut -d '\"'
-f2"
SSLType IMAPS
SSLVersions TLSv1.2
CertificateFile /etc/ssl/certs/ca-certificates.crt
PipelineDepth 1
Timeout 120
IMAPStore garjola-remote
Account garjola
IMAPAccount garjola-dovecot
Host localhost
User login@domain.net
Pass passwurd # local password I don't care much about
SSLType None
AuthMechs LOGIN
IMAPStore garjola-local
Account garjola-dovecot
Channel garjola
Master :garjola-remote:
Slave :garjola-local:
Patterns *
Create Both
Expunge Both
Remove Both
#+end_src
The configuration of dovecot (dovecot.conf and passwd) don't need any
change. And nor does the .gnus part.
To look up the imap password, I use this (stolen from [3]):
#+begin_src emacs-lisp
(defun my/lookup-password (&rest keys)
"Lookup a password using auth-source"
(let ((result (apply #'auth-source-search keys)))
(if result
(funcall (plist-get (car result) :secret))
nil)))
#+end_src
Cheers,
Garjola
[1] https://kdecherf.com/blog/2017/05/01/mbsync-and-office-365/
[2] https://www.chrislockard.net/posts/o365-mail-emacs-mbsync-mu4e/
[3] https://github.com/daviwil/emacs-from-scratch/blob/master/
show-notes/Emacs-Tips-Pass.org
--
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english
next prev parent reply other threads:[~2021-01-31 10:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 11:01 Garjola Dindi
2021-01-25 16:31 ` Eric Abrahamsen
2021-01-25 18:11 ` Garjola Dindi
2021-01-25 18:30 ` Eric Abrahamsen
2021-01-31 10:56 ` Garjola Dindi [this message]
2021-01-25 21:01 ` Jeffrey DeLeo
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=87ft2h5q8x.fsf@pc-117-162.ovh.com \
--to=garjola@garjola.net \
--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).