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).
![](/var/linux_magazin/storage/images/issues/2021/245/mutt-for-beginners/figure-1/783217-1-eng-US/Figure-1_large.png)
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.
![](/var/linux_magazin/storage/images/issues/2021/245/mutt-for-beginners/figure-2/783220-1-eng-US/Figure-2_large.png)
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.
![](/var/linux_magazin/storage/images/issues/2021/245/mutt-for-beginners/figure-3/783223-1-eng-US/Figure-3_large.png)
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.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.