Skip to content

Instantly share code, notes, and snippets.

@unhammer
Last active December 4, 2022 06:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unhammer/96e1fcd3befea2dd5c43e821c4fe309d to your computer and use it in GitHub Desktop.
Save unhammer/96e1fcd3befea2dd5c43e821c4fe309d to your computer and use it in GitHub Desktop.
isync + dovecot + gnus with Fastmail
IMAPAccount fastmail
Host imaps:mail.messagingengine.com
User me@fastmail.com
# you may have to tweak the awk here + filename to your netrc/authinfo:
PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d $HOME/.netrc.gpg | awk '$2==\"mail.messagingengine.com\" && $4==\"me@fastmail.com\" {print $6;exit(0)}'"
Port 992
# Port 992 has a "flat" hierarchy; use with
# mail_location = maildir:~/.Maildir/:LAYOUT=fs:INBOX=~/.Maildir/INBOX
# in dovecot (see also MaildirStore.Inbox below)
IMAPStore fastmail-remote
Account fastmail
MaildirStore fastmail-local
# The trailing "/" is meaningful
Path ~/.Maildir/
Inbox ~/.Maildir/INBOX
Channel fastmail
Master :fastmail-remote:
Slave :fastmail-local:
Patterns *
Create Slave
Sync All
Expunge Both
SyncState *
# install dovecot with "sudo apt-get install dovecot-imapd" on Debian/Ubuntu
# On Debian/Ubuntu, the file is /etc/dovecot/conf.d/10-mail.conf , on Arch it is /etc/dovecot/dovecot.conf
# keep the config as-is, except for adding this line:
mail_location = maildir:~/.Maildir/:LAYOUT=fs:INBOX=~/.Maildir/INBOX
# (it is possible to use nnmaildir in gnus and avoid dovecot, but it seems a lot slower and actually requires more setup)
;; .gnus
(add-to-list 'gnus-secondary-select-methods
'(nnimap "fmmbsync"
(nnimap-address "localhost") ; shouldn't matter?
(nnimap-stream shell)))
(setq imap-shell-program "MAIL=maildir:$HOME/.Maildir /usr/lib/dovecot/imap")
Copy link

ghost commented Dec 4, 2022

@unhammer it shows error: nnimap not running

  • running debian bullseye+xfce on userland (1)

  • added: $ which dovecot output: /usr/sbin/dovecot
    to "session & startup" in xfce settings.

  • installed isync from bullseye-backports and
    dovecot-imapd from debian bullseye.

  • i did comment & uncomment out passcmd on
    mbsync.rc, but it has no effect.

  • see screenshots:

https://commons.wikimedia.org/wiki/File:Gnus-error-2.png
https://commons.wikimedia.org/wiki/File:Gnus-error-1.png

(1) https://github.com/CypherpunkArmory/UserLAnd

regards,
jindam, vani

Copy link

ghost commented Dec 4, 2022

You should open the server buffer with ^, select your server, then type O to reconnect to it. {nnimap:fmmbsync}: (denied)
unable to open server nnimap+fmmbsync due to: process *nnimap* not running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment