# mutt-wizard

> Shell script that sets up NeoMutt, isync and msmtp for an email account, with passwords stored in pass.

mutt-wizard provides the mw command, which writes NeoMutt, mbsync (isync) and msmtp configuration for an account and stores its password with pass, encrypted to your GPG key. It looks up IMAP and SMTP settings for known providers and accepts custom servers and ports for others, and can use mpop for POP3 instead of IMAP. It also installs a mailsync script that syncs mail, indexes it with notmuch and can run on a timer. It suits NeoMutt users who want a working offline setup without writing the configuration by hand.

- Type: Mail tool
- Interface: Command-line tools and prompts
- Systems: Runs on Linux and BSD, on Windows through WSL, builds from source on macOS. Not available for Android.
- Language: Shell
- License: GPL 3.0 (GPL-3.0-only)
- Latest version: v3.3.1
- Maintained: yes
- Website: https://muttwizard.com/
- Source: https://github.com/LukeSmithxyz/mutt-wizard
- Documentation: https://github.com/LukeSmithxyz/mutt-wizard/blob/master/README.md

## Install

### Linux

Native.

- apt: `sudo apt install mutt-wizard`
- AUR: `yay -S mutt-wizard-git`
- source: `git clone https://github.com/LukeSmithxyz/mutt-wizard && cd mutt-wizard && sudo make install`

### macOS

Build from source. No Homebrew formula; install NeoMutt, isync, msmtp and pass with Homebrew, then install mutt-wizard from source. mailsync has macOS-specific notification code.

- source: `git clone https://github.com/LukeSmithxyz/mutt-wizard && cd mutt-wizard && sudo make install`

### Windows

Through WSL. No native build; use the Debian package inside WSL.

- WSL: `sudo apt install mutt-wizard`

### BSD

Native.

- OpenBSD: `pkg_add mutt-wizard`

### Android

Not supported. No Termux package.

## Protocols

- IMAP: Through a separate tool
- POP3: Through a separate tool
- SMTP: Through a separate tool
- JMAP: No
- Maildir: Yes
- mbox: No
- notmuch: Through a separate tool

## Features

- OpenPGP: Yes
- S/MIME: No
- OAuth2 sign-in: No
- Threads: Yes
- Search: notmuch, set up by mailsync
- HTML mail: via lynx in NeoMutt
- Mouse: No
- Multiple accounts: Yes
- Offline use: with isync, or mpop for POP3
- Calendar: No
- Contacts: via abook
- Vim-style keys: Yes
- Configuration: generated NeoMutt, isync and msmtp files

## Pros

- Sets up NeoMutt, mbsync and msmtp for an account with one command.
- Passwords are kept in pass, encrypted with your GPG key, not in plain text.
- Adds vim-style keys, account switching and mailbox shortcuts to NeoMutt.

## Cons

- Requires pass and a GPG key before an account can be added.
- Defaults assume English mailbox names; other names may need manual edits.
- The latest tagged release is old; most fixes are only on the master branch.

## Use mutt-wizard with Forward Email

File: `Generated: ~/.config/mutt/, ~/.mbsyncrc and ~/.config/msmtp/config`

```
# IMAP (mbsync) + SMTP (msmtp); the password is prompted for and stored in pass
mw -a you@example.com -n "Your Name" \
   -i imap.forwardemail.net -I 993 \
   -s smtp.forwardemail.net -S 465

# Or POP3 with mpop instead of IMAP:
# mw -a you@example.com -n "Your Name" -p -i pop3.forwardemail.net -I 995 -s smtp.forwardemail.net -S 465

# Then: mailsync    (download mail)
#       neomutt     (read and send)
```

| Protocol | Server | Port | Security |
| --- | --- | --- | --- |
| IMAP | imap.forwardemail.net | 993 | SSL/TLS |
| POP3 | pop3.forwardemail.net | 995 | SSL/TLS |
| SMTP | smtp.forwardemail.net | 465 | SSL/TLS |
| SMTP | smtp.forwardemail.net | 587 | STARTTLS |

Username: your full alias address. Password: the one from Generate Password next to the alias. Folders: INBOX, Drafts, Sent Mail, Trash, Spam and Archive.

## Questions

### Does mutt-wizard work on Windows?

Not natively. It runs in Windows Subsystem for Linux (WSL). No native build; use the Debian package inside WSL.

### Does mutt-wizard support IMAP?

Through a separate tool. mutt-wizard reads local mail, so a sync program such as isync copies it from the IMAP server.

### Is mutt-wizard open source?

Yes, under the GPL 3.0.

### How do I use mutt-wizard with Forward Email?

Use the config in the Forward Email section on this page, saved as Generated: ~/.config/mutt/, ~/.mbsyncrc and ~/.config/msmtp/config, and replace the address and password with your own.

## Sources

- https://muttwizard.com/
- https://github.com/LukeSmithxyz/mutt-wizard
- https://github.com/LukeSmithxyz/mutt-wizard/blob/master/README.md
- https://github.com/LukeSmithxyz/mutt-wizard/blob/master/LICENSE
- https://github.com/LukeSmithxyz/mutt-wizard/blob/master/bin/mw
- https://github.com/LukeSmithxyz/mutt-wizard/blob/master/bin/mailsync
- https://github.com/LukeSmithxyz/mutt-wizard/blob/master/share/mbsync-temp
- https://github.com/LukeSmithxyz/mutt-wizard/blob/master/share/msmtp-temp
- https://github.com/LukeSmithxyz/mutt-wizard/blob/master/Makefile
- https://github.com/LukeSmithxyz/mutt-wizard/releases/tag/v3.3.1
- https://packages.debian.org/trixie/mutt-wizard
- https://aur.archlinux.org/packages/mutt-wizard-git
- https://aur.archlinux.org/packages/mutt-wizard
- https://github.com/openbsd/ports/blob/master/mail/mutt-wizard/Makefile
- https://github.com/termux/termux-packages/tree/master/packages
- https://formulae.brew.sh/api/formula.json
