mu-wizard

shell script to easily configure mu4e accounts on Emacs
git clone git://git.ckyln.com/~cem/mu-wizard
Log | Files | Refs | LICENSE

README.org (5087B)


      1 #+TITLE: mu-wizard
      2 #+AUTHOR: Cem Keylan
      3 #+STARTUP: indent
      4 
      5 =mu-wizard= is a shell script to auto-configure email accounts for =mu4e=
      6 similar in function to =mutt-wizard=. It uses =isync= to synchronize mail
      7 accounts, =msmtp= to send mail and creates individual Lisp profiles for each
      8 account. It is still WIP. Expect breaking changes until the first release.
      9 
     10 * Table of Contents                                            :TOC:noexport:
     11 - [[#dependencies][Dependencies]]
     12 - [[#installation][Installation]]
     13   - [[#initiating-password-managers][Initiating password managers]]
     14   - [[#initiating-mu][Initiating mu]]
     15 - [[#usage][Usage]]
     16   - [[#emacs-configuration][Emacs Configuration]]
     17   - [[#domains-file][Domains file]]
     18   - [[#overrides][Overrides]]
     19 - [[#notes][Notes]]
     20   - [[#protonmail][Protonmail]]
     21   - [[#google][Google]]
     22   - [[#forcing-a-password-manager][Forcing a password manager]]
     23 
     24 * Dependencies
     25 
     26 - =isync= (for offline mail storage)
     27 - =mu=    (or =maildir-utils= depending on your distribution)
     28 - =msmtp= (for sending mails)
     29 - Password manager (=pass=, [[https://github.com/dylanaraps/pash][pash]], and [[https://github.com/cemkeylan/pm][pm]] is supported)
     30 
     31 * Installation
     32 
     33 In order to install =mu-wizard=, clone this repository and build =mu-wizard=.
     34 
     35 #+BEGIN_SRC sh
     36   git clone https://github.com/cemkeylan/mu-wizard.git
     37   cd mu-wizard
     38   make install
     39 #+END_SRC
     40 
     41 Users of Arch Linux based distributions can install =mu-wizard= through the AUR
     42 package [[https://aur.archlinux.org/packages/mu-wizard-git][mu-wizard-git]]. This package is not maintained by me.
     43 
     44 #+BEGIN_SRC sh
     45   yay -S mu-wizard-git
     46 #+END_SRC
     47 
     48 ** Initiating password managers
     49 
     50 All of the password managers require some sort of initializing before you can
     51 store your passwords. This must be done *before* you run ~muw~ for the first
     52 time. You will need to have a GnuPG key for all of the password managers
     53 supported by ~muw~. You can create a GPG key by running ~gpg --gen-key~, or
     54 ~gpg --full-gen-key~.
     55 
     56 See the documentation of your password manager for more information on setting
     57 up your password manager, below are simple instructions enough to get you going.
     58 
     59 *** pass
     60 
     61 In order to initiate pass, do the following:
     62 
     63 #+BEGIN_SRC sh
     64   pass init yourgpgmail@example.com
     65 #+END_SRC
     66 
     67 *** pash
     68 
     69 In order to use pash, add the following to your =.bashrc= (or what have you):
     70 
     71 #+BEGIN_SRC sh
     72   export PASH_KEYID=yourgpgmail@example.com
     73 #+END_SRC
     74 
     75 *** pm
     76 
     77 In order to use pm, add the following to your =.bashrc= (or what have you):
     78 
     79 #+BEGIN_SRC sh
     80   export PM_GPG_USER=yourgpgmail@example.com
     81 #+END_SRC
     82 
     83 ** Initiating mu
     84 
     85 You will need to initiate mu before you can use it inside Emacs. You can simply
     86 run the following:
     87 
     88 #+BEGIN_SRC sh
     89   mu init -m $HOME/.local/share/mail --my-address=mail@example.com
     90   mu index
     91 #+END_SRC
     92 
     93 * Usage
     94 
     95 The wizard is called by running ~muw~. The options below are available to use:
     96 
     97 - ~muw a~ :: *Add* and autoconfigure an email address
     98 - ~muw d~ :: Pick an account to *delete*
     99 - ~muw l~ :: *List* configured accounts
    100 - ~muw p~ :: *Purge* all configuration
    101 - ~muw s~ :: See your *share directory*
    102 
    103 ** Emacs Configuration
    104 
    105 Emacs will not be loading the configurations, you will need to set it manually.
    106 In your init file, you may choose to load the configuration in the following
    107 ways.
    108 
    109 #+BEGIN_SRC emacs-lisp
    110   (load-file "~/.config/mu4e/mu4e-config.el")
    111 #+END_SRC
    112 
    113 #+BEGIN_SRC emacs-lisp
    114   (add-to-list 'load-path "~/.config/mu4e")
    115   (require 'mu4e-config)
    116 #+END_SRC
    117 
    118 #+BEGIN_SRC emacs-lisp
    119   (use-package mu4e-config
    120     :after mu4e
    121     :load-path "~/.config/mu4e")
    122 #+END_SRC
    123 
    124 ** Domains file
    125 
    126 =mu-wizard= doesn't come with a predefined =domains.csv= file, but it can use
    127 one if it is found on =/usr/share/mu-wizard/domains.csv= (or whatever your share
    128 directory is, see ~muw s~). =mu-wizard= also saves the domain information that
    129 you when creating an account on your configuration directory, so you don't have
    130 to retype every detail when creating a second account with the same domain.
    131 
    132 ** Overrides
    133 
    134 Domain-level overrides are possible by adding a shell file to either the share
    135 directory or the user configuration directory. See [[file:overrides/protonmail.com][overrides/protonmail.com]]
    136 for an example override.
    137 
    138 * Notes
    139 
    140 ** Protonmail
    141 
    142 =mu-wizard= supports protonmail. If you are using one of the default domains,
    143 you don't have to do anything. If you are using an alternative domain, you can
    144 link the protonmail.com override to your personal domain. Here is an example:
    145 
    146 #+BEGIN_SRC sh
    147   ln -sf /usr/share/mu-wizard/overrides/protonmail.com $HOME/.config/mu4e/overrides/example.com
    148 #+END_SRC
    149 
    150 Keep in mind that you will need protonmail bridge in order to send mails.
    151 
    152 ** Google
    153 
    154 Google requires you to enable less-secure access in order to receive mail. See
    155 [[https://support.google.com/accounts/answer/6010255][here]] for more information.
    156 
    157 ** Forcing a password manager
    158 
    159 Using the =$MUW_PWM= environment variable, you can specify which password
    160 manager to use. If you don't specify a password manager, ~muw~ will use it with
    161 the following order:
    162 
    163 1. ~pass~
    164 2. ~pash~
    165 3. ~pm~