Next you can download your email with ~offlineimap -o~. This may take a while,
especially if you have thousands of mails.
You can now proceed with the [[*mu and mu4e][mu and mu4e]] section.
** mbsync
The steps needed to set up =mu4e= with =mbsync= are very similar to the ones for
[[*offlineimap][offlineimap]].
Start with writing a ~\~/.mbsyncrc~. An example for GMAIL can be found on
[[http://pragmaticemacs.com/emacs/migrating-from-offlineimap-to-mbsync-for-mu4e/][pragmaticemacs.com]]. A non-GMAIL example is available as a gist [[https://gist.github.com/agraul/60977cc497c3aec44e10591f94f49ef0][here]]. The [[http://isync.sourceforge.net/mbsync.html][manual
page]] contains all needed information to set up your own.
Next you can download your email with ~mbsync --all~. This may take a while, but
should be quicker than =offlineimap= ;).
You can now proceed with the [[*mu and mu4e][mu and mu4e]] section.
** mu and mu4e
You should have your email downloaded already. If you have not, you need to set
=offlineimap= or =mbsync= up before you proceed.
Before you can use =mu4e= or the cli program =mu=, you need to index your email
initially. How to do that differs a little depending on the version of =mu= you
use. You can check your version with ~mu --version~.
For =mu=*>=1.4* you need to run two commands:
#+BEGIN_SRC sh
mu init --maildir ~/.mail --my-address email@example.com
Gentoo users will see this error because [[https://gitweb.gentoo.org/repo/gentoo.git/tree/net-mail/mu/files/70mu-gentoo.el#n2][the =net-mail/mu= package eagerly loads
=mu4e= (which pulls in =org=) much too early]]; before Emacs reads =~/.emacs.d=.
So early, that it loads the built-in version of org-mode, rather than the newer
version that Doom installs.
Later versions of the =net-mail/mu= package have [[https://gitweb.gentoo.org/repo/gentoo.git/commit/net-mail/mu?id=770e1fccb119fbce8ba6d16021a3598123f212ff][fixed this issue]], but you may
need to switch to the unstable build of =net-mail/mu= to see it.