LinuxCommandLibrary

mutt

Send and read email from the terminal

TLDR

Open the specified mailbox

$ mutt -f [mailbox]
copy

Send an email and specify a subject and a cc recipient
$ mutt -s [subject] -c [cc@example.com] [recipient@example.com]
copy

Send an email with files attached
$ mutt -a [file1 file2 ...] -- [recipient@example.com]
copy

Specify a file to include as the message body
$ mutt -i [path/to/file] [recipient@example.com]
copy

Specify a draft file containing the header and the body of the message, in RFC 5322 format
$ mutt -H [path/to/file] [recipient@example.com]
copy

SYNOPSIS

mutt [options] [address ...]

PARAMETERS

-a alias
    Adds alias to the current list of aliases for sending mail.

-b bcc-address
    Specifies a blind carbon copy recipient for a new message being composed.

-c cc-address
    Specifies a carbon copy recipient for a new message being composed.

-e command
    Executes a command after the configuration file (muttrc) has been parsed. Useful for temporary settings.

-f mailbox
    Opens the specified mailbox instead of the default incoming mailbox.

-H draft
    Reads message headers from the specified draft file, typically for resuming a postponed message.

-n
    Prevents checking for new mail upon startup, opening the current mailbox directly.

-P
    Displays the postponed message menu (if any), allowing you to resume composing a draft.

-Q
    Queries the recipients in the postponed message menu without displaying the full menu.

-s subject
    Specifies the subject line for a new message being composed.

-v
    Displays the Mutt version number and compile-time options, then exits.

DESCRIPTION

Mutt is a powerful and highly customizable text-based email client (Mail User Agent - MUA) for Unix-like operating systems. It is renowned for its efficiency, speed, and minimal resource usage, making it an ideal choice for command-line enthusiasts, system administrators, and developers.

Inspired by earlier clients like elm and pine, Mutt offers an extensive set of features including support for POP3, IMAP, and SMTP protocols (often via external utilities), various mailbox formats (mbox, Maildir, MH), and robust handling of attachments. Its interface is entirely keyboard-driven, providing a steep but rewarding learning curve due to its highly configurable keybindings and powerful command set. Users can tailor almost every aspect of its behavior, from display colors and header formats to complex mail filtering and scoring rules, using a plain-text configuration file, typically ~/.muttrc.

Mutt adheres to the Unix philosophy by integrating seamlessly with external tools for tasks such as GPG/PGP encryption, spell-checking, and viewing diverse attachment types, offering unparalleled control and flexibility over email management.

CAVEATS

Mutt has a reputation for a steep learning curve due to its highly configurable nature and keyboard-centric interface. Achieving full functionality often requires integrating with other external tools (e.g., for sending mail via SMTP, GPG/PGP encryption, or viewing HTML email). Its text-only interface may not suit users accustomed to graphical email clients.

CONFIGURATION FILES

Mutt's behavior is almost entirely controlled by a plain-text configuration file, most commonly located at ~/.muttrc or ~/.mutt/muttrc. This file can contain a vast array of commands to customize everything from keybindings and display formats to mail processing rules, offering unparalleled flexibility.

EXTENSIBILITY

A core strength of Mutt is its seamless integration with other Unix utilities. It can leverage programs like gpg for encryption/decryption, msmtp or postfix for sending mail, w3m for viewing HTML content, and various image viewers for attachments. This allows users to build a highly personalized and powerful email workflow tailored to their specific needs.

HISTORY

Mutt was initially released in June 1995 by Michael Elkins, who sought to create a mail client that was smaller, faster, and more customizable than existing options like elm and pine. Its guiding philosophy became encapsulated in the well-known motto: "All mail clients suck. This one just sucks less." For many years, Mutt saw active development and became a staple for command-line users. While Mutt itself continues to be maintained, a fork named neomutt emerged to provide more active development and new features.

SEE ALSO

mailx(1), alpine(1), neomutt(1), msmtp(1), fetchmail(1), procmail(1)

Copied to clipboard