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
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.