The email fun in Emacs continues. After a few weeks since I started using mu4e and offlineimap, I'm sold. Both are awesome. Mbsync is an offlineimap alternative. Despite resyncing all my mail, the transition was fairly smooth. Here's how…
brew install isync
Mbsync uses ~/.mbsyncrc
for configuration. Migrating ~/.offlineimaprc to ~/.mbsyncrc
looks like:
IMAPAccount Personal
Host some.imap.host.com
User your_user_name
PassCmd "gpg --quiet --batch -d ~/.offlineimap_accountname.gpg"
Port 993
SSLType IMAPS
AuthMechs Login
CertificateFile ~/.offlineimapcerts.pem
# My IMAP provider doesn't handle concurrent IMAP commands.
PipelineDepth 1
IMAPStore Personal-remote
Account Personal
MaildirStore Personal-local
Path ~/IMAP/Personal/
Inbox ~/IMAP/Personal/INBOX
Channel Personal
Master :Personal-remote:
Slave :Personal-local:
Patterns *
Create Slave
Sync All
Expunge Both
SyncState *
My IMAP provider doesn't handle concurrent IMAP commands. mbsync and Office 365 had the answer:
PipelineDepth 1
Run initial from the command line sync:
mbsync -Va
While syncing my largest inbox, it sometimes received an unexpected EOF error:
IMAP error: unexpected EOF from some.imap.host.com (1.2.3.4:993)
First few times, I restarted the syncing manually, but then used a loop to automatically restart it.
Bash loops:
while true; do mbsync -V Personal; sleep 5; done
for i in {1..5}; do mbsync -V Personal; sleep 5; done
Eshell loop:
for i in (number-sequence 1 10) {mbsync -V Personal; sleep 5}
Reindex using mu, but first remove existing index for offlineimap messages:
rm -rf ~/.mu
Ok, do index now:
mu index --maildir=~/IMAP
The get mail command should now point to mbsync.
(csetq mu4e-get-mail-command "mbsync -Va")
I had issues with duplicate IDs after moving and deleting messages from mu4e. Migrating from offlineimap to mbsync for mu4e had the answer:
(csetq mu4e-change-filenames-when-moving t)