mutt-wizard

fork of Luke Smith's mutt-wizard
Log | Files | Refs | README | LICENSE

README.md (11610B)


      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 wibuiltth 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 - `goimapnotify` - required for push notifications.
     58   [Check here for reference](https://wiki.archlinux.org/title/Isync#With_imapnotify).
     59 - `pam-gnupg` - Automatically logs you into your GPG key on login so you will
     60   never need to input your password once logged on to your system. Check the
     61   repo and directions out [here](https://github.com/cruegge/pam-gnupg).
     62 - `lynx` - view HTML email in neomutt.
     63 - `notmuch` - index and search mail. Install it and run `notmuch setup`, tell
     64   it that your mail is in `~/.local/share/mail/` (although `mw` will do this
     65   automatically if you haven't set notmuch up before). You can run it in mutt
     66   with <kbd>ctrl-f</kbd>. Run `notmuch new` to process new mail.
     67 - `abook` - a terminal-based address book. Pressing tab while typing an address
     68   to send mail to will suggest contacts that are in your abook.
     69 - `urlview` - outputs urls in mail to browser.
     70 - `cronie` - (or any other major cronjob manager) to set up automatic mail
     71   syncing.
     72 - `mpop` - If you want to use POP protocol instead of IMAP.
     73 
     74 
     75 ## Usage
     76 
     77 The mutt-wizard runs via the command `mw`. Once setup is complete, you'll use
     78 `neomutt` to access your mail.
     79 
     80 - `mw -a you@email.com` -- add a new email account
     81 - `mw -l` -- list existing accounts
     82 - `mw -d` -- choose an account to delete
     83 - `mw -D your@email.com` -- delete account settings without confirmation
     84 - `mw -t 30` -- toggle automatic mailsync to every 30 minutes
     85 - `mw -T` -- toggle mailsync without specifying minutes (default is 10)
     86 - `mw -r` -- reorder account shortcut numbers
     87 - `pass edit mw-your@email.com` -- revise an account's password
     88 - `mailsync` -- sync all configured email accounts. Also gives notifications of new mail and indexes new mail with notmuch silently.
     89 - `mailsync your@email.com` -- sync a particular (or several) email account(s).
     90 
     91 ### Options usable when adding an account
     92 
     93 #### Providing arguments
     94 
     95 - `-u` -- Give an account username if different from the email address.
     96 - `-n` -- A real name to be used by the account. Put in quotations if multiple
     97   words.
     98 - `-i` -- IMAP server address
     99 - `-I` -- IMAP server port (otherwise assumed to be 993)
    100 - `-s` -- SMTP server address
    101 - `-S` -- SMTP server port (otherwise assumed to be 465)
    102 - `-m` -- Maximum number of emails to be kept offline. No maximum is default
    103   functionality.
    104 - `-x` -- Account password. You will be prompted for it otherwise.
    105 
    106 #### General Settings
    107 
    108 - `-f` -- Assume mailbox names and force account configuration without
    109   connecting online at all.
    110 - `-o` -- Configure mutt for an account, but do not keep mail offline.
    111 - `-p` -- Use POP protocol instead of IMAP (requires `mpop` installed).
    112 - `mailsync` gives visual messages of new mail by default. Or, set
    113   `MAILSYNC_MUTE=1` as an environmental variable if you prefer not having them.
    114 
    115 ## Neomutt user interface
    116 
    117 To give you an example of the interface, here's an idea:
    118 
    119 - <kbd>m</kbd> - send mail (uses your default `$EDITOR` to write)
    120 - <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
    121   down/up a page).
    122 - <kbd>l</kbd> - open mail, or attachment page or attachment
    123 - <kbd>h</kbd> - the opposite of <kbd>l</kbd>
    124 - <kbd>r</kbd>/<kbd>R</kbd> - reply/reply all to highlighted mail
    125 - <kbd>s</kbd> - save selected mail or selected attachment
    126 - <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
    127   mailbox: <kbd>s</kbd>ent, <kbd>i</kbd>nbox, <kbd>a</kbd>rchive, <kbd>d</kbd>rafts, <kbd>S</kbd>pam, etc.
    128 - <kbd>M</kbd> and <kbd>C</kbd> - For <kbd>M</kbd>ove and <kbd>C</kbd>opy: follow them with one of the mailbox
    129   letters above, i.e. <kbd>MS</kbd> means "move to Spam".
    130 - <kbd>i#</kbd> - Press <kbd>i</kbd> followed by a number 1-9 to go to a different account. If you
    131   add 9 accounts via mutt-wizard, they will each be assigned a number.
    132 - <kbd>a</kbd> to add address/person to abook and <kbd>Tab</kbd> while typing address to complete
    133   one from abook.
    134 - <kbd>?</kbd> - see all keyboard shortcuts
    135 - <kbd>ctrl-j</kbd>/<kbd>ctrl-k</kbd> - move up and down in sidebar, <kbd>ctrl-o</kbd> opens mailbox.
    136 - <kbd>ctrl-b</kbd> - open a menu to select a URL you want to open in your browser.
    137 - <kbd>p</kbd> - encrypt/sign your message (in compose view, before sending the email).
    138 
    139 ## Enable push notifications per mail
    140 **Note**: Replace the `fulladdrs` with your actual email address. You have to do this for each new mail you want to setup instant notifications.
    141 ```bash
    142 systemctl enable --user goimapnotify@fulladdrs.service
    143 ```
    144 
    145 ## Additional functionality
    146 
    147 - `pam-gnupg` - Automatically logs you into your GPG key on login, so you will
    148   never need to input your password once logged on to your system. Check the
    149   repo and directions out [here](https://github.com/cruegge/pam-gnupg).
    150 - `lynx` - View HTML email in neomutt.
    151 - `notmuch` - Index and search mail. Install it and run `notmuch setup`, tell it
    152   that your mail is in `~/.local/share/mail/` (although `mw` will do this
    153   automatically if you haven't set notmuch up before). You can run it in mutt
    154   with <kbd>ctrl-f</kbd>. Run `notmuch new` to process new mail.
    155 - `abook` - A terminal-based address book. Pressing tab while typing an address
    156   to send mail to will suggest contacts that are in your abook.
    157 - `urlview` - Outputs URLs in an email to your browser.
    158 
    159 ## New stuff and improvements since the original release
    160 
    161 - `mw` is now scriptable with command-line options and can run successfully
    162   without any interaction, making it possible to deploy in a script.
    163 - `isync`/`mbsync` has replaced `offlineimap` as the backend. Offlineimap was
    164   error-prone, bloated, used obsolete Python 2 modules, and required separate
    165   steps to install the system.
    166 - `mw` is now an installed program instead of just a script needed to be kept in
    167   your mutt folder.
    168 - `dialog` is no longer used and the interface is simply text commands.
    169 - More autogenerated shortcuts that allow quickly moving and copying mail
    170   between boxes.
    171 - More elegant attachment handling. Image/video/pdf attachments without relying
    172   on the neomutt instance.
    173 - abook integration by default.
    174 - The messy template files and other directories have been moved or removed,
    175   leaving a clean config folder.
    176 - msmtp configs moved to `~/.config/` and mail default location moved to
    177   `~/.local/share/mail/`, reducing mess in `~`.
    178 - `pass` is used as a password manager instead of separately saving passwords.
    179 - Script is POSIX sh compliant.
    180 - Error handling for the many people who don't read or follow directions. Fewer
    181   errors generally.
    182 - Addition of a manual `man mw`
    183 - Now handles POP protocol via `mpop` for those who prefer it (add an account
    184   with the `-p` option). POP configs are still generated automatically.
    185 
    186 ## Help the Project!
    187 
    188 
    189 - Try mutt-wizard out on weird machines and weird email addresses and report any
    190   errors.
    191 - Open a PR to add new server information into `domains.csv` so their users can
    192   more easily use mutt-wizard.
    193 - If nothing else, donate:
    194 	- XMR: `8AzeWXhJvYJ1VeENHcNXCR1dLMgDALreZ1BdooZVjRKndv6myr3t1ue6C4ML2an5fWSpcP1sTDA9nKUMevkukDXG6chRjNv`
    195 	- BTC: `bc1qacqfp36ffv9mafechmvk8f6r8qy4tual6rcm9p`
    196 
    197 ## Details for Tinkerers
    198 
    199 - The critical `mutt`/`neomutt` files are in `~/.config/mutt/`.
    200 - Put whatever global settings you want in `muttrc`. mutt-wizard will add some
    201   lines to this file, which you shouldn't remove unless you know what you're
    202   doing, but you can move them up/down over your config lines if you need to. If
    203   you get binding conflict errors in mutt, you might need to do this.
    204 - Each of the accounts that mutt-wizard generates will have custom settings set
    205   in a separate file in `accounts/`. You can edit these freely if you want to
    206   tinker with settings specific to an account.
    207 - In `/usr/share/mutt-wizard` are several global config files, including
    208   `mutt-wizard`'s default settings. You can override this in your `muttrc` if
    209   you wish.
    210 
    211 ## Watch out for these things
    212 
    213 - Gmail accounts need to create an
    214   [App Password](https://support.google.com/accounts/answer/185833?hl=en) to
    215   use with  "less secure" applications. This password is single-use (i.e.
    216   for setup) and will be stored and encrypted locally. Enabling third-party
    217   applications requires turning off two-factor authentication and this will
    218   circumvent that. You might also need to manually "Enable IMAP" in the
    219   settings.
    220   To create an App Password for your Google account,
    221   you can directly visit the [App Passwords](https://myaccount.google.com/apppasswords) page in your Google Account settings.
    222 - If you have a university email or enterprise-hosted email for work, there
    223   might be other hurdles or two-factor authentication you have to jump through.
    224   Some, for example, will want you to create a separate IMAP password, etc.
    225 - `isync` is not fully UTF-8 compatible, so non-Latin characters may be garbled
    226   (although sync should succeed). `mw` will also not auto-create mailbox
    227   shortcuts since it is looking for English mailbox names. I strongly recommend
    228   you to set your email language to English on your mail server to avoid these
    229   problems.
    230 
    231 ## License
    232 
    233 mutt-wizard is free/libre software. This program is released under the GPLv3
    234 license, which you can find in the file [LICENSE](LICENSE).