Mutt is a highly configurable, terminal-based MUA (mail user agent) for those with a lot of email. A MUA is a program like Outlook or Thunderbird that only handles mailboxes, without actually sending or receiving messages on its own (instead, it relies on third party programs, known as MTAs (mail transfer agents) to handle the network communication.
This cheatsheet is a guide to the most commonly used commands to get you up and running. For a more exhaustive guide, check out the Mutt manual.
Unless otherwise specified, all commands apply to the currently highlighted message.
Sending & Replying To Mail
|
Compose new message |
|
Reply to sender only |
|
Reply to all ("group") |
|
Forward message |
|
Bounce message Bouncing sends a copy of the message to an alternate address as if they were the original addressee. Not all mail servers will allow this to work. |
Composing Messages
Once you enter a compose command and fill out the to, subject, etc. fields, you will be brought into your regular system text editor to compose your message. Once you are done, save the file and exit the editor. You will then be brought to another screen giving you a chance to add attachments or perform other operations on your message. Note that your message will appear on-screen as if it were an attachment on its own - this is normal. The following commands only work in this pre-sending screen: |
|
|
Attach file |
|
Attach message This will allow you to forward a message as an attachment. After this command, you will be brought back to the index to select a message. |
|
Edit subject field |
|
Edit to: field |
|
PGP commands |
|
Postpone message This will save the message into a postponed (think: drafts) area for later work. You will be prompted if you want to recall a postponed message when you attempt composing a new message. |
|
Check spelling This will invoke ispell, if available on your system. |
|
Attach PGP key |
|
Abort |
|
Detach file |
|
Send message |
Status Flags
In addition to who sent the message and the subject, a short summary of the disposition of each message is printed beside the message number. Zero or more of the following characters may appear. |
|
Message is deleted (marked for deletion). Actual removal will happen when the mailbox is synced, or mutt is exited. |
|
Message has attachments marked for deletion. Like message deletion, the files are not actually removed until sync or exist. |
|
Message contains a PGP public key. |
|
Message is new (unread). |
|
Message is old. |
|
Message is PGP encrypted. |
|
Message has been replied to. |
|
Message is PGP signed, AND the signature has been verified. |
|
Message is PGP signed, but without verification. Verification problems will be visible when you open the message. |
|
Message is flagged (equivalent to starred in Gmail or red flagged in Outlook). |
|
Message is tagged (selected for a multiple-message operation). |
|
Message is addressed to you, and only you. |
|
Message is addressed to you, but also others (either in the |
|
Message is CC'ed to you (your address is in the |
|
Message is from you. |
|
Message is from a mailing list you're subscribed to. |
Handling Messages
|
Tag message Think of tagging as doing a multi-select for a later action, such as a move or delete. |
|
Tag all messages matching a search pattern |
|
Delete message This will mark the message as deleted, but not immediately purge it from the index. This gives you a chance to undelete the message if you change your mind. |
|
Delete messages matching a pattern This will mark the messages as deleted, but not immediately purge them from the index. This gives you a chance to undelete the message if you
change your mind. THIS IS POTENTIALLY DANGEROUS - It is recomended you do a limit ( |
|
Undelete message Normally the selection bar will skip deleted messages. To undelete a message, place the selection bar "above" the message to undelete. Be aware that once a message has been removed from the index (either manually, or by exiting mutt with a message marked for deletion), the message is permanently gone. |
|
Apply next command to tagged messages This requires that you have tagged messages using the |
|
Synchronize pending actions If messages are pending deletion, this will immediately and irreversibly purge them. |
Searching Messages
Search and limit The main two ways to bring up specific messages in mutt is by limiting and searching. Limiting hides all messages that do not match a pattern, while regular searching jumps to matching messages in the index. |
|
|
Limit display to subsequently entered pattern Run the command again, with |
|
Search visible display |
Search Pattern Syntax
When entering a search or limit command, the following syntax can be used. Note that all searches can be considered to be POSIX Extended Regular Expressions, with extra patterns as shown below. As usual, if you want to search for a literal piece of text that's covered by one of these patterns or a ERE reserved character, it must be escaped by a Also, note that searches containing spaces must be enclosed in single or double quotation marks. |
|
|
All messages Searching for all messages is the fastest way to clear the results of a previous limit ( |
|
Search in body |
|
Search in entire message Searches the subject, addresses, body, and unencoded attachments. |
|
Search for messages CC'ed to a specific user name Specifically a name, not an email address. If you want to use a full search expression, use ~C (capitalized) instead. Aliases can be used here. |
|
Search for messages to or cc'ed to the following search expression |
|
Search for deleted messages |
|
Search for messages sent within a specific date range. Follow this expression with a date range delimited by minuses. Example: |
|
Search for expired messages |
|
Search for messages with an expression in the |
|
Search for flagged messages |
|
Search for messages from a specific user The user name can be an alias. |
|
Search for PGP signed messages |
|
Search for PGP encrypted messages |
|
Search message headers |
|
Search for messages which contain PGP keys |
|
Search for specific message IDs This references the contents of the |
|
Search for messages originated OR recieved by an expression |
|
Search for all messages addressed to a mailing list |
|
Search for messages in the message number range given This command targets the message number as shown in the index. Give the number as a range delimited by a dash, example: |
|
Search for messages with a score in the range given Give the score as a number range delimited by a dash, example: |
|
Search for new messages (messages which arrived in the most recent sync) |
|
Search for old messages |
|
Search for messages addressed to you |
|
Search for messages from yourself |
|
Search for messages you have replied to |
|
Search for read messages |
|
Search for messages with a recieved date in the given range Give the date as a range delimited by a dash. Example: |
|
Search for superseded messages |
|
Search for messages with a subject matching the given expression |
|
Search for tagged messages |
|
Search for messages addressed to a specific user Aliases will work here. |
|
Search for unread messages |
|
Search for messages that are part of a collapsed thread |
|
Search for messages with the |
|
Search for messages with the |
|
Search for messages with a size in the given range Give the range as a number of bytes, delimited by a dash. Example: |
|
Search for duplicate messages |
Aliases
Aliases allow you to save short names for later use in searches, To/CC lines,
etc. For example, you could alias |
|
|
Add alias Adds an alias for the sender of the highlighted message. After this command,
you will receive 3 prompts. The first, |