emacs-patch-review
Port of Thunderbird Patch Review to mu4e.
git clone git://mccd.space/emacs-patch-reviewcommit 583b50ae7226f59c9b55784c9c058baa106dbdd0
parent 9fc1d7718e55fd9b42df6480abcff7f43fa4c6cd
Author: Pi Agent <agent@pi.local>
Date: Mon, 3 Aug 2026 11:19:08 +0200
Add mbsync isync config for piva (Gmail) and fastmail accounts
Two channels synced into ~/Maildir/{gmail,fastmail}. Passwords come
from mail-auth's cache via PassCmd (with a passage fallback). Gmail
syncs all top-level folders plus [Gmail]/{Sent Mail,Drafts,Trash} while
leaving the duplicating [Gmail]/All Mail out; Fastmail syncs all
folders. Expunge Both, Create Both, SYNCSTATE *.
Diffstat:
| A | mail/mbsyncrc | | | 92 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 92 insertions(+), 0 deletions(-)
diff --git a/mail/mbsyncrc b/mail/mbsyncrc
@@ -0,0 +1,91 @@
+## mbsync (isync) configuration for two IMAP accounts.
+##
+## Install:
+## ln -s /srv/src/emacs-patch-review/mail/mbsyncrc ~/.mbsyncrc
+## mu init --maildir ~/Maildir # one-time
+##
+## Passwords are never written here. Each PassCmd reads a one-line file
+## cached on tmpfs ($XDG_RUNTIME_DIR/mbsync/<acct>.pass) by the
+## `mail-auth` helper (see README.org); if the cache is missing it falls
+## back to `passage show`, which will ask you to touch your passkey.
+##
+## Local Maildir layout:
+## ~/Maildir/gmail/... (marc.coquand@piva.earth, Gmail)
+## ~/Maildir/fastmail/... (marc@coquand.email, Fastmail)
+
+# ----------------------------------------------------------------------------
+# Global
+# ----------------------------------------------------------------------------
+# Do not round-trip through the journal for every message (fine on a laptop
+# with a single user); comment out if you want crash-consistent fsyncs.
+FSync no
+
+# System trust store. Adjust if your distro keeps it elsewhere.
+CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+# ============================================================================
+# Gmail — marc.coquand@piva.earth
+# ============================================================================
+IMAPAccount piva
+Host imap.gmail.com
+Port 993
+User marc.coquand@piva.earth
+PassCmd "f=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/mbsync/gmail.pass; [ -s $f ] && head -n1 $f || (passage show piva/gmail 2>/dev/null | head -n1)"
+SSLType IMAPS
+# Gmail app passwords only authenticate as LOGIN/PLAIN over TLS.
+AuthMechs LOGIN
+
+IMAPStore piva-remote
+Account piva
+
+MaildirStore piva-local
+Path ~/Maildir/gmail/
+Inbox ~/Maildir/gmail/INBOX
+# Keep Gmail's literal "/" hierarchy (so "[Gmail]/Sent Mail" nests).
+SubFolders Verbatim
+
+Channel piva
+Far :piva-remote:
+Near :piva-local:
+# Everything top-level (INBOX and any label folders Gmail exposes to IMAP),
+# minus the voluminous [Gmail]/* set, then re-add the three specials we want.
+# "[Gmail]/All Mail" is deliberately *not* synced (it duplicates everything
+# and bloats search with duplicate messages).
+Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Drafts" "[Gmail]/Trash"
+Create Both
+Expunge Both
+SyncState *
+
+# ============================================================================
+# Fastmail — marc@coquand.email (login marcc@fastmail.fr)
+# ============================================================================
+IMAPAccount fastmail
+Host imap.fastmail.com
+Port 993
+User marcc@fastmail.fr
+PassCmd "f=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/mbsync/fastmail.pass; [ -s $f ] && head -n1 $f || (passage show fastmail/marcc 2>/dev/null | head -n1)"
+SSLType IMAPS
+AuthMechs LOGIN
+
+IMAPStore fastmail-remote
+Account fastmail
+
+MaildirStore fastmail-local
+Path ~/Maildir/fastmail/
+Inbox ~/Maildir/fastmail/INBOX
+SubFolders Verbatim
+
+Channel fastmail
+Far :fastmail-remote:
+Near :fastmail-local:
+Patterns *
+Create Both
+Expunge Both
+SyncState *
+
+# ============================================================================
+# Groups
+# ============================================================================
+Group all
+Channel piva
+Channel fastmail
+\ No newline at end of file