<commit_before>#+TITLE: :app email

This module makes Emacs an email client, using ~mu4e~.

#+begin_quote
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).

WARNING: my config is gmail/gsuite oriented, and since Google has its own opinions on the IMAP standard, it is unlikely to translate to other hosts.
#+end_quote

* Table of Contents :TOC:
- [[#install][Install]]
  - [[#macos][MacOS]]
  - [[#arch-linux][Arch Linux]]
- [[#dependencies][Dependencies]]

* Install
This module requires:

+ ~offlineimap~ (to sync mail with)
+ ~mu~ (to index your downloaded messages)

** MacOS
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
brew install mu --with-emacs
brew install offlineimap
#+END_SRC

** Arch Linux
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
sudo pacman --noconfirm --needed -S offlineimap mu
#+END_SRC

* Dependencies
You need to do the following:

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.
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
;; Each path is relative to `+email-mu4e-mail-path', which is ~/.mail by default
(set! :email "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")<commit_msg>fix wrong url of dotfiles repository<commit_after>#+TITLE: :app email

This module makes Emacs an email client, using ~mu4e~.

#+begin_quote
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).

WARNING: my config is gmail/gsuite oriented, and since Google has its own opinions on the IMAP standard, it is unlikely to translate to other hosts.
#+end_quote

* Table of Contents :TOC:
- [[#install][Install]]
  - [[#macos][MacOS]]
  - [[#arch-linux][Arch Linux]]
- [[#dependencies][Dependencies]]

* Install
This module requires:

+ ~offlineimap~ (to sync mail with)
+ ~mu~ (to index your downloaded messages)

** MacOS
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
brew install mu --with-emacs
brew install offlineimap
#+END_SRC

** Arch Linux
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
sudo pacman --noconfirm --needed -S offlineimap mu
#+END_SRC

* Dependencies
You need to do the following:

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.
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
;; Each path is relative to `+email-mu4e-mail-path', which is ~/.mail by default
(set! :email "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")
{'fraction_non_alphanumeric': 0.13055148853099072, 'fraction_numerical': 0.005368472425573451, 'mean_word_length': 3.8337264150943398, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6484243', 'n_tokens_mistral': 1420, 'n_tokens_neox': 1364, 'n_words': 518}