$linuxjunkies
>

mutt(1)

mutt is a text-based email client for reading, composing, and managing email from the command line.

UbuntuDebianFedoraArch

Synopsis

mutt [OPTION]... [FILE]...

Description

mutt is a small but powerful text-based MIME email client. It supports POP3, IMAP, and local mailboxes, with features for composing messages, viewing attachments, and managing mail folders. mutt is highly configurable and scriptable, making it ideal for power users and system administrators who prefer terminal-based workflows.

When invoked without arguments, mutt opens your default mailbox. You can specify a mailbox file or folder to open directly, or use flags to compose new messages, check mail, or run in batch mode.

Common options

FlagWhat it does
-f mailboxOpen the specified mailbox instead of the default inbox
-F muttrcRead configuration from alternate muttrc file instead of ~/.muttrc
-s subjectSpecify the subject line when composing a new message
-c addressSpecify a carbon copy (Cc) recipient for a new message
-b addressSpecify a blind carbon copy (Bcc) recipient for a new message
-a fileAttach a file to the composed message
-H draftInclude file as draft when composing a message
-e commandExecute a mutt command after startup
-m typeSpecify mailbox type (mbox, IMAP, POP3, etc.)
-nDon't read the system or user configuration files on startup
-xExpand aliases from the alias file
-yStart in folder browser mode instead of opening a mailbox

Examples

Start mutt and open your default mailbox (typically INBOX)

mutt

Open the Archive folder (= expands to your mail directory)

mutt -f =Archive

Compose a new message with subject line to specified recipient

mutt -s 'Test Subject' [email protected]

Send a message with an attachment using stdin as body text

mutt -s 'Report' -a report.pdf [email protected] < message.txt

Connect to a Gmail IMAP account

mutt -f imaps://imap.gmail.com:993 -u username

Start in folder browser mode to browse all available mailboxes

mutt -y

Load configuration from an alternate muttrc file

mutt -F /tmp/custom.muttrc

Send an automated email from a script or cron job

echo 'Message body' | mutt -s 'Automated Alert' [email protected]

Related commands