Linux Terminal Email
Getting Email right in the terminal is convenient when you work at the command line most of the time. Linux terminal Email has been around for a long time and has grown with the times, adding more features as they came along. There are quite a few choices out there, I’ll go over a few of my favorites and let you choose the right one for your needs.
Mutt
Mutt is one of the oldest Linux terminal email clients that are around that are being actively developed.
Some of Mutt’s features include:
- color support
- message threading
- MIME support (including RFC2047 support for encoded headers)
- PGP/MIME (RFC2015)
- various features to support mailing lists, including list-reply
- active development community
- POP3 support
- IMAP support
- full control of message headers when composing
- support for multiple mailbox formats (mbox, MMDF, MH, maildir)
- highly customizable, including keybindings and macros
- change configuration automatically based on recipients, current folder, etc.
- Searches using regular expressions, including an internal pattern matching language
- Delivery Status Notification (DSN) support
- postpone message composition indefinitely for later recall
- easily include attachments when composing, even from the command line
- ability to specify alternate addresses for recognition of mail forwarded from other accounts, with ability to set the From: headers on replies/etc. accordingly
- multiple message tagging
- reply to or forward multiple messages at once
- .mailrc style configuration files
- easy to install (uses GNU autoconf)
- compiles against either curses/ncurses or S-lang
- translation into at least 20 languages
- small and efficient
- It’s free! (no cost and GPL’ed)
To install Mutt:
Debian and Ubuntu
CentOS / Fedora / RedHat
Arch and Manjaro
After Installing Mutt:
After installing Mutt you need to configure a few files before you can start emailing people. You can do this globally (for all users on the computer) or locally (just for one user). Personally, I like to configure the files locally for one user.
The configuration file for mutt is located at each users home directory as ~/.muttrc.
Here is a sample of the file:
# vi ~/.muttrc # About Me set from = "user@domain.com" set realname = "Firstname Lastname" # My credentials set smtp_url = "smtp://user@domain.com@smtp.domain.com:587/" set smtp_pass = "password" set imap_user = "user@domain.com" set imap_pass = "password" # My mailboxes set folder = "imaps://imap.domain.com:993" set spoolfile = "+INBOX" # Where to put the stuff set header_cache = "~/.mutt/cache/headers" set message_cachedir = "~/.mutt/cache/bodies" set certificate_file = "~/.mutt/certificates" # Etc set mail_check = 30 set move = no set imap_keepalive = 900 set sort = threads set editor = "vim" # GnuPG bootstrap # source ~/.mutt/gpg.rc
After you make the changes to the configuration file, you need to make a cashe directory for the user.
Aerc
Aerc is a newer Linux terminal email client that is written in golang. Because it is a new project, it is still very basic in the features that it offers. One of the best reasons to try it is Aerc is very easy to set up (it comes with an intuitive setup program) and features and corrections are being done rapidly.
Some of its more interesting features include:
- Editing emails in an embedded terminal tmux-style, allowing you to check on incoming emails and reference other threads while you compose your replies
- Render HTML emails with an interactive terminal web browser, highlight patches with diffs, and browse with an embedded
less
session - Vim-style keybindings and ex-command system, allowing for powerful automation at a single keystroke
- First-class support for working with git & email.
- Open a new tab with a terminal emulator and a shell running for easy access to nearby git repos for parallel work
- Support for multiple accounts, with IMAP, Maildir, Notmuch, Mbox and JMAP backends. Along with IMAP, JMAP, SMTP, and sendmail transfer protocols.
- Asynchronous IMAP and JMAP support ensures the UI never gets locked up by a flaky network.
- Efficient network usage – aerc only downloads the information which is necessary to present the UI, making for a snappy and bandwidth-efficient experience
- Email threading (with and/or without IMAP server support).
- PGP signing, encryption and verification using GNUpg.
- 100% free and open source software
Debian and Ubuntu
NeoMutt
NeoMutt is a tiny, but powerful command-line mail reader program based on Mutt with added features such as color terminals, full-text search, text-based browsers, MIME, OpenPGP, POP and IMAP support, SSL encryption and SASL authentication, and threaded sorting mode.
Debian and Ubuntu
Arch and Manjaro
Configuration of NeoMutt:
Create a local file .neomutt and put the following in it:
set realname = ‘YOUR USER NAME’
set from = ‘YOUR USER EMAIL’
set use_from = yes
set signature = “~/.mutt/signature”
set imap_user = ‘EMAIL ADDRESS’
set imap_authenticators=”login”
set imap_keepalive = 300
set mail_check = 120
unset imap_passive
set imap_pass=”imap password”
set folder=”imaps://imap.IMAP_URL:993″
set spoolfile = +INBOX
set smtp_url = “smtp://SMTP_URL:587″
set ssl_starttls = yes
set ssl_force_tls = yes
set smtp_authenticators=”login”
set smtp_pass=”smtp password”
Conclusion
There are several other Linux Terminal email clients out there, but these are my favorites. Each of them are very configurable and are handy to have when you are working at the terminal. Try them out and tell me which one is your favorite!
I look forward to hearing from you.