The Mutt E-Mail Client

Michael Elkins

version 2.2.13 (2024-03-09)

Abstract

All mail clients suck. This one just sucks less. — me, circa 1995


Table of Contents

1. Introduction
1. Mutt Home Page
2. Mailing Lists
3. Getting Mutt
4. Mutt Online Resources
5. Contributing to Mutt
6. Typographical Conventions
7. Copyright
2. Getting Started
1. Core Concepts
2. Screens and Menus
2.1. Index
2.2. Pager
2.3. File Browser
2.4. Sidebar
2.5. Help
2.6. Compose Menu
2.7. Alias Menu
2.8. Attachment Menu
2.9. List Menu
3. Moving Around in Menus
4. Editing Input Fields
4.1. Introduction
4.2. History
5. Reading Mail
5.1. The Message Index
5.2. The Pager
5.3. Threaded Mode
5.4. Miscellaneous Functions
6. Sending Mail
6.1. Introduction
6.2. Editing the Message Header
6.3. Sending Cryptographically Signed/Encrypted Messages
6.4. Sending Format=Flowed Messages
6.5. Background Editing
7. Forwarding and Bouncing Mail
8. Postponing Mail
9. Encryption and Signing
9.1. OpenPGP Configuration
9.2. S/MIME Configuration
3. Configuration
1. Location of Initialization Files
2. Starter Muttrc
3. Syntax of Initialization Files
4. Address Groups
5. Defining/Using Aliases
6. Changing the Default Key Bindings
6.1. Terminal Keybindings
6.2. Enter versus Return
7. Changing the current working directory
8. Defining Aliases for Character Sets
9. Setting Variables Based Upon Mailbox
10. Keyboard Macros
11. Using Color and Mono Video Attributes
12. Message Header Display
12.1. Header Display
12.2. Selecting Headers
12.3. Ordering Displayed Headers
13. Alternative Addresses
14. Mailing Lists
15. Using Multiple Spool Mailboxes
16. Monitoring Incoming Mail
17. User-Defined Headers
18. Specify Default Save Mailbox
19. Specify Default Fcc: Mailbox When Composing
20. Specify Default Save Filename and Default Fcc: Mailbox at Once
21. Change Settings Based Upon Message Recipients
22. Change Settings Before Formatting a Message
23. Choosing the Cryptographic Key of the Recipient
24. Dynamically Changing $index_format using Patterns
25. Adding Key Sequences to the Keyboard Buffer
26. Executing Functions
27. Message Scoring
28. Spam Detection
29. Setting and Querying Variables
29.1. Variable Types
29.2. Commands
29.3. User-Defined Variables
29.4. Type Conversions
30. Reading Initialization Commands From Another File
31. Removing Hooks
32. Format Strings
32.1. Basic usage
32.2. Conditionals
32.3. Filters
32.4. Padding
32.5. Bytes size display
33. Control allowed header fields in a mailto: URL
4. Advanced Usage
1. Character Set Handling
2. Regular Expressions
3. Patterns: Searching, Limiting and Tagging
3.1. Pattern Modifier
3.2. Simple Searches
3.3. Nesting and Boolean Operators
3.4. Searching by Date
4. Marking Messages
5. Using Tags
6. Using Hooks
6.1. Message Matching in Hooks
6.2. Mailbox Matching in Hooks
7. Managing the Environment
8. External Address Queries
9. Mailbox Formats
10. Mailbox Shortcuts
11. Handling Mailing Lists
12. Display Munging
13. New Mail Detection
13.1. How New Mail Detection Works
13.2. Polling For New Mail
13.3. Monitoring New Mail
13.4. Calculating Mailbox Message Counts
14. Editing Threads
14.1. Linking Threads
14.2. Breaking Threads
15. Delivery Status Notification (DSN) Support
16. Start a WWW Browser on URLs
17. Echoing Text
18. Message Composition Flow
19. Batch Composition Flow
20. Using MuttLisp (EXPERIMENTAL)
20.1. Running a command generated by MuttLisp
20.2. Interpolating MuttLisp in a Command Argument
20.3. MuttLisp Syntax
20.4. MuttLisp Functions
20.5. Examples
21. Miscellany
5. Mutt's MIME Support
1. Using MIME in Mutt
1.1. MIME Overview
1.2. Viewing MIME Messages in the Pager
1.3. The Attachment Menu
1.4. The Compose Menu
2. MIME Type Configuration with mime.types
3. MIME Viewer Configuration with Mailcap
3.1. The Basics of the Mailcap File
3.2. Secure Use of Mailcap
3.3. Advanced Mailcap Usage
3.4. Example Mailcap Files
4. MIME Autoview
5. MIME Multipart/Alternative
6. Attachment Searching and Counting
7. MIME Lookup
6. Optional Features
1. General Notes
1.1. Enabling/Disabling Features
1.2. URL Syntax
2. SSL/TLS Support
2.1. STARTTLS
2.2. Tunnel
3. POP3 Support
4. IMAP Support
4.1. The IMAP Folder Browser
4.2. Authentication
5. SMTP Support
6. OAUTHBEARER Support
6.1. XOAUTH2 Support
7. Managing Multiple Accounts
8. Local Caching
8.1. Header Caching
8.2. Body Caching
8.3. Cache Directories
8.4. Maintenance
9. Exact Address Generation
10. Sending Anonymous Messages via Mixmaster
11. Sidebar
11.1. Introduction
11.2. Variables
11.3. Functions
11.4. Commands
11.5. Colors
11.6. Sort
11.7. See Also
12. Compressed Folders Feature
12.1. Introduction
12.2. Commands
13. Autocrypt
13.1. Requirements
13.2. First Run
13.3. Compose Menu
13.4. Account Management
13.5. Alternative Key and Keyring Strategies
7. Security Considerations
1. Passwords
2. Temporary Files
3. Information Leaks
3.1. mailto:-style Links
4. External Applications
8. Performance Tuning
1. Reading and Writing Mailboxes
2. Reading Messages from Remote Folders
3. Searching and Limiting
9. Reference
1. Command-Line Options
2. Configuration Commands
3. Configuration Variables
4. Functions
4.1. Generic Menu
4.2. Index Menu
4.3. Pager Menu
4.4. Alias Menu
4.5. Query Menu
4.6. Attachment Menu
4.7. Compose Menu
4.8. Postpone Menu
4.9. Browser Menu
4.10. Pgp Menu
4.11. Smime Menu
4.12. Mixmaster Menu
4.13. Editor Menu
4.14. Autocrypt Account Menu
4.15. List Menu
10. Miscellany
1. Acknowledgements
2. About This Document

List of Tables

1.1. Typographical conventions for special terms
2.1. Most common navigation keys in entry-based menus
2.2. Most common navigation keys in page-based menus
2.3. Most common line editor keys
2.4. Most common message index keys
2.5. Message status flags
2.6. Message recipient flags
2.7. Most common pager keys
2.8. ANSI escape sequences
2.9. Color sequences
2.10. Most common thread mode keys
2.11. Special Thread Characters
2.12. Most common mail sending keys
2.13. Most common compose menu keys
2.14. PGP key menu flags
3.1. Symbolic key names
4.1. POSIX regular expression character classes
4.2. Regular expression repetition operators
4.3. GNU regular expression extensions
4.4. Pattern modifiers
4.5. Simple search keywords
4.6. Date units
4.7. Relative date units
4.8. Mailbox shortcuts
5.1. Supported MIME types
6.1. Sidebar Variables
6.2. Sidebar Functions
6.3. Sidebar Colors
6.4. Sidebar Sort
6.5. Not all Hooks are Required
9.1. Command line options
9.2. Default Generic Menu Bindings
9.3. Default Index Menu Bindings
9.4. Default Pager Menu Bindings
9.5. Default Alias Menu Bindings
9.6. Default Query Menu Bindings
9.7. Default Attachment Menu Bindings
9.8. Default Compose Menu Bindings
9.9. Default Postpone Menu Bindings
9.10. Default Browser Menu Bindings
9.11. Default Pgp Menu Bindings
9.12. Default Smime Menu Bindings
9.13. Default Mixmaster Menu Bindings
9.14. Default Editor Menu Bindings
9.15. Default Autocrypt Account Menu Bindings
9.16. Default List Menu Bindings

List of Examples

3.1. Multiple configuration commands per line
3.2. Commenting configuration files
3.3. Escaping quotes in configuration files
3.4. Splitting long configuration commands over several lines
3.5. Using external command's output in configuration files
3.6. Preventing the output of backticks from being parsed
3.7. Using environment variables in configuration files
3.8. Using MuttLisp expressions
3.9. Configuring external alias files
3.10. Setting sort method based on mailbox name
3.11. Header weeding
3.12. Configuring header display order
3.13. Defining custom headers
3.14. Using %-expandos in save-hook
3.15. Embedding push in folder-hook
3.16. Configuring spam detection
3.17. Using user-defined variables for config file readability
3.18. Using user-defined variables for backing up other config option values
3.19. Deferring user-defined variable expansion to runtime
3.20. Type conversions using variables
3.21. Using external filters in format strings
4.1. Matching all addresses in address lists
4.2. Matching restricted to aliases
4.3. Matching any defined alias
4.4. Using boolean operators in patterns
4.5. Specifying a default hook
4.6. Subject Munging
5.1. mime.types
5.2. Attachment counting
6.1. URLs
6.2. Managing multiple accounts
6.3. Example of open-hook
6.4. Example of close-hook
6.5. Example of append-hook