doomemacs/modules/email/mu4e
2020-04-08 15:30:10 -04:00
..
autoload Use featurep! in mu4e/autoload/email.el 2019-12-08 23:42:46 +01:00
config.el Remove unused variables 2020-03-24 14:48:00 +01:00
packages.el Fix #2627: remove mu4e-maildirs-extension 2020-02-29 11:14:02 -05:00
README.org Minor refactor & reformatting across the board 2020-04-08 15:30:10 -04:00

email/mu4e

Description

This module makes Emacs an email client, using mu4e.

I want to live in Emacs, but as we all know, living is incomplete without email. So I prayed to the text editor gods and they (I) answered. Emacs+evil's editing combined with org-mode for writing emails? Yes please.

It uses mu4e to read my email, but depends on offlineimap (to sync my email via IMAP) and mu (to index my mail into a format mu4e can understand).

Module Flags

  • +gmail Enables gmail-specific configuration.

Prerequisites

This module requires:

  • Either mbsync (default) or offlineimap (to sync mail with)
  • mu (to index your downloaded messages)

MacOS

brew install mu
# And one of the following
brew install isync  # mbsync
brew install offlineimap

Arch Linux

Run one of the following commands.

sudo pacman -S isync  # mbsync
# OR
sudo pacman -S offlineimap

Install mu, which is not available in the main repositories but in the AUR, by using for example the AUR helper yay.

yay -S mu

NixOS

environment.systemPackages = with pkgs; [
    mu
    # And one of the following
    isync
    offlineimap
];

An example of setting up mbsync with home-manager

openSUSE

Remove # in #sync_program=offlineimap to choose offlineimap instead of mbsync.

sync_program=isync # mbsync
#sync_program=offlineimap

sudo zypper install maildir-utils $sync_programm

TODO Features

Configuration

offlineimap

This module uses mbsync by default. To change this, change +mu4e-backend:

(setq +mu4e-backend 'offlineimap)

Then you must set up offlineimap and index your mail:

  1. Write a \~/.offlineimaprc. Mine can be found in my dotfiles repository. It is configured to download mail to \~/.mail. I use unix pass to securely store my login credentials.
  2. Download your email: offlineimap -o (may take a while)
  3. Index it with mu: mu index --maildir ~/.mail

Then configure Emacs to use your email address:

;; Each path is relative to `+mu4e-mu4e-mail-path', which is ~/.mail by default
(set-email-account! "Lissner.net"
  '((mu4e-sent-folder       . "/Lissner.net/Sent Mail")
    (mu4e-drafts-folder     . "/Lissner.net/Drafts")
    (mu4e-trash-folder      . "/Lissner.net/Trash")
    (mu4e-refile-folder     . "/Lissner.net/All Mail")
    (smtpmail-smtp-user     . "henrik@lissner.net")
    (user-mail-address      . "henrik@lissner.net")
    (mu4e-compose-signature . "---\nHenrik Lissner"))
  t)

TODO mbsync

Troubleshooting

No such file or directory, mu4e

You will get No such file or directory, mu4e errors if you don't run doom sync after installing mu through your package manager.