Skip to content

Main Navigation

Pixelated Dwarf
  • Home
  • Blog
  • Cybersecurity Glossary
  • Newsletter
  • Contact

Linux Terminal Email

Posted on July 10, 2023 (July 10, 2023) by pix
Linux terminal email

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 — Linux terminal email client

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

sudo apt install mutt

CentOS / Fedora / RedHat

sudo yum install mutt

Arch and Manjaro

sudo pacman -Sy mutt

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.

mkdir -p ~/.mutt/cache


 

Aerc

aerc - Linux terminal email client

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

sudo apt -y install aerc

NeoMutt

NeoMutt - Linux terminal email client

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

sudo apt install neomutt

Arch and Manjaro

sudo pacman -Syu neomutt

Configuration of NeoMutt:

Create a local file  .neomutt and put the following in it:

### User Configurations ###
set realname = ‘YOUR USER NAME’
set from = ‘YOUR USER EMAIL’
set use_from = yes
set signature = “~/.mutt/signature”
### IMAP Configurations ###
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
### SMTP Configurations ###
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.

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Posted in LinuxTagged linux, terminal email, terminal email clients

Post navigation

 Using CISSP to help secure your home networkLinux Terminal Web Browsers 
Essential Bookmarks for Individual Privacy and data security

Recent Posts

  • Noise Flooding your metadata for privacy
  • Keeping Santa Secret
  • The year of guerrilla privacy
  • Thanksgiving Data Stuffing Recipe
  • Compartmentalization for Privacy and Security
  • Browser Anti‑Fingerprinting
  • Why I Decided to Host a Family‑Only Mastodon Instance
  • Emergency‑Response Plan for Personal Hardware

Categories

  • BASH One-Liners
  • Computing
  • Linux
  • Online Safety
  • Security
  • Shell Scripting

Disclaimer

The experiments and code that I present are published in good faith. That being said, any code can contain flaws that could cause harm to your systems. Take the time to try things out in a virtual machine (VMWARE or something like it). What works for my servers may not work for you, that is part of the learning curve when you work with computers, networking and coding. I find it challenging and fun. Always test things out before "going Live" and putting it on your main server or PC. Here is the full Disclaimer.

AI Policy

Do Not use this site for:
  • Training AI Models
  • Fine-tuning or reinforcement learning
Full Policy: AI Policy link
Donate with Monero

Use this code to Donate

83ZB84vgQezLSyp7vGwhpAX3jsVTnSNGA7wqaFSuiKk89G8Q88GxjMAisiWiJoC9aL86CyudvTaLDaJiqvRzBC9xCxLKiRx
copyright 2018-2025 Pixelateddwarf
Blogarama - blog directory