I have recently discovered mutt (and neomutt which has a few patches that haven’t made it into mutt) in my search for a command line mail client. While it is a simple mail client that works nicely when a Display server is not available, or you choose to go command line only, there are a few things to be aware of when using it for the first time. I have set this program up fairly recently, and here is my experience.
Installing
I have installed neomutt on my Archlinux laptop. Unlike some packages I have installed on Arch, both mutt and neomutt were available in the arch repros to be installed with sudo pacman -S mutt or sudo pacman -S neomutt.
Configuring
The config file for mutt and neomutt go in a file in ~/.muttrc unless another is specified on the command line. Below is a sample config file that I use.
set editor=/opt/bin/nano
#-----------#
# Passwords #
#-----------#
#gpg --textmode -d ~/outlook.password.asc
#---------------#
# Account Hooks #
#---------------#
account-hook . "unset imap_user; unset imap_pass; unset tunnel" # unset first!
account-hook "imaps://[email protected]@smtp.office365.com" "\
set imap_user = [email protected]\
imap_pass = ywqowraeupaewbcf"
# -------------------------- #
# Ignore unnecessary header #
# -------------------------- #
ignore *
unignore From: To: Cc: Date: Subject:
#-------------------------------------#
# Folders, mailboxes and folder hooks #
#------------------------------------#
# Setup for wyattcjackson2006
set folder = imaps://[email protected]@smtp.office365.com/
mailboxes = +INBOX
set spoolfile = +INBOX
folder-hook imaps://[email protected]@smtp.office365.com"\
set folder = imaps://[email protected]@smtp.office365.com\
spoolfile = +INBOX \
postponed = +Drafts \
record = +'Sent Mail' \
from = 'Wyatt Jackson <[email protected]>' \
realname = 'Wyatt Jackson' \
smtp_url = smtp://[email protected]@smtp.office365.com:587\
ssl_starttls = yes \
smtp_pass = ywqowraeupaewbcf"
Using mutt
Using mutt is fairly simple. Use the arrow keys to move up and down the listings (page up/down to move 1 screenful), [enter] to select mail, [q] to quit mutt, and [i] to leave the mail reader. [m] to compose new message and view drafts. More keybindings are listed at the top of the screen, and more can be configured.
More information
- https://wiki.archlinux.org/index.php/Mutt (third party site)
- #mutt and #neomutt channels on freenode irc
- https://coffeecrash.tech/2020/05/09/deduping-mutt/ (third party site)
- https://www.tecmint.com/send-mail-from-command-line-using-mutt-command/ (third party site)
- http://www.mutt.org/ (offical site)
- https://lifehacker.com/how-to-use-the-fast-and-powerful-mutt-email-client-with-5574557 (third party site)
- https://unix.stackexchange.com/questions/42712/open-html-attachments-externally-in-mutt (third party site)
