The Mutt E-Mail Client

Michael Elkins

version 20161104 (1.7.1)

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
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
7. Forwarding and Bouncing Mail
8. Postponing Mail
3. Configuration
1. Location of Initialization Files
2. Syntax of Initialization Files
3. Address Groups
4. Defining/Using Aliases
5. Changing the Default Key Bindings
6. Defining Aliases for Character Sets
7. Setting Variables Based Upon Mailbox
8. Keyboard Macros
9. Using Color and Mono Video Attributes
10. Message Header Display
10.1. Header Display
10.2. Selecting Headers
10.3. Ordering Displayed Headers
11. Alternative Addresses
12. Mailing Lists
13. Using Multiple Spool Mailboxes
14. Monitoring Incoming Mail
15. User-Defined Headers
16. Specify Default Save Mailbox
17. Specify Default Fcc: Mailbox When Composing
18. Specify Default Save Filename and Default Fcc: Mailbox at Once
19. Change Settings Based Upon Message Recipients
20. Change Settings Before Formatting a Message
21. Choosing the Cryptographic Key of the Recipient
22. Adding Key Sequences to the Keyboard Buffer
23. Executing Functions
24. Message Scoring
25. Spam Detection
26. Setting and Querying Variables
26.1. Variable Types
26.2. Commands
26.3. User-Defined Variables
26.4. Type Conversions
27. Reading Initialization Commands From Another File
28. Removing Hooks
29. Format Strings
29.1. Basic usage
29.2. Conditionals
29.3. Filters
29.4. Padding
29.5. Conditional Dates
30. 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. Using Tags
5. Using Hooks
5.1. Message Matching in Hooks
5.2. Mailbox Matching in Hooks
6. External Address Queries
7. Mailbox Formats
8. Mailbox Shortcuts
9. Handling Mailing Lists
10. Keyword Management
11. New Mail Detection
11.1. How New Mail Detection Works
11.2. Polling For New Mail
11.3. Calculating Mailbox Message Counts
12. Editing Threads
12.1. Linking Threads
12.2. Breaking Threads
13. Delivery Status Notification (DSN) Support
14. Start a WWW Browser on URLs
15. 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. Mutt Patches
1.3. URL Syntax
2. SSL/TLS Support
3. POP3 Support
4. IMAP Support
4.1. The IMAP Folder Browser
4.2. Authentication
5. SMTP Support
6. Managing Multiple Accounts
7. Local Caching
7.1. Header Caching
7.2. Body Caching
7.3. Cache Directories
7.4. Maintenance
8. Exact Address Generation
9. Sending Anonymous Messages via Mixmaster
10. Attach Headers Color Feature
10.1. Support
10.2. Introduction
10.3. Usage
10.4. Muttrc
10.5. See Also
10.6. Known Bugs
10.7. Credits
11. Compose to Sender Feature
11.1. Support
11.2. Introduction
11.3. Functions
11.4. Muttrc
11.5. Known Bugs
11.6. Credits
12. Compressed Folders Feature
12.1. Support
12.2. Introduction
12.3. Commands
12.4. Muttrc
12.5. See Also
12.6. Known Bugs
12.7. Credits
13. Conditional Dates Feature
13.1. Support
13.2. Introduction
13.3. Variables
13.4. Muttrc
13.5. See Also
13.6. Known Bugs
13.7. Credits
14. Encrypt-to-Self Feature
14.1. Support
14.2. Introduction
14.3. Variables
14.4. Muttrc
14.5. See Also
14.6. Known Bugs
14.7. Credits
15. Fmemopen Feature
15.1. Support
15.2. Introduction
15.3. See Also
15.4. Known Bugs
15.5. Credits
16. Forgotten Attachment Feature
16.1. Support
16.2. Introduction
16.3. Variables
16.4. Muttrc
16.5. See Also
16.6. Known Bugs
16.7. Credits
17. Ifdef Feature
17.1. Support
17.2. Introduction
17.3. Commands
17.4. Muttrc
17.5. See Also
17.6. Known Bugs
17.7. Credits
18. Index Color Feature
18.1. Support
18.2. Introduction
18.3. Colors
18.4. Muttrc
18.5. See Also
18.6. Known Bugs
18.7. Credits
19. Initials Expando Feature
19.1. Support
19.2. Introduction
19.3. Variables
19.4. Muttrc
19.5. See Also
19.6. Known Bugs
19.7. Credits
20. Keywords Feature
20.1. Support
20.2. Introduction
20.3. Variables
20.4. Functions
20.5. Sort
20.6. Muttrc
20.7. See Also
20.8. Known Bugs
20.9. Credits
21. Kyoto Cabinet Feature
21.1. Support
21.2. Introduction
21.3. See Also
21.4. Known Bugs
21.5. Credits
22. Limit Current Thread Feature
22.1. Support
22.2. Introduction
22.3. Functions
22.4. Muttrc
22.5. See Also
22.6. Known Bugs
22.7. Credits
23. LMDB Feature
23.1. Support
23.2. Introduction
23.3. See Also
23.4. Known Bugs
23.5. Credits
24. Multiple FCC Feature
24.1. Support
24.2. Introduction
24.3. See Also
24.4. Known Bugs
24.5. Credits
25. Nested If Feature
25.1. Support
25.2. Introduction
25.3. Variables
25.4. Muttrc
25.5. See Also
25.6. Known Bugs
25.7. Credits
26. New Mail Feature
26.1. Support
26.2. Introduction
26.3. Variables
26.4. Muttrc
26.5. See Also
26.6. Known Bugs
26.7. Credits
27. NNTP Feature
27.1. Support
27.2. Introduction
27.3. Variables
27.4. Functions
27.5. Muttrc
27.6. See Also
27.7. Known Bugs
27.8. Credits
28. Notmuch Feature
28.1. Support
28.2. Introduction
28.3. Using NotMuch
28.4. Variables
28.5. Functions
28.6. Commands
28.7. Colors
28.8. Muttrc
28.9. See Also
28.10. Known Bugs
28.11. Credits
29. Progress Bar Feature
29.1. Support
29.2. Introduction
29.3. Colors
29.4. Muttrc
29.5. See Also
29.6. Known Bugs
29.7. Credits
30. Quasi-Delete Feature
30.1. Support
30.2. Introduction
30.3. Functions
30.4. Muttrc
30.5. See Also
30.6. Known Bugs
30.7. Credits
31. Reply With X-Original-To Feature
31.1. Support
31.2. Introduction
31.3. Variables
31.4. Muttrc
31.5. Credits
32. Sensible Browser Feature
32.1. Support
32.2. Introduction
32.3. See Also
32.4. Known Bugs
32.5. Credits
33. Sidebar Feature
33.1. Support
33.2. Introduction
33.3. Variables
33.4. Functions
33.5. Commands
33.6. Colors
33.7. Sort
33.8. Muttrc
33.9. See Also
33.10. Known Bugs
33.11. Credits
34. Skip Quoted Feature
34.1. Support
34.2. Introduction
34.3. Variables
34.4. Muttrc
34.5. See Also
34.6. Known Bugs
34.7. Credits
35. Status Color Feature
35.1. Support
35.2. Introduction
35.3. Commands
35.4. Colors
35.5. Muttrc
35.6. See Also
35.7. Known Bugs
35.8. Credits
36. Timeout Feature
36.1. Support
36.2. Introduction
36.3. Commands
36.4. Muttrc
36.5. See Also
36.6. Known Bugs
36.7. Credits
37. TLS-SNI Feature
37.1. Support
37.2. Introduction
37.3. See Also
37.4. Known Bugs
37.5. Credits
38. Trash Folder Feature
38.1. Support
38.2. Introduction
38.3. Variables
38.4. Functions
38.5. Muttrc
38.6. See Also
38.7. Known Bugs
38.8. Credits
7. Security Considerations
1. Passwords
2. Temporary Files
3. Information Leaks
3.1. Message-Id: headers
3.2. 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
3.1. abort_noattach
3.2. abort_nosubject
3.3. abort_unmodified
3.4. alias_file
3.5. alias_format
3.6. allow_8bit
3.7. allow_ansi
3.8. arrow_cursor
3.9. ascii_chars
3.10. askbcc
3.11. askcc
3.12. ask_follow_up
3.13. ask_x_comment_to
3.14. assumed_charset
3.15. attach_charset
3.16. attach_format
3.17. attach_keyword
3.18. attach_sep
3.19. attach_split
3.20. attribution
3.21. attribution_locale
3.22. auto_tag
3.23. autoedit
3.24. beep
3.25. new_mail_command
3.26. beep_new
3.27. bounce
3.28. bounce_delivered
3.29. braille_friendly
3.30. catchup_newsgroup
3.31. certificate_file
3.32. charset
3.33. check_mbox_size
3.34. check_new
3.35. collapse_unread
3.36. compose_format
3.37. config_charset
3.38. confirmappend
3.39. confirmcreate
3.40. connect_timeout
3.41. content_type
3.42. copy
3.43. crypt_autoencrypt
3.44. crypt_autopgp
3.45. crypt_autosign
3.46. crypt_autosmime
3.47. crypt_confirmhook
3.48. crypt_opportunistic_encrypt
3.49. crypt_replyencrypt
3.50. crypt_replysign
3.51. crypt_replysignencrypted
3.52. pgp_encrypt_self
3.53. crypt_timestamp
3.54. crypt_use_gpgme
3.55. crypt_use_pka
3.56. crypt_verify_sig
3.57. date_format
3.58. default_hook
3.59. delete
3.60. delete_untag
3.61. digest_collapse
3.62. display_filter
3.63. dotlock_program
3.64. dsn_notify
3.65. dsn_return
3.66. duplicate_threads
3.67. edit_headers
3.68. editor
3.69. encode_from
3.70. entropy_file
3.71. envelope_from_address
3.72. escape
3.73. fast_reply
3.74. fcc_attach
3.75. fcc_clear
3.76. folder
3.77. folder_format
3.78. followup_to
3.79. followup_to_poster
3.80. force_name
3.81. forward_decode
3.82. forward_decrypt
3.83. forward_edit
3.84. forward_format
3.85. forward_quote
3.86. from
3.87. gecos_mask
3.88. group_index_format
3.89. hdrs
3.90. header
3.91. header_cache
3.92. header_cache_compress
3.93. header_cache_pagesize
3.94. help
3.95. hidden_host
3.96. hide_limited
3.97. hide_missing
3.98. hide_thread_subject
3.99. hide_top_limited
3.100. hide_top_missing
3.101. history
3.102. history_file
3.103. honor_disposition
3.104. honor_followup_to
3.105. hostname
3.106. idn_decode
3.107. idn_encode
3.108. ignore_linear_white_space
3.109. ignore_list_reply_to
3.110. imap_authenticators
3.111. imap_check_subscribed
3.112. imap_delim_chars
3.113. imap_headers
3.114. imap_idle
3.115. imap_keepalive
3.116. imap_list_subscribed
3.117. imap_login
3.118. imap_pass
3.119. imap_passive
3.120. imap_peek
3.121. imap_pipeline_depth
3.122. imap_servernoise
3.123. imap_user
3.124. implicit_autoview
3.125. include
3.126. include_onlyfirst
3.127. indent_string
3.128. index_format
3.129. inews
3.130. ispell
3.131. keep_flagged
3.132. keywords_legacy
3.133. keywords_standard
3.134. mail_check
3.135. mail_check_recent
3.136. mail_check_stats
3.137. mail_check_stats_interval
3.138. mailcap_path
3.139. mailcap_sanitize
3.140. maildir_header_cache_verify
3.141. maildir_trash
3.142. maildir_check_cur
3.143. mark_old
3.144. markers
3.145. mask
3.146. mbox
3.147. mbox_type
3.148. menu_context
3.149. menu_move_off
3.150. menu_scroll
3.151. message_cache_clean
3.152. message_cachedir
3.153. message_format
3.154. meta_key
3.155. metoo
3.156. mh_purge
3.157. mh_seq_flagged
3.158. mh_seq_replied
3.159. mh_seq_unseen
3.160. mime_forward
3.161. mime_forward_decode
3.162. mime_forward_rest
3.163. mime_subject
3.164. mix_entry_format
3.165. mixmaster
3.166. move
3.167. narrow_tree
3.168. net_inc
3.169. news_cache_dir
3.170. news_server
3.171. newsgroups_charset
3.172. newsrc
3.173. nntp_authenticators
3.174. nntp_context
3.175. nntp_listgroup
3.176. nntp_load_description
3.177. nntp_user
3.178. nntp_pass
3.179. nntp_poll
3.180. nm_open_timeout
3.181. nm_default_uri
3.182. nm_hidden_tags
3.183. nm_exclude_tags
3.184. nm_unread_tag
3.185. nm_db_limit
3.186. nm_query_type
3.187. nm_record
3.188. nm_record_tags
3.189. pager
3.190. pager_context
3.191. pager_format
3.192. pager_index_lines
3.193. pager_stop
3.194. pgp_auto_decode
3.195. pgp_autoinline
3.196. pgp_check_exit
3.197. pgp_clearsign_command
3.198. pgp_decode_command
3.199. pgp_decrypt_command
3.200. pgp_decryption_okay
3.201. pgp_encrypt_only_command
3.202. pgp_encrypt_sign_command
3.203. pgp_entry_format
3.204. pgp_export_command
3.205. pgp_getkeys_command
3.206. pgp_good_sign
3.207. pgp_ignore_subkeys
3.208. pgp_import_command
3.209. pgp_list_pubring_command
3.210. pgp_list_secring_command
3.211. pgp_long_ids
3.212. pgp_mime_auto
3.213. pgp_replyinline
3.214. pgp_retainable_sigs
3.215. pgp_show_unusable
3.216. pgp_sign_as
3.217. pgp_sign_command
3.218. pgp_sort_keys
3.219. pgp_strict_enc
3.220. pgp_timeout
3.221. pgp_use_gpg_agent
3.222. pgp_verify_command
3.223. pgp_verify_key_command
3.224. pipe_decode
3.225. pipe_sep
3.226. pipe_split
3.227. pop_auth_try_all
3.228. pop_authenticators
3.229. pop_checkinterval
3.230. pop_delete
3.231. pop_host
3.232. pop_last
3.233. pop_pass
3.234. pop_reconnect
3.235. pop_user
3.236. post_indent_string
3.237. post_moderated
3.238. postpone
3.239. postponed
3.240. postpone_encrypt
3.241. postpone_encrypt_as
3.242. preconnect
3.243. print
3.244. print_command
3.245. print_decode
3.246. print_split
3.247. prompt_after
3.248. query_command
3.249. query_format
3.250. quit
3.251. quote_regexp
3.252. read_inc
3.253. read_only
3.254. realname
3.255. recall
3.256. record
3.257. reflow_space_quotes
3.258. reflow_text
3.259. reflow_wrap
3.260. reply_regexp
3.261. reply_self
3.262. reply_to
3.263. reply_with_xorig
3.264. resolve
3.265. resume_draft_files
3.266. resume_edited_draft_files
3.267. reverse_alias
3.268. reverse_name
3.269. reverse_realname
3.270. rfc2047_parameters
3.271. save_address
3.272. save_empty
3.273. save_history
3.274. save_name
3.275. score
3.276. score_threshold_delete
3.277. score_threshold_flag
3.278. score_threshold_read
3.279. search_context
3.280. send_charset
3.281. sendmail
3.282. sendmail_wait
3.283. shell
3.284. save_unsubscribed
3.285. show_new_news
3.286. show_only_unread
3.287. sidebar_delim_chars
3.288. sidebar_divider_char
3.289. sidebar_folder_indent
3.290. sidebar_format
3.291. sidebar_indent_string
3.292. sidebar_new_mail_only
3.293. sidebar_next_new_wrap
3.294. sidebar_on_right
3.295. sidebar_short_path
3.296. sidebar_sort_method
3.297. sidebar_visible
3.298. sidebar_width
3.299. sig_dashes
3.300. sig_on_top
3.301. signature
3.302. simple_search
3.303. skip_quoted_offset
3.304. sleep_time
3.305. smart_wrap
3.306. smileys
3.307. smime_ask_cert_label
3.308. smime_ca_location
3.309. smime_certificates
3.310. smime_decrypt_command
3.311. smime_decrypt_use_default_key
3.312. smime_default_key
3.313. smime_encrypt_command
3.314. smime_encrypt_self
3.315. smime_encrypt_with
3.316. smime_get_cert_command
3.317. smime_get_cert_email_command
3.318. smime_get_signer_cert_command
3.319. smime_import_cert_command
3.320. smime_is_default
3.321. smime_keys
3.322. smime_pk7out_command
3.323. smime_sign_command
3.324. smime_sign_digest_alg
3.325. smime_sign_opaque_command
3.326. smime_timeout
3.327. smime_verify_command
3.328. smime_verify_opaque_command
3.329. smtp_authenticators
3.330. smtp_pass
3.331. smtp_url
3.332. sort
3.333. sort_alias
3.334. sort_aux
3.335. sort_browser
3.336. sort_re
3.337. spam_separator
3.338. spoolfile
3.339. ssl_ca_certificates_file
3.340. ssl_client_cert
3.341. ssl_force_tls
3.342. ssl_min_dh_prime_bits
3.343. ssl_starttls
3.344. ssl_use_sslv2
3.345. ssl_use_sslv3
3.346. ssl_use_tlsv1
3.347. ssl_use_tlsv1_1
3.348. ssl_use_tlsv1_2
3.349. ssl_usesystemcerts
3.350. ssl_verify_dates
3.351. ssl_verify_host
3.352. ssl_ciphers
3.353. status_chars
3.354. status_format
3.355. status_on_top
3.356. strict_threads
3.357. suspend
3.358. text_flowed
3.359. thorough_search
3.360. thread_received
3.361. tilde
3.362. time_inc
3.363. timeout
3.364. tmpdir
3.365. to_chars
3.366. trash
3.367. ts_icon_format
3.368. ts_enabled
3.369. ts_status_format
3.370. tunnel
3.371. uncollapse_jump
3.372. use_8bitmime
3.373. use_domain
3.374. use_envelope_from
3.375. use_from
3.376. use_ipv6
3.377. user_agent
3.378. visual
3.379. vfolder_format
3.380. virtual_spoolfile
3.381. wait_key
3.382. weed
3.383. wrap
3.384. wrap_headers
3.385. wrap_search
3.386. wrapmargin
3.387. write_bcc
3.388. write_inc
3.389. xlabel_delimiter
3.390. x_comment_to
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
10. Miscellany
1. Acknowledgements
2. About This Document

List of Tables

1.1. Typographical conventions for special terms
2.1. sidebar_format
2.2. sidebar_format
2.3. Sidebar Color Priority
2.4. Config Changes
2.5. Most common navigation keys in entry-based menus
2.6. Most common navigation keys in page-based menus
2.7. Most common line editor keys
2.8. Most common message index keys
2.9. Message status flags
2.10. Message recipient flags
2.11. Most common pager keys
2.12. ANSI escape sequences
2.13. Color sequences
2.14. Most common thread mode keys
2.15. Most common mail sending keys
2.16. Most common compose menu keys
2.17. PGP key menu flags
3.1. Mutt system config file locations
3.2. Mutt user config file locations
3.3. 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. Mailbox shortcuts
5.1. Supported MIME types
6.1. compose-to-sender Functions
6.2. Not all Hooks are Required
6.3. Potential Formatting Scheme
6.4. Date Formatting Codes
6.5. Example Date Tests
6.6. Example 1
6.7. Example 2
6.8. encrypt-self Variables
6.9. forgotten-attachment Variables
6.10. Index Colors
6.11. Keywords Variables
6.12. Keyword Functions
6.13. Keywords Sort
6.14. Limit-Current-Thread Functions
6.15. New Mail Command Variables
6.16. NNTP Variables
6.17. NNTP Functions
6.18. Notmuch Variables
6.19. Notmuch Functions
6.20. Index Colors
6.21. Progress Colors
6.22. Quasi-Delete Functions
6.23. Reply With X-Original-To Variables
6.24. Sidebar Variables
6.25. Sidebar Functions
6.26. Sidebar Colors
6.27. Sidebar Sort
6.28. Skip-Quoted Variables
6.29. Status Colors
6.30. Trash Variables
6.31. Trash Functions
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

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. Using environment variables in configuration files
3.7. Configuring external alias files
3.8. Setting sort method based on mailbox name
3.9. Header weeding
3.10. Configuring header display order
3.11. Defining custom headers
3.12. Using %-expandos in save-hook
3.13. Embedding push in folder-hook
3.14. Configuring spam detection
3.15. Using user-defined variables for config file readability
3.16. Using user-defined variables for backing up other config option values
3.17. Deferring user-defined variable expansion to runtime
3.18. Type conversions using variables
3.19. Using external filters in format strings
4.1. Matching all addresses in address lists
4.2. Using boolean operators in patterns
4.3. Specifying a default hook
5.1. mime.types
5.2. Attachment counting
6.1. URLs
6.2. Managing multiple accounts