2019-05-05 14:11:59 -04:00
|
|
|
#+TITLE: email/mu4e
|
2019-01-05 16:50:08 -05:00
|
|
|
#+DATE: April 8, 2017
|
|
|
|
#+SINCE: v2.0
|
|
|
|
#+STARTUP: inlineimages
|
2017-05-04 10:40:51 +02:00
|
|
|
|
2019-01-05 16:50:08 -05:00
|
|
|
* Table of Contents :TOC:
|
|
|
|
- [[Description][Description]]
|
|
|
|
- [[Module Flags][Module Flags]]
|
|
|
|
- [[Plugins][Plugins]]
|
|
|
|
- [[Prerequisites][Prerequisites]]
|
|
|
|
- [[MacOS][MacOS]]
|
|
|
|
- [[Arch Linux][Arch Linux]]
|
|
|
|
- [[Features][Features]]
|
|
|
|
- [[Configuration][Configuration]]
|
|
|
|
- [[offlineimap][offlineimap]]
|
|
|
|
- [[mbsync][mbsync]]
|
|
|
|
|
|
|
|
* Description
|
2017-05-25 20:08:50 +02:00
|
|
|
This module makes Emacs an email client, using ~mu4e~.
|
2017-05-04 10:40:51 +02:00
|
|
|
|
|
|
|
#+begin_quote
|
2019-01-05 16:50:08 -05:00
|
|
|
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./
|
2017-05-25 20:08:50 +02:00
|
|
|
|
2019-01-05 16:50:08 -05:00
|
|
|
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).
|
2017-05-04 10:40:51 +02:00
|
|
|
#+end_quote
|
|
|
|
|
2019-01-05 16:50:08 -05:00
|
|
|
** Module Flags
|
|
|
|
+ ~+gmail~ Enables gmail-specific configuration.
|
|
|
|
|
|
|
|
** Plugins
|
|
|
|
+ [[https://github.com/agpchil/mu4e-maildirs-extension][mu4e-maildirs-extension]]
|
2017-08-21 20:07:07 +02:00
|
|
|
|
2019-01-05 16:50:08 -05:00
|
|
|
* Prerequisites
|
2017-05-25 20:08:50 +02:00
|
|
|
This module requires:
|
|
|
|
|
2019-01-05 16:50:08 -05:00
|
|
|
+ Either ~mbsync~ (default) or ~offlineimap~ (to sync mail with)
|
2017-05-25 20:08:50 +02:00
|
|
|
+ ~mu~ (to index your downloaded messages)
|
|
|
|
|
2017-08-21 20:07:07 +02:00
|
|
|
** MacOS
|
2019-01-05 16:50:08 -05:00
|
|
|
#+BEGIN_SRC sh
|
2017-05-04 10:40:51 +02:00
|
|
|
brew install mu --with-emacs
|
2019-01-05 16:50:08 -05:00
|
|
|
# And one of the following
|
|
|
|
brew install isync # mbsync
|
2017-05-04 10:40:51 +02:00
|
|
|
brew install offlineimap
|
|
|
|
#+END_SRC
|
|
|
|
|
2017-08-21 20:07:07 +02:00
|
|
|
** Arch Linux
|
2019-01-05 16:50:08 -05:00
|
|
|
#+BEGIN_SRC sh
|
|
|
|
sudo pacman --noconfirm --needed -S mu
|
|
|
|
# And one of the following
|
|
|
|
sudo pacman -S isync # mbsync
|
|
|
|
sudo pacman -S offlineimap
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
* TODO Features
|
|
|
|
|
|
|
|
* Configuration
|
|
|
|
** offlineimap
|
2019-05-05 14:11:59 -04:00
|
|
|
This module uses =mbsync= by default. To change this, change ~+mu4e-backend~:
|
2019-01-05 16:50:08 -05:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2019-05-05 14:11:59 -04:00
|
|
|
(setq +mu4e-backend 'offlineimap)
|
2017-05-04 10:40:51 +02:00
|
|
|
#+END_SRC
|
|
|
|
|
2019-01-05 16:50:08 -05:00
|
|
|
Then you must set up offlineimap and index your mail:
|
2017-05-04 10:40:51 +02:00
|
|
|
|
2019-01-05 16:50:08 -05:00
|
|
|
1. Write a ~\~/.offlineimaprc~. Mine can be found [[https://github.com/hlissner/dotfiles/tree/master/shell/mu][in my dotfiles repository]]. It
|
|
|
|
is configured to download mail to ~\~/.mail~. I use [[https://www.passwordstore.org/][unix pass]] to securely
|
|
|
|
store my login credentials.
|
2017-05-04 10:40:51 +02:00
|
|
|
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:
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp :tangle no
|
2019-05-05 14:11:59 -04:00
|
|
|
;; Each path is relative to `+mu4e-mu4e-mail-path', which is ~/.mail by default
|
2019-01-05 16:50:08 -05:00
|
|
|
(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)
|
2017-05-04 10:40:51 +02:00
|
|
|
#+END_SRC
|
2017-05-25 20:08:50 +02:00
|
|
|
|
2019-01-05 16:50:08 -05:00
|
|
|
** TODO mbsync
|