mu4e and mbsync / isync

[Josh Wheeler]


Tags: emacs

Problem: Using mbsync with mu4e produces a Duplicate UID error.

To prevent duplicate UIDs, set mu4e-change-filenames-when-moving to t.

(setq mu4e-change-filenames-when-moving t)

Add to emacs init (/.emacs, or ~/.emacs.d/init.el) for persistence.

An explanation from the documentation (C-h v mu4e-change-filenames-when-moving RET) further points out that the default nil value works better with offlineimap but a non-nil value works better for mbsync.

When moving messages to different folders, normally mu/mu4e keep
the base filename the same (the flags-part of the filename may
change still). With this option set to non-nil, mu4e instead
changes the filename. This latter behavior works better with some
IMAP-synchronization programs such as mbsync; the default works
better with e.g. offlineimap.