mutt-wizard

fork of Luke Smiths mutt-wizard
git clone git://git.jakekoroman.com/mutt-wizard
Log | Files | Refs | README | LICENSE

README.md (11037B)


      1 # mutt-wizard
      2 
      3 https://muttwizard.com/
      4 
      5 Get this great stuff without effort:
      6 
      7 - A full-featured and autoconfigured email client on the terminal with neomutt
      8 - Mail stored offline enabling the ability to:
      9     * view and write emails while you're away from
     10       the internet
     11     * make backups
     12 - Provides a `mailsync` script that can be scheduled to run as often as you
     13   like, which downloads/syncs mail and optionally notifies you when new mail has arrived.
     14 
     15 Specifically, this wizard:
     16 
     17 - Determines your email server's IMAP and SMTP servers and ports
     18 - Creates dotfiles for `neomutt`, `isync`, and `msmtp` appropriate for your
     19   email address
     20 - Encrypts and locally stores your password for easy remote access, accessible
     21   only by your GPG key
     22 - Handles as many as nine separate email accounts automatically
     23 - Auto-creates bindings to switch between accounts or between mailboxes
     24 - Provides sensible defaults and an attractive appearance for the neomutt email
     25   client
     26 - If mutt-wizard doesn't know your server's IMAP/SMTP info by default, it will
     27   prompt you for them and will put them in all the right places.
     28 
     29 ## Install
     30 
     31 #### Dependencies
     32 
     33 - `neomutt` - the email client. (If you are using Gentoo GNU/Linux, you will need the `sasl` use flag to be enabled)
     34 - `curl` - tests connections (required at install).
     35 - `isync` - downloads and syncs the mail (required if storing IMAP mail locally).
     36 - `msmtp` - sends the email.
     37 - `pass` - safely encrypts passwords (required at install).
     38 - `ca-certificates` - required for SSL. Probably installed already.
     39 - `gettext` - writes config files. Probably installed already.
     40 
     41 **Note**: There's a chance of errors if you use a slow-release distro like
     42 Ubuntu, Debian, or Mint. If you get errors in `neomutt`, install the most
     43 recent version manually or manually remove the offending lines in the config in
     44 `/usr/share/mutt-wizard/mutt-wizard.muttrc`.
     45 
     46 ```bash
     47 git clone https://github.com/LukeSmithxyz/mutt-wizard
     48 cd mutt-wizard
     49 sudo make install
     50 ```
     51 
     52 A user of Arch-based distros can also install the current mutt-wizard release from the AUR as
     53 [mutt-wizard](https://aur.archlinux.org/packages/mutt-wizard/), or the Github master branch, [mutt-wizard-git](https://aur.archlinux.org/packages/mutt-wizard-git/).
     54 
     55 ### Optional Dependencies
     56 
     57 - `pam-gnupg` - Automatically logs you into your GPG key on login so you will
     58   never need to input your password once logged on to your system. Check the
     59   repo and directions out [here](https://github.com/cruegge/pam-gnupg).
     60 - `lynx` - view HTML email in neomutt.
     61 - `notmuch` - index and search mail. Install it and run `notmuch setup`, tell
     62   it that your mail is in `~/.local/share/mail/` (although `mw` will do this
     63   automatically if you haven't set notmuch up before). You can run it in mutt
     64   with <kbd>ctrl-f</kbd>. Run `notmuch new` to process new mail.
     65 - `abook` - a terminal-based address book. Pressing tab while typing an address
     66   to send mail to will suggest contacts that are in your abook.
     67 - `urlview` - outputs urls in mail to browser.
     68 - `cronie` - (or any other major cronjob manager) to set up automatic mail
     69   syncing.
     70 - `mpop` - If you want to use POP protocol instead of IMAP.
     71 
     72 
     73 ## Usage
     74 
     75 The mutt-wizard runs via the command `mw`. Once setup is complete, you'll use
     76 `neomutt` to access your mail.
     77 
     78 - `mw -a you@email.com` -- add a new email account
     79 - `mw -l` -- list existing accounts
     80 - `mw -d` -- choose an account to delete
     81 - `mw -D your@email.com` -- delete account settings without confirmation
     82 - `mw -t 30` -- toggle automatic mailsync to every 30 minutes
     83 - `mw -T` -- toggle mailsync without specifying minutes (default is 10)
     84 - `mw -r` -- reorder account shortcut numbers
     85 - `pass edit mw-your@email.com` -- revise an account's password
     86 - `mailsync` -- sync all configured email accounts. Also gives notifications of new mail and indexes new mail with notmuch silently.
     87 - `mailsync your@email.com` -- sync a particular (or several) email account(s).
     88 
     89 ### Options usable when adding an account
     90 
     91 #### Providing arguments
     92 
     93 - `-u` -- Give an account username if different from the email address.
     94 - `-n` -- A real name to be used by the account. Put in quotations if multiple
     95   words.
     96 - `-i` -- IMAP server address
     97 - `-I` -- IMAP server port (otherwise assumed to be 993)
     98 - `-s` -- SMTP server address
     99 - `-S` -- SMTP server port (otherwise assumed to be 465)
    100 - `-m` -- Maximum number of emails to be kept offline. No maximum is default
    101   functionality.
    102 - `-x` -- Account password. You will be prompted for it otherwise.
    103 
    104 #### General Settings
    105 
    106 - `-f` -- Assume mailbox names and force account configuration without
    107   connecting online at all.
    108 - `-o` -- Configure mutt for an account, but do not keep mail offline.
    109 - `-p` -- Use POP protocol instead of IMAP (requires `mpop` installed).
    110 - `mailsync` gives visual messages of new mail by default. Or, set
    111   `MAILSYNC_MUTE=1` as an environmental variable if you prefer not having them.
    112 
    113 ## Neomutt user interface
    114 
    115 To give you an example of the interface, here's an idea:
    116 
    117 - <kbd>m</kbd> - send mail (uses your default `$EDITOR` to write)
    118 - <kbd>j</kbd>/<kbd>k</kbd> and <kbd>d</kbd>/<kbd>u</kbd> - vim-like bindings to go down and up (or <kbd>d</kbd>/<kbd>u</kbd> to go
    119   down/up a page).
    120 - <kbd>l</kbd> - open mail, or attachment page or attachment
    121 - <kbd>h</kbd> - the opposite of <kbd>l</kbd>
    122 - <kbd>r</kbd>/<kbd>R</kbd> - reply/reply all to highlighted mail
    123 - <kbd>s</kbd> - save selected mail or selected attachment
    124 - <kbd>gs</kbd>,<kbd>gi</kbd>,<kbd>ga</kbd>,<kbd>gd</kbd>,<kbd>gS</kbd> - Press <kbd>g</kbd> followed by another letter to change
    125   mailbox: <kbd>s</kbd>ent, <kbd>i</kbd>nbox, <kbd>a</kbd>rchive, <kbd>d</kbd>rafts, <kbd>S</kbd>pam, etc.
    126 - <kbd>M</kbd> and <kbd>C</kbd> - For <kbd>M</kbd>ove and <kbd>C</kbd>opy: follow them with one of the mailbox
    127   letters above, i.e. <kbd>MS</kbd> means "move to Spam".
    128 - <kbd>i#</kbd> - Press <kbd>i</kbd> followed by a number 1-9 to go to a different account. If you
    129   add 9 accounts via mutt-wizard, they will each be assigned a number.
    130 - <kbd>a</kbd> to add address/person to abook and <kbd>Tab</kbd> while typing address to complete
    131   one from abook.
    132 - <kbd>?</kbd> - see all keyboard shortcuts
    133 - <kbd>ctrl-j</kbd>/<kbd>ctrl-k</kbd> - move up and down in sidebar, <kbd>ctrl-o</kbd> opens mailbox.
    134 - <kbd>ctrl-b</kbd> - open a menu to select a URL you want to open in your browser.
    135 - <kbd>p</kbd> - encrypt/sign your message (in compose view, before sending the email).
    136 
    137 ## Additional functionality
    138 
    139 - `pam-gnupg` - Automatically logs you into your GPG key on login, so you will
    140   never need to input your password once logged on to your system. Check the
    141   repo and directions out [here](https://github.com/cruegge/pam-gnupg).
    142 - `lynx` - View HTML email in neomutt.
    143 - `notmuch` - Index and search mail. Install it and run `notmuch setup`, tell it
    144   that your mail is in `~/.local/share/mail/` (although `mw` will do this
    145   automatically if you haven't set notmuch up before). You can run it in mutt
    146   with <kbd>ctrl-f</kbd>. Run `notmuch new` to process new mail.
    147 - `abook` - A terminal-based address book. Pressing tab while typing an address
    148   to send mail to will suggest contacts that are in your abook.
    149 - `urlview` - Outputs URLs in an email to your browser.
    150 
    151 ## New stuff and improvements since the original release
    152 
    153 - `mw` is now scriptable with command-line options and can run successfully
    154   without any interaction, making it possible to deploy in a script.
    155 - `isync`/`mbsync` has replaced `offlineimap` as the backend. Offlineimap was
    156   error-prone, bloated, used obsolete Python 2 modules, and required separate
    157   steps to install the system.
    158 - `mw` is now an installed program instead of just a script needed to be kept in
    159   your mutt folder.
    160 - `dialog` is no longer used and the interface is simply text commands.
    161 - More autogenerated shortcuts that allow quickly moving and copying mail
    162   between boxes.
    163 - More elegant attachment handling. Image/video/pdf attachments without relying
    164   on the neomutt instance.
    165 - abook integration by default.
    166 - The messy template files and other directories have been moved or removed,
    167   leaving a clean config folder.
    168 - msmtp configs moved to `~/.config/` and mail default location moved to
    169   `~/.local/share/mail/`, reducing mess in `~`.
    170 - `pass` is used as a password manager instead of separately saving passwords.
    171 - Script is POSIX sh compliant.
    172 - Error handling for the many people who don't read or follow directions. Fewer
    173   errors generally.
    174 - Addition of a manual `man mw`
    175 - Now handles POP protocol via `mpop` for those who prefer it (add an account
    176   with the `-p` option). POP configs are still generated automatically.
    177 
    178 ## Help the Project!
    179 
    180 
    181 - Try mutt-wizard out on weird machines and weird email addresses and report any
    182   errors.
    183 - Open a PR to add new server information into `domains.csv` so their users can
    184   more easily use mutt-wizard.
    185 - If nothing else, donate:
    186 	- XMR: `8AzeWXhJvYJ1VeENHcNXCR1dLMgDALreZ1BdooZVjRKndv6myr3t1ue6C4ML2an5fWSpcP1sTDA9nKUMevkukDXG6chRjNv`
    187 	- BTC: `bc1qacqfp36ffv9mafechmvk8f6r8qy4tual6rcm9p`
    188 
    189 ## Details for Tinkerers
    190 
    191 - The critical `mutt`/`neomutt` files are in `~/.config/mutt/`.
    192 - Put whatever global settings you want in `muttrc`. mutt-wizard will add some
    193   lines to this file, which you shouldn't remove unless you know what you're
    194   doing, but you can move them up/down over your config lines if you need to. If
    195   you get binding conflict errors in mutt, you might need to do this.
    196 - Each of the accounts that mutt-wizard generates will have custom settings set
    197   in a separate file in `accounts/`. You can edit these freely if you want to
    198   tinker with settings specific to an account.
    199 - In `/usr/share/mutt-wizard` are several global config files, including
    200   `mutt-wizard`'s default settings. You can override this in your `muttrc` if
    201   you wish.
    202 
    203 ## Watch out for these things
    204 
    205 - Gmail accounts need to create an
    206   [App Password](https://support.google.com/accounts/answer/185833?hl=en) to
    207   use with  "less secure" applications. This password is single-use (i.e.
    208   for setup) and will be stored and encrypted locally. Enabling third-party
    209   applications requires turning off two-factor authentication and this will
    210   circumvent that. You might also need to manually "Enable IMAP" in the
    211   settings.
    212 - If you have a university email or enterprise-hosted email for work, there
    213   might be other hurdles or two-factor authentication you have to jump through.
    214   Some, for example, will want you to create a separate IMAP password, etc.
    215 - `isync` is not fully UTF-8 compatible, so non-Latin characters may be garbled
    216   (although sync should succeed). `mw` will also not auto-create mailbox
    217   shortcuts since it is looking for English mailbox names. I strongly recommend
    218   you to set your email language to English on your mail server to avoid these
    219   problems.
    220 
    221 ## License
    222 
    223 mutt-wizard is free/libre software. This program is released under the GPLv3
    224 license, which you can find in the file [LICENSE](LICENSE).