The Mutt E-Mail Client

Michael Elkins

version (2016-08-21)

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. Compressed Folders Patch
10.1. Patch
10.2. Introduction
10.3. Commands
10.4. Muttrc
10.5. See Also
10.6. Known Bugs
10.7. Credits
11. Conditional Dates Patch
11.1. Patch
11.2. Introduction
11.3. Variables
11.4. Muttrc
11.5. See Also
11.6. Known Bugs
11.7. Credits
12. Fmemopen Patch
12.1. Patch
12.2. Introduction
12.3. Muttrc
12.4. See Also
12.5. Known Bugs
12.6. Credits
13. Ifdef Patch
13.1. Patch
13.2. Introduction
13.3. Commands
13.4. Muttrc
13.5. See Also
13.6. Known Bugs
13.7. Credits
14. Index Color Patch
14.1. Patch
14.2. Introduction
14.3. Colors
14.4. Muttrc
14.5. See Also
14.6. Known Bugs
14.7. Credits
15. Initials Expando Patch
15.1. Patch
15.2. Introduction
15.3. Variables
15.4. Muttrc
15.5. See Also
15.6. Known Bugs
15.7. Credits
16. Keywords Patch
16.1. Patch
16.2. Introduction
16.3. Variables
16.4. Functions
16.5. Sort
16.6. Muttrc
16.7. See Also
16.8. Known Bugs
16.9. Credits
17. Limit-Current-Thread Patch
17.1. Patch
17.2. Introduction
17.3. Functions
17.4. Muttrc
17.5. See Also
17.6. Known Bugs
17.7. Credits
18. LMDB Patch
18.1. Patch
18.2. Introduction
18.3. See Also
18.4. Known Bugs
18.5. Credits
19. multiple-fcc Patch
19.1. Patch
19.2. Introduction
19.3. See Also
19.4. Known Bugs
19.5. Credits
20. Nested If Patch
20.1. Patch
20.2. Introduction
20.3. Variables
20.4. Muttrc
20.5. See Also
20.6. Known Bugs
20.7. Credits
21. new-mail Patch
21.1. Patch
21.2. Introduction
21.3. Variables
21.4. Muttrc
21.5. See Also
21.6. Known Bugs
21.7. Credits
22. NNTP Patch
22.1. Patch
22.2. Introduction
22.3. Variables
22.4. Functions
22.5. Muttrc
22.6. See Also
22.7. Known Bugs
22.8. Credits
23. Notmuch Patch
23.1. Patch
23.2. Introduction
23.3. Using NotMuch
23.4. Variables
23.5. Functions
23.6. Commands
23.7. Colors
23.8. Muttrc
23.9. See Also
23.10. Known Bugs
23.11. Credits
24. Progress Bar Patch
24.1. Patch
24.2. Introduction
24.3. Colors
24.4. Muttrc
24.5. See Also
24.6. Known Bugs
24.7. Credits
25. Quasi-Delete Patch
25.1. Patch
25.2. Introduction
25.3. Functions
25.4. Muttrc
25.5. See Also
25.6. Known Bugs
25.7. Credits
26. Sidebar Patch
26.1. Patch
26.2. Introduction
26.3. Variables
26.4. Functions
26.5. Commands
26.6. Colors
26.7. Sort
26.8. Muttrc
26.9. See Also
26.10. Known Bugs
26.11. Credits
27. Skip-Quoted Patch
27.1. Patch
27.2. Introduction
27.3. Variables
27.4. Muttrc
27.5. See Also
27.6. Known Bugs
27.7. Credits
28. smime-encrypt-self Patch
28.1. Patch
28.2. Introduction
28.3. Variables
28.4. Muttrc
28.5. See Also
28.6. Known Bugs
28.7. Credits
29. Status Color Patch
29.1. Patch
29.2. Introduction
29.3. Commands
29.4. Colors
29.5. Muttrc
29.6. See Also
29.7. Known Bugs
29.8. Credits
30. Timeout Patch
30.1. Patch
30.2. Introduction
30.3. Commands
30.4. Muttrc
30.5. See Also
30.6. Known Bugs
30.7. Credits
31. TLS-SNI Patch
31.1. Patch
31.2. Introduction
31.3. Muttrc
31.4. See Also
31.5. Known Bugs
31.6. Credits
32. Trash Folder Patch
32.1. Patch
32.2. Introduction
32.3. Variables
32.4. Functions
32.5. Muttrc
32.6. See Also
32.7. Known Bugs
32.8. Credits
33. Sensible-Browser Patch
33.1. Patch
33.2. Introduction
33.3. Muttrc
33.4. See Also
33.5. Known Bugs
33.6. 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_nosubject
3.2. abort_unmodified
3.3. alias_file
3.4. alias_format
3.5. allow_8bit
3.6. allow_ansi
3.7. arrow_cursor
3.8. ascii_chars
3.9. askbcc
3.10. askcc
3.11. ask_follow_up
3.12. ask_x_comment_to
3.13. assumed_charset
3.14. attach_charset
3.15. attach_format
3.16. attach_sep
3.17. attach_split
3.18. attribution
3.19. auto_tag
3.20. autoedit
3.21. beep
3.22. new_mail_command
3.23. beep_new
3.24. bounce
3.25. bounce_delivered
3.26. braille_friendly
3.27. catchup_newsgroup
3.28. certificate_file
3.29. charset
3.30. check_mbox_size
3.31. check_new
3.32. collapse_unread
3.33. compose_format
3.34. config_charset
3.35. confirmappend
3.36. confirmcreate
3.37. connect_timeout
3.38. content_type
3.39. copy
3.40. crypt_autoencrypt
3.41. crypt_autopgp
3.42. crypt_autosign
3.43. crypt_autosmime
3.44. crypt_confirmhook
3.45. crypt_opportunistic_encrypt
3.46. crypt_replyencrypt
3.47. crypt_replysign
3.48. crypt_replysignencrypted
3.49. crypt_timestamp
3.50. crypt_use_gpgme
3.51. crypt_use_pka
3.52. crypt_verify_sig
3.53. date_format
3.54. default_hook
3.55. delete
3.56. delete_untag
3.57. digest_collapse
3.58. display_filter
3.59. dotlock_program
3.60. dsn_notify
3.61. dsn_return
3.62. duplicate_threads
3.63. edit_headers
3.64. editor
3.65. encode_from
3.66. envelope_from_address
3.67. escape
3.68. fast_reply
3.69. fcc_attach
3.70. fcc_clear
3.71. folder
3.72. folder_format
3.73. followup_to
3.74. followup_to_poster
3.75. force_name
3.76. forward_decode
3.77. forward_decrypt
3.78. forward_edit
3.79. forward_format
3.80. forward_quote
3.81. from
3.82. gecos_mask
3.83. group_index_format
3.84. hdrs
3.85. header
3.86. header_cache
3.87. header_cache_compress
3.88. help
3.89. hidden_host
3.90. hide_limited
3.91. hide_missing
3.92. hide_thread_subject
3.93. hide_top_limited
3.94. hide_top_missing
3.95. history
3.96. history_file
3.97. honor_disposition
3.98. honor_followup_to
3.99. hostname
3.100. idn_decode
3.101. idn_encode
3.102. ignore_linear_white_space
3.103. ignore_list_reply_to
3.104. imap_authenticators
3.105. imap_check_subscribed
3.106. imap_delim_chars
3.107. imap_headers
3.108. imap_idle
3.109. imap_keepalive
3.110. imap_list_subscribed
3.111. imap_login
3.112. imap_pass
3.113. imap_passive
3.114. imap_peek
3.115. imap_pipeline_depth
3.116. imap_servernoise
3.117. imap_user
3.118. implicit_autoview
3.119. include
3.120. include_onlyfirst
3.121. indent_string
3.122. index_format
3.123. inews
3.124. ispell
3.125. keep_flagged
3.126. keywords_legacy
3.127. keywords_standard
3.128. locale
3.129. mail_check
3.130. mail_check_recent
3.131. mail_check_stats
3.132. mail_check_stats_interval
3.133. mailcap_path
3.134. mailcap_sanitize
3.135. maildir_header_cache_verify
3.136. maildir_trash
3.137. maildir_check_cur
3.138. mark_old
3.139. markers
3.140. mask
3.141. mbox
3.142. mbox_type
3.143. menu_context
3.144. menu_move_off
3.145. menu_scroll
3.146. message_cache_clean
3.147. message_cachedir
3.148. message_format
3.149. meta_key
3.150. metoo
3.151. mh_purge
3.152. mh_seq_flagged
3.153. mh_seq_replied
3.154. mh_seq_unseen
3.155. mime_forward
3.156. mime_forward_decode
3.157. mime_forward_rest
3.158. mime_subject
3.159. mix_entry_format
3.160. mixmaster
3.161. move
3.162. narrow_tree
3.163. net_inc
3.164. news_cache_dir
3.165. news_server
3.166. newsgroups_charset
3.167. newsrc
3.168. nntp_authenticators
3.169. nntp_context
3.170. nntp_listgroup
3.171. nntp_load_description
3.172. nntp_user
3.173. nntp_pass
3.174. nntp_poll
3.175. nm_open_timeout
3.176. nm_default_uri
3.177. nm_hidden_tags
3.178. nm_exclude_tags
3.179. nm_unread_tag
3.180. nm_db_limit
3.181. nm_query_type
3.182. nm_record
3.183. nm_record_tags
3.184. pager
3.185. pager_context
3.186. pager_format
3.187. pager_index_lines
3.188. pager_stop
3.189. pgp_auto_decode
3.190. pgp_autoinline
3.191. pgp_check_exit
3.192. pgp_clearsign_command
3.193. pgp_decode_command
3.194. pgp_decrypt_command
3.195. pgp_decryption_okay
3.196. pgp_encrypt_only_command
3.197. pgp_encrypt_sign_command
3.198. pgp_entry_format
3.199. pgp_export_command
3.200. pgp_getkeys_command
3.201. pgp_good_sign
3.202. pgp_ignore_subkeys
3.203. pgp_import_command
3.204. pgp_list_pubring_command
3.205. pgp_list_secring_command
3.206. pgp_long_ids
3.207. pgp_mime_auto
3.208. pgp_replyinline
3.209. pgp_retainable_sigs
3.210. pgp_show_unusable
3.211. pgp_sign_as
3.212. pgp_sign_command
3.213. pgp_sort_keys
3.214. pgp_strict_enc
3.215. pgp_timeout
3.216. pgp_use_gpg_agent
3.217. pgp_verify_command
3.218. pgp_verify_key_command
3.219. pipe_decode
3.220. pipe_sep
3.221. pipe_split
3.222. pop_auth_try_all
3.223. pop_authenticators
3.224. pop_checkinterval
3.225. pop_delete
3.226. pop_host
3.227. pop_last
3.228. pop_pass
3.229. pop_reconnect
3.230. pop_user
3.231. post_indent_string
3.232. post_moderated
3.233. postpone
3.234. postponed
3.235. postpone_encrypt
3.236. postpone_encrypt_as
3.237. preconnect
3.238. print
3.239. print_command
3.240. print_decode
3.241. print_split
3.242. prompt_after
3.243. query_command
3.244. query_format
3.245. quit
3.246. quote_regexp
3.247. read_inc
3.248. read_only
3.249. realname
3.250. recall
3.251. record
3.252. reflow_space_quotes
3.253. reflow_text
3.254. reflow_wrap
3.255. reply_regexp
3.256. reply_self
3.257. reply_to
3.258. resolve
3.259. resume_draft_files
3.260. resume_edited_draft_files
3.261. reverse_alias
3.262. reverse_name
3.263. reverse_realname
3.264. rfc2047_parameters
3.265. save_address
3.266. save_empty
3.267. save_history
3.268. save_name
3.269. score
3.270. score_threshold_delete
3.271. score_threshold_flag
3.272. score_threshold_read
3.273. search_context
3.274. send_charset
3.275. sendmail
3.276. sendmail_wait
3.277. shell
3.278. save_unsubscribed
3.279. show_new_news
3.280. show_only_unread
3.281. sidebar_divider_char
3.282. sidebar_delim_chars
3.283. sidebar_folder_indent
3.284. sidebar_format
3.285. sidebar_indent_string
3.286. sidebar_new_mail_only
3.287. sidebar_next_new_wrap
3.288. sidebar_short_path
3.289. sidebar_sort_method
3.290. sidebar_visible
3.291. sidebar_width
3.292. sig_dashes
3.293. sig_on_top
3.294. signature
3.295. simple_search
3.296. skip_quoted_offset
3.297. sleep_time
3.298. smart_wrap
3.299. smileys
3.300. smime_ask_cert_label
3.301. smime_ca_location
3.302. smime_certificates
3.303. smime_decrypt_command
3.304. smime_decrypt_use_default_key
3.305. smime_default_key
3.306. smime_encrypt_command
3.307. smime_encrypt_self
3.308. smime_encrypt_with
3.309. smime_get_cert_command
3.310. smime_get_cert_email_command
3.311. smime_get_signer_cert_command
3.312. smime_import_cert_command
3.313. smime_is_default
3.314. smime_keys
3.315. smime_pk7out_command
3.316. smime_sign_command
3.317. smime_sign_digest_alg
3.318. smime_sign_opaque_command
3.319. smime_timeout
3.320. smime_verify_command
3.321. smime_verify_opaque_command
3.322. smtp_authenticators
3.323. smtp_pass
3.324. smtp_url
3.325. sort
3.326. sort_alias
3.327. sort_aux
3.328. sort_browser
3.329. sort_re
3.330. spam_separator
3.331. spoolfile
3.332. ssl_ca_certificates_file
3.333. ssl_client_cert
3.334. ssl_force_tls
3.335. ssl_min_dh_prime_bits
3.336. ssl_starttls
3.337. ssl_use_sslv3
3.338. ssl_use_tlsv1
3.339. ssl_use_tlsv1_1
3.340. ssl_use_tlsv1_2
3.341. ssl_verify_dates
3.342. ssl_verify_host
3.343. ssl_ciphers
3.344. status_chars
3.345. status_format
3.346. status_on_top
3.347. strict_threads
3.348. suspend
3.349. text_flowed
3.350. thorough_search
3.351. thread_received
3.352. tilde
3.353. time_inc
3.354. timeout
3.355. tmpdir
3.356. to_chars
3.357. ts_icon_format
3.358. ts_enabled
3.359. ts_status_format
3.360. trash
3.361. tunnel
3.362. uncollapse_jump
3.363. use_8bitmime
3.364. use_domain
3.365. use_envelope_from
3.366. use_from
3.367. use_ipv6
3.368. user_agent
3.369. visual
3.370. vfolder_format
3.371. virtual_spoolfile
3.372. wait_key
3.373. weed
3.374. wrap
3.375. wrap_headers
3.376. wrap_search
3.377. wrapmargin
3.378. write_bcc
3.379. write_inc
3.380. xlabel_delimiter
3.381. 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. Not all Hooks are Required
6.2. Potential Formatting Scheme
6.3. Date Formatting Codes
6.4. Example Date Tests
6.5. Example 1
6.6. Example 2
6.7. Index Colors
6.8. Keywords Variables
6.9. Keyword Functions
6.10. Keywords Sort
6.11. Limit-Current-Thread Functions
6.12. New Mail Command Variables
6.13. NNTP Variables
6.14. NNTP Functions
6.15. Notmuch Variables
6.16. Notmuch Functions
6.17. Index Colors
6.18. Progress Colors
6.19. Quasi-Delete Functions
6.20. Sidebar Variables
6.21. Sidebar Functions
6.22. Sidebar Colors
6.23. Sidebar Sort
6.24. Skip-Quoted Variables
6.25. smime-encrypt-self Variables
6.26. Status Colors
6.27. Trash Variables
6.28. 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