An efficient command-line email client
Enhancements
To enhance your use of Mutt, you will probably want to add a few other commands to muttrc
. For example,
set signature="PATH"
points to a file that contains a signature that is added automatically to the end of every email you send. To avoid any conflict between Mutt's use of UTF-8 for a character set and the editor in which you write emails, you should also add:
set send_charset="utf-8"
However, by far the most useful step is to set up encryption for sent mail. If you have not already done so, create ~/.mutt/gpg.rc
, then copy to it the file /usr/share/doc/mutt/samples/gpg.rc
, and add the following line
source ~/.mutt/gpg.rc
to muttrc
.
With this setup, you can press p when composing to use basic GnuPG options. The muttrc
man page [3] lists additional encryption options.
Sending Email
All emails sent from Mutt are in plain text for security. However, if you want an HTML message, either compose it in a separate email editor or add the tags manually.
Emails can be sent in two ways. First, you can send an email directly from the command line (see Table 1 for command options), with:
mutt OPTIONS"RECIPIENT-OR-ALIAS"
Table 1
Command-Line Email Options
-a FILE |
Attach a file |
-b ADDRESS |
Add a blind carbon copy (BCC) |
-c ADDRESS |
Add a carbon copy (CC) recipient |
-i FILE |
Include a file in the body of the email |
-s SUBJECT |
Add the subject of the message |
When you press the Enter key, Mutt asks for confirmation of the options and then opens in the default editor so that you can type the message (Figure 1).
The -R
option lets you open a mailbox and select a message to reply to. If you are unsure of the available mailboxes, typing -y
will provide a list of available ones. If necessary, -f MAILBOX
sets the current mailbox.
An easier way to use Mutt is to type the basic command of mutt, which opens a text-based interface (Figure 2). The interface is entirely mouse driven, with a list of available actions along the top, and a summary of the current mailbox along the bottom. When Mutt runs from the command line, pressing m to start a message runs you through a series of prompts for the headers and then opens Mutt's default editor.
Regardless of whether you are running from the command line or the text interface, when you are finished writing your message in the editor, save the file and quit the editor (the exact commands for doing so depend on the editor). A screen appears in which you can make last minute changes, using the options listed at the top of the page, with the message described as the attachment of a file stored in /tmp/mutt
(Figure 3). Press y when you are ready to send the message.
Other Configuration
The information provided will get you up and running, but it is only a fraction of what Mutt can do. You can add small touches, such as a sidebar that lists mailboxes or configuring Mutt to use Gmail, or more elaborate ones like encrypting email, displaying messages in threads, using custom headers, or running Mutt for local system messages. For additional useful information, see the Mutt documentation [4] and the ArchWiki notes on Mutt [5]. You may have to do some digging, but, to the best of my knowledge, Mutt can do anything the average desktop mail client can do – and with considerably less overhead or problems.
Infos
- Mutt: http://www.mutt.org/
- GnuPg: https://gnupg.org/
- muttrc: https://linux.die.net/man/5/muttrc
- Mutt documentation: http://www.mutt.org/doc/manual/
- ArchWiki notes: https://wiki.archlinux.org/index.php/Mutt#Configuration
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.