1
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 4. Advanced Usage</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="index.html" title="The Mutt E-Mail Client" /><link rel="up" href="index.html" title="The Mutt E-Mail Client" /><link rel="prev" href="configuration.html" title="Chapter 3. Configuration" /><link rel="next" href="mimesupport.html" title="Chapter 5. Mutt's MIME Support" /><style xmlns="" type="text/css">
3
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 4. Advanced Usage</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><link rel="home" href="index.html" title="The Mutt E-Mail Client" /><link rel="up" href="index.html" title="The Mutt E-Mail Client" /><link rel="prev" href="configuration.html" title="Chapter 3. Configuration" /><link rel="next" href="mimesupport.html" title="Chapter 5. Mutt's MIME Support" /><style xmlns="" type="text/css">
4
4
body { margin-left:2%; margin-right:2%; font-family:serif; }
5
5
.toc, .list-of-tables, .list-of-examples { font-family:sans-serif; }
6
6
h1, h2, h3, h4, h5, h6 { font-family:sans-serif; }
7
em.replaceable code { font-family:sans-serif; }
8
7
p { text-align:justify; }
9
8
div.table p.title, div.example p.title { font-size:smaller; font-family:sans-serif; }
10
9
.email, .email a { font-family:monospace; }
11
div.table-contents table { border-collapse:collapse; border:1px solid #c0c0c0; }
12
div.table-contents table td, div.table-contents table th { padding:5px; text-align:left; }
13
div.table-contents table th {
10
div.table-contents table, div.informaltable table { border-collapse:collapse; border:1px solid #c0c0c0; }
11
div.table-contents table td, div.informaltable td, div.table-contents table th, div.informaltable table th { padding:5px; text-align:left; }
12
div.table-contents table th, div.informaltable table th {
14
13
font-family:sans-serif;
15
14
background:#d0d0d0;
16
15
font-weight:normal;
17
16
vertical-align:top;
19
pre.screen, div.note { background:#f0f0f0; border:1px solid #c0c0c0; padding:5px; }
18
div.cmdsynopsis { border-left:1px solid #707070; padding-left:5px; }
19
li div.cmdsynopsis { border-left:none; padding-left:0px; }
20
pre.screen, div.note { background:#f0f0f0; border:1px solid #c0c0c0; padding:5px; margin-left:2%; margin-right:2%; }
21
div.example p.title { margin-left:2%; }
20
22
div.note h3 { font-size:small; font-style:italic; font-variant: small-caps; }
21
23
div.note h3:after { content: ":" }
22
24
div.note { margin-bottom: 5px; }
25
strong.command { font-family: monospace; font-weight: normal; }
26
tr { vertical-align: top; }
24
</style></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 4. Advanced Usage</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="configuration.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="mimesupport.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="advancedusage"></a>Chapter 4. Advanced Usage</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="advancedusage.html#regexp">1. Regular Expressions</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#patterns">2. Patterns: Searching, Limiting and Tagging</a></span></dt><dd><dl><dt><span class="sect2"><a href="advancedusage.html#patterns-modifier">2.1. Pattern Modifier</a></span></dt><dt><span class="sect2"><a href="advancedusage.html#simple-patterns">2.2. Simple Patterns</a></span></dt><dt><span class="sect2"><a href="advancedusage.html#complex-patterns">2.3. Complex Patterns</a></span></dt><dt><span class="sect2"><a href="advancedusage.html#date-patterns">2.4. Searching by Date</a></span></dt></dl></dd><dt><span class="sect1"><a href="advancedusage.html#tags">3. Using Tags</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#hooks">4. Using Hooks</a></span></dt><dd><dl><dt><span class="sect2"><a href="advancedusage.html#pattern-hook">4.1. Message Matching in Hooks</a></span></dt></dl></dd><dt><span class="sect1"><a href="advancedusage.html#query">5. External Address Queries</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#mailbox-formats">6. Mailbox Formats</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#shortcuts">7. Mailbox Shortcuts</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#using-lists">8. Handling Mailing Lists</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#handling-folders">9. Handling multiple folders</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#editing-threads">10. Editing threads</a></span></dt><dd><dl><dt><span class="sect2"><a href="advancedusage.html#link-threads">10.1. Linking threads</a></span></dt><dt><span class="sect2"><a href="advancedusage.html#break-threads">10.2. Breaking threads</a></span></dt></dl></dd><dt><span class="sect1"><a href="advancedusage.html#dsn">11. Delivery Status Notification (DSN) Support</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#urlview">12. Start a WWW Browser on URLs</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="regexp"></a>1. Regular Expressions</h2></div></div></div><p>
28
</style></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 4. Advanced Usage</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="configuration.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="mimesupport.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="advancedusage"></a>Chapter 4. Advanced Usage</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="advancedusage.html#regexp">1. Regular Expressions</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#patterns">2. Patterns: Searching, Limiting and Tagging</a></span></dt><dd><dl><dt><span class="sect2"><a href="advancedusage.html#patterns-modifier">2.1. Pattern Modifier</a></span></dt><dt><span class="sect2"><a href="advancedusage.html#simple-searches">2.2. Simple Searches</a></span></dt><dt><span class="sect2"><a href="advancedusage.html#complex-patterns">2.3. Nesting and Boolean Operators</a></span></dt><dt><span class="sect2"><a href="advancedusage.html#date-patterns">2.4. Searching by Date</a></span></dt></dl></dd><dt><span class="sect1"><a href="advancedusage.html#tags">3. Using Tags</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#hooks">4. Using Hooks</a></span></dt><dd><dl><dt><span class="sect2"><a href="advancedusage.html#pattern-hook">4.1. Message Matching in Hooks</a></span></dt></dl></dd><dt><span class="sect1"><a href="advancedusage.html#query">5. External Address Queries</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#mailbox-formats">6. Mailbox Formats</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#shortcuts">7. Mailbox Shortcuts</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#using-lists">8. Handling Mailing Lists</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#handling-folders">9. Handling multiple folders</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#editing-threads">10. Editing Threads</a></span></dt><dd><dl><dt><span class="sect2"><a href="advancedusage.html#link-threads">10.1. Linking Threads</a></span></dt><dt><span class="sect2"><a href="advancedusage.html#break-threads">10.2. Breaking Threads</a></span></dt></dl></dd><dt><span class="sect1"><a href="advancedusage.html#dsn">11. Delivery Status Notification (DSN) Support</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#urlview">12. Start a WWW Browser on URLs</a></span></dt><dt><span class="sect1"><a href="advancedusage.html#misc-topics">13. Miscellany</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="regexp"></a>1. Regular Expressions</h2></div></div></div><p>
25
29
All string patterns in Mutt including those in more complex
26
30
<a class="link" href="advancedusage.html#patterns" title="2. Patterns: Searching, Limiting and Tagging">patterns</a> must be specified
27
31
using regular expressions (regexp) in the “<span class="quote">POSIX extended</span>” syntax (which
113
117
precedence over alternation. A whole subexpression may be enclosed in
114
118
parentheses to override these precedence rules.
115
119
</p><div class="note"><h3 class="title">Note</h3><p>
116
If you compile Mutt with the GNU <span class="emphasis"><em>rx</em></span> package, the
120
If you compile Mutt with the included regular expression engine, the
117
121
following operators may also be used in regular expressions as described in <a class="xref" href="advancedusage.html#regex-gnu-ext" title="Table 4.3. GNU regular expression extensions">Table 4.3, “GNU regular expression extensions”</a>.
118
122
</p></div><div class="table"><a id="regex-gnu-ext"></a><p class="title"><b>Table 4.3. GNU regular expression extensions</b></p><div class="table-contents"><table summary="GNU regular expression extensions" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Expression</th><th>Description</th></tr></thead><tbody><tr><td>\\y</td><td>Matches the empty string at either the beginning or the end of a word</td></tr><tr><td>\\B</td><td>Matches the empty string within a word</td></tr><tr><td>\\<</td><td>Matches the empty string at the beginning of a word</td></tr><tr><td>\\></td><td>Matches the empty string at the end of a word</td></tr><tr><td>\\w</td><td>Matches any word-constituent character (letter, digit, or underscore)</td></tr><tr><td>\\W</td><td>Matches any character that is not word-constituent</td></tr><tr><td>\\`</td><td>Matches the empty string at the beginning of a buffer (string)</td></tr><tr><td>\\'</td><td>Matches the empty string at the end of a buffer</td></tr></tbody></table></div></div><br class="table-break" /><p>
119
123
Please note however that these operators are not defined by POSIX, so
120
124
they may or may not be available in stock libraries on various systems.
121
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="patterns"></a>2. Patterns: Searching, Limiting and Tagging</h2></div></div></div><p>
125
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="patterns"></a>2. Patterns: Searching, Limiting and Tagging</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="patterns-modifier"></a>2.1. Pattern Modifier</h3></div></div></div><p>
122
126
Many of Mutt's commands allow you to specify a pattern to match
123
127
(<code class="literal">limit</code>, <code class="literal">tag-pattern</code>,
124
128
<code class="literal">delete-pattern</code>, etc.). <a class="xref" href="advancedusage.html#tab-patterns" title="Table 4.4. Pattern modifiers">Table 4.4, “Pattern modifiers”</a>
125
129
shows several ways to select messages.
126
</p><div class="table"><a id="tab-patterns"></a><p class="title"><b>Table 4.4. Pattern modifiers</b></p><div class="table-contents"><table summary="Pattern modifiers" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Pattern modifier</th><th>Description</th></tr></thead><tbody><tr><td>~A</td><td>all messages</td></tr><tr><td>~b <span class="emphasis"><em>EXPR</em></span></td><td>messages which contain <span class="emphasis"><em>EXPR</em></span> in the message body</td></tr><tr><td>=b <span class="emphasis"><em>STRING</em></span></td><td>messages which contain <span class="emphasis"><em>STRING</em></span> in the message body. If IMAP is enabled, searches for <span class="emphasis"><em>STRING</em></span> on the server, rather than downloading each message and searching it locally.</td></tr><tr><td>~B <span class="emphasis"><em>EXPR</em></span></td><td>messages which contain <span class="emphasis"><em>EXPR</em></span> in the whole message</td></tr><tr><td>~c <span class="emphasis"><em>EXPR</em></span></td><td>messages carbon-copied to <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>%c <span class="emphasis"><em>GROUP</em></span></td><td>messages carbon-copied to any member of <span class="emphasis"><em>GROUP</em></span></td></tr><tr><td>~C <span class="emphasis"><em>EXPR</em></span></td><td>messages either to: or cc: <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>%C <span class="emphasis"><em>GROUP</em></span></td><td>messages either to: or cc: to any member of <span class="emphasis"><em>GROUP</em></span></td></tr><tr><td>~d [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages with “<span class="quote">date-sent</span>” in a Date range</td></tr><tr><td>~D</td><td>deleted messages</td></tr><tr><td>~e <span class="emphasis"><em>EXPR</em></span></td><td>messages which contains <span class="emphasis"><em>EXPR</em></span> in the “<span class="quote">Sender</span>” field</td></tr><tr><td>%e <span class="emphasis"><em>GROUP</em></span></td><td>messages which contain a member of <span class="emphasis"><em>GROUP</em></span> in the “<span class="quote">Sender</span>” field</td></tr><tr><td>~E</td><td>expired messages</td></tr><tr><td>~F</td><td>flagged messages</td></tr><tr><td>~f <span class="emphasis"><em>EXPR</em></span></td><td>messages originating from <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>%f <span class="emphasis"><em>GROUP</em></span></td><td>messages originating from any member of <span class="emphasis"><em>GROUP</em></span></td></tr><tr><td>~g</td><td>cryptographically signed messages</td></tr><tr><td>~G</td><td>cryptographically encrypted messages</td></tr><tr><td>~h <span class="emphasis"><em>EXPR</em></span></td><td>messages which contain <span class="emphasis"><em>EXPR</em></span> in the message header</td></tr><tr><td>~H <span class="emphasis"><em>EXPR</em></span></td><td>messages with a spam attribute matching <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>~i <span class="emphasis"><em>EXPR</em></span></td><td>messages which match <span class="emphasis"><em>EXPR</em></span> in the “<span class="quote">Message-ID</span>” field</td></tr><tr><td>~k</td><td>messages which contain PGP key material</td></tr><tr><td>~L <span class="emphasis"><em>EXPR</em></span></td><td>messages either originated or received by <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>%L <span class="emphasis"><em>GROUP</em></span></td><td>message either originated or received by any member of <span class="emphasis"><em>GROUP</em></span></td></tr><tr><td>~l</td><td>messages addressed to a known mailing list</td></tr><tr><td>~m [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages in the range <span class="emphasis"><em>MIN</em></span> to <span class="emphasis"><em>MAX</em></span> *)</td></tr><tr><td>~n [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages with a score in the range <span class="emphasis"><em>MIN</em></span> to <span class="emphasis"><em>MAX</em></span> *)</td></tr><tr><td>~N</td><td>new messages</td></tr><tr><td>~O</td><td>old messages</td></tr><tr><td>~p</td><td>messages addressed to you (consults alternates)</td></tr><tr><td>~P</td><td>messages from you (consults alternates)</td></tr><tr><td>~Q</td><td>messages which have been replied to</td></tr><tr><td>~r [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages with “<span class="quote">date-received</span>” in a Date range</td></tr><tr><td>~R</td><td>read messages</td></tr><tr><td>~s <span class="emphasis"><em>EXPR</em></span></td><td>messages having <span class="emphasis"><em>EXPR</em></span> in the “<span class="quote">Subject</span>” field.</td></tr><tr><td>~S</td><td>superseded messages</td></tr><tr><td>~t <span class="emphasis"><em>EXPR</em></span></td><td>messages addressed to <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>~T</td><td>tagged messages</td></tr><tr><td>~u</td><td>messages addressed to a subscribed mailing list</td></tr><tr><td>~U</td><td>unread messages</td></tr><tr><td>~v</td><td>messages part of a collapsed thread.</td></tr><tr><td>~V</td><td>cryptographically verified messages</td></tr><tr><td>~x <span class="emphasis"><em>EXPR</em></span></td><td>messages which contain <span class="emphasis"><em>EXPR</em></span> in the “<span class="quote">References</span>” field</td></tr><tr><td>~X [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages with <span class="emphasis"><em>MIN</em></span> to <span class="emphasis"><em>MAX</em></span> attachments *)</td></tr><tr><td>~y <span class="emphasis"><em>EXPR</em></span></td><td>messages which contain <span class="emphasis"><em>EXPR</em></span> in the “<span class="quote">X-Label</span>” field</td></tr><tr><td>~z [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages with a size in the range <span class="emphasis"><em>MIN</em></span> to <span class="emphasis"><em>MAX</em></span> *)</td></tr><tr><td>~=</td><td>duplicated messages (see <a class="link" href="reference.html#duplicate-threads" title="3.49. duplicate_threads">$duplicate_threads</a>)</td></tr><tr><td>~$</td><td>unreferenced messages (requires threaded view)</td></tr><tr><td>~(<span class="emphasis"><em>PATTERN</em></span>)</td><td>messages in threads
130
</p><div class="table"><a id="tab-patterns"></a><p class="title"><b>Table 4.4. Pattern modifiers</b></p><div class="table-contents"><table summary="Pattern modifiers" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Pattern modifier</th><th>Description</th></tr></thead><tbody><tr><td>~A</td><td>all messages</td></tr><tr><td>~b <span class="emphasis"><em>EXPR</em></span></td><td>messages which contain <span class="emphasis"><em>EXPR</em></span> in the message body</td></tr><tr><td>=b <span class="emphasis"><em>STRING</em></span></td><td>messages which contain <span class="emphasis"><em>STRING</em></span> in the message body. If IMAP is enabled, searches for <span class="emphasis"><em>STRING</em></span> on the server, rather than downloading each message and searching it locally.</td></tr><tr><td>~B <span class="emphasis"><em>EXPR</em></span></td><td>messages which contain <span class="emphasis"><em>EXPR</em></span> in the whole message</td></tr><tr><td>~c <span class="emphasis"><em>EXPR</em></span></td><td>messages carbon-copied to <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>%c <span class="emphasis"><em>GROUP</em></span></td><td>messages carbon-copied to any member of <span class="emphasis"><em>GROUP</em></span></td></tr><tr><td>~C <span class="emphasis"><em>EXPR</em></span></td><td>messages either to: or cc: <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>%C <span class="emphasis"><em>GROUP</em></span></td><td>messages either to: or cc: to any member of <span class="emphasis"><em>GROUP</em></span></td></tr><tr><td>~d [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages with “<span class="quote">date-sent</span>” in a Date range</td></tr><tr><td>~D</td><td>deleted messages</td></tr><tr><td>~e <span class="emphasis"><em>EXPR</em></span></td><td>messages which contains <span class="emphasis"><em>EXPR</em></span> in the “<span class="quote">Sender</span>” field</td></tr><tr><td>%e <span class="emphasis"><em>GROUP</em></span></td><td>messages which contain a member of <span class="emphasis"><em>GROUP</em></span> in the “<span class="quote">Sender</span>” field</td></tr><tr><td>~E</td><td>expired messages</td></tr><tr><td>~F</td><td>flagged messages</td></tr><tr><td>~f <span class="emphasis"><em>EXPR</em></span></td><td>messages originating from <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>%f <span class="emphasis"><em>GROUP</em></span></td><td>messages originating from any member of <span class="emphasis"><em>GROUP</em></span></td></tr><tr><td>~g</td><td>cryptographically signed messages</td></tr><tr><td>~G</td><td>cryptographically encrypted messages</td></tr><tr><td>~h <span class="emphasis"><em>EXPR</em></span></td><td>messages which contain <span class="emphasis"><em>EXPR</em></span> in the message header</td></tr><tr><td>~H <span class="emphasis"><em>EXPR</em></span></td><td>messages with a spam attribute matching <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>~i <span class="emphasis"><em>EXPR</em></span></td><td>messages which match <span class="emphasis"><em>EXPR</em></span> in the “<span class="quote">Message-ID</span>” field</td></tr><tr><td>~k</td><td>messages which contain PGP key material</td></tr><tr><td>~L <span class="emphasis"><em>EXPR</em></span></td><td>messages either originated or received by <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>%L <span class="emphasis"><em>GROUP</em></span></td><td>message either originated or received by any member of <span class="emphasis"><em>GROUP</em></span></td></tr><tr><td>~l</td><td>messages addressed to a known mailing list</td></tr><tr><td>~m [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages in the range <span class="emphasis"><em>MIN</em></span> to <span class="emphasis"><em>MAX</em></span> *)</td></tr><tr><td>~n [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages with a score in the range <span class="emphasis"><em>MIN</em></span> to <span class="emphasis"><em>MAX</em></span> *)</td></tr><tr><td>~N</td><td>new messages</td></tr><tr><td>~O</td><td>old messages</td></tr><tr><td>~p</td><td>messages addressed to you (consults <span class="command"><strong>alternates</strong></span>)</td></tr><tr><td>~P</td><td>messages from you (consults <span class="command"><strong>alternates</strong></span>)</td></tr><tr><td>~Q</td><td>messages which have been replied to</td></tr><tr><td>~r [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages with “<span class="quote">date-received</span>” in a Date range</td></tr><tr><td>~R</td><td>read messages</td></tr><tr><td>~s <span class="emphasis"><em>EXPR</em></span></td><td>messages having <span class="emphasis"><em>EXPR</em></span> in the “<span class="quote">Subject</span>” field.</td></tr><tr><td>~S</td><td>superseded messages</td></tr><tr><td>~t <span class="emphasis"><em>EXPR</em></span></td><td>messages addressed to <span class="emphasis"><em>EXPR</em></span></td></tr><tr><td>~T</td><td>tagged messages</td></tr><tr><td>~u</td><td>messages addressed to a subscribed mailing list</td></tr><tr><td>~U</td><td>unread messages</td></tr><tr><td>~v</td><td>messages part of a collapsed thread.</td></tr><tr><td>~V</td><td>cryptographically verified messages</td></tr><tr><td>~x <span class="emphasis"><em>EXPR</em></span></td><td>messages which contain <span class="emphasis"><em>EXPR</em></span> in the “<span class="quote">References</span>” or “<span class="quote">In-Reply-To</span>” field</td></tr><tr><td>~X [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages with <span class="emphasis"><em>MIN</em></span> to <span class="emphasis"><em>MAX</em></span> attachments *)</td></tr><tr><td>~y <span class="emphasis"><em>EXPR</em></span></td><td>messages which contain <span class="emphasis"><em>EXPR</em></span> in the “<span class="quote">X-Label</span>” field</td></tr><tr><td>~z [<span class="emphasis"><em>MIN</em></span>]-[<span class="emphasis"><em>MAX</em></span>]</td><td>messages with a size in the range <span class="emphasis"><em>MIN</em></span> to <span class="emphasis"><em>MAX</em></span> *) **)</td></tr><tr><td>~=</td><td>duplicated messages (see <a class="link" href="reference.html#duplicate-threads" title="3.56. duplicate_threads">$duplicate_threads</a>)</td></tr><tr><td>~$</td><td>unreferenced messages (requires threaded view)</td></tr><tr><td>~(<span class="emphasis"><em>PATTERN</em></span>)</td><td>messages in threads
127
131
containing messages matching <span class="emphasis"><em>PATTERN</em></span>, e.g. all
128
132
threads containing messages from you: ~(~P)</td></tr></tbody></table></div></div><br class="table-break" /><p>
129
133
Where <span class="emphasis"><em>EXPR</em></span> is a
130
<a class="link" href="advancedusage.html#regexp" title="1. Regular Expressions">regular expression</a>. Special attention has to be
131
made when using regular expressions inside of patterns. Specifically,
134
<a class="link" href="advancedusage.html#regexp" title="1. Regular Expressions">regular expression</a>.
136
*) The forms “<span class="quote"><[<span class="emphasis"><em>MAX</em></span>]</span>”, “<span class="quote">>[<span class="emphasis"><em>MIN</em></span>]</span>”,
137
“<span class="quote">[<span class="emphasis"><em>MIN</em></span>]-</span>” and “<span class="quote">-[<span class="emphasis"><em>MAX</em></span>]</span>”
140
**) The suffixes “<span class="quote">K</span>” and “<span class="quote">M</span>” are allowed to specify kilobyte and megabyte respectively.
142
Special attention has to be
143
payed when using regular expressions inside of patterns. Specifically,
132
144
Mutt's parser for these patterns will strip one level of backslash (“<span class="quote">\</span>”),
133
145
which is normally used for quoting. If it is your intention to use a
134
146
backslash in the regular expression, you will need to use two backslashes
135
instead (“<span class="quote">\\</span>”). You can force mutt to treat <span class="emphasis"><em>EXPR</em></span> as a simple string
147
instead (“<span class="quote">\\</span>”). You can force Mutt to treat <span class="emphasis"><em>EXPR</em></span> as a simple string
136
148
instead of a regular expression by using = instead of ˜ in the
137
149
pattern name. For example, <code class="literal">=b *.*</code> will find all messages that contain
138
150
the literal string “<span class="quote">*.*</span>”. Simple string matches are less powerful than
139
151
regular expressions but can be considerably faster. This is especially
140
152
true for IMAP folders, because string matches can be performed on the
141
153
server instead of by fetching every message. IMAP treats <code class="literal">=h</code> specially:
142
it must be of the form "header: substring" and will not partially
154
it must be of the form “<span class="quote">header: substring</span>” and will not partially
143
155
match header names. The substring part may be omitted if you simply
144
156
wish to find messages containing a particular header without regard to
147
*) The forms “<span class="quote"><[<span class="emphasis"><em>MAX</em></span>]</span>”, “<span class="quote">>[<span class="emphasis"><em>MIN</em></span>]</span>”,
148
“<span class="quote">[<span class="emphasis"><em>MIN</em></span>]-</span>” and “<span class="quote">-[<span class="emphasis"><em>MAX</em></span>]</span>”
150
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="patterns-modifier"></a>2.1. Pattern Modifier</h3></div></div></div><div class="note"><h3 class="title">Note</h3><p>
151
Note that patterns matching 'lists' of addresses (notably c, C, p, P and t)
159
Patterns matching lists of addresses (notably c, C, p, P and t)
152
160
match if there is at least one match in the whole list. If you want to
153
161
make sure that all elements of that list match, you need to prefix your
154
162
pattern with “<span class="quote">^</span>”.
155
163
This example matches all mails which only has recipients from Germany.
156
</p></div><pre class="screen">
164
</p><div class="example"><a id="ex-recips"></a><p class="title"><b>Example 4.1. Matching all addresses in address lists</b></p><div class="example-contents"><pre class="screen">
158
</pre></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="simple-patterns"></a>2.2. Simple Patterns</h3></div></div></div><p>
159
Mutt supports two versions of so called “<span class="quote">simple searches</span>” which are
166
</pre></div></div><br class="example-break" /></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="simple-searches"></a>2.2. Simple Searches</h3></div></div></div><p>
167
Mutt supports two versions of so called “<span class="quote">simple searches</span>”. These are
160
168
issued if the query entered for searching, limiting and similar
161
operations does not seem to be a valid pattern (i.e. it does not contain
169
operations does not seem to contain a valid pattern modifier (i.e. it does not contain
162
170
one of these characters: “<span class="quote">˜</span>”, “<span class="quote">=</span>” or “<span class="quote">%</span>”). If the query is
163
171
supposed to contain one of these special characters, they must be escaped
164
172
by prepending a backslash (“<span class="quote">\</span>”).
169
177
If a keyword would conflict with your search keyword, you need to turn
170
178
it into a regular expression to avoid matching the keyword table. For
171
179
example, if you want to find all messages matching “<span class="quote">flag</span>”
172
(using <a class="link" href="reference.html#simple-search" title="3.264. simple_search">$simple_search</a>)
180
(using <a class="link" href="reference.html#simple-search" title="3.236. simple_search">$simple_search</a>)
173
181
but don't want to match flagged messages, simply search for
174
182
“<span class="quote"><code class="literal">[f]lag</code></span>”.
175
183
</p><div class="table"><a id="tab-simplesearch-keywords"></a><p class="title"><b>Table 4.5. Simple search keywords</b></p><div class="table-contents"><table summary="Simple search keywords" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Keyword</th><th>Pattern modifier</th></tr></thead><tbody><tr><td>all</td><td>~A</td></tr><tr><td>.</td><td>~A</td></tr><tr><td>^</td><td>~A</td></tr><tr><td>del</td><td>~D</td></tr><tr><td>flag</td><td>~F</td></tr><tr><td>new</td><td>~N</td></tr><tr><td>old</td><td>~O</td></tr><tr><td>repl</td><td>~Q</td></tr><tr><td>read</td><td>~R</td></tr><tr><td>tag</td><td>~T</td></tr><tr><td>unread</td><td>~U</td></tr></tbody></table></div></div><br class="table-break" /><p>
176
184
The second type of simple search is to build a complex search
177
pattern using <a class="link" href="reference.html#simple-search" title="3.264. simple_search">$simple_search</a>
185
pattern using <a class="link" href="reference.html#simple-search" title="3.236. simple_search">$simple_search</a>
178
186
as a template. Mutt will insert your query properly quoted and search
179
187
for the composed complex query.
180
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="complex-patterns"></a>2.3. Complex Patterns</h3></div></div></div><p>
188
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="complex-patterns"></a>2.3. Nesting and Boolean Operators</h3></div></div></div><p>
181
189
Logical AND is performed by specifying more than one criterion. For
183
191
</p><pre class="screen">
184
192
~t mutt ~f elkins
186
194
would select messages which contain the word “<span class="quote">mutt</span>” in the list of
187
recipients <span class="bold"><strong>and</strong></span> that have the word “<span class="quote">elkins</span>” in the “<span class="quote">From</span>” header
195
recipients <span class="emphasis"><em>and</em></span> that have the word “<span class="quote">elkins</span>” in the “<span class="quote">From</span>” header
190
198
Mutt also recognizes the following operators to create more complex search
192
200
</p><div class="itemizedlist"><ul type="disc"><li><p>
193
! -- logical NOT operator
195
| -- logical OR operator
197
() -- logical grouping operator
201
! — logical NOT operator
203
| — logical OR operator
205
() — logical grouping operator
198
206
</p></li></ul></div><p>
199
207
Here is an example illustrating a complex search pattern. This pattern will
200
208
select all messages which do not contain “<span class="quote">mutt</span>” in the “<span class="quote">To</span>” or “<span class="quote">Cc</span>”
201
209
field and which are from “<span class="quote">elkins</span>”.
202
</p><div class="example"><a id="ex-pattern-bool"></a><p class="title"><b>Example 4.1. Using boolean operators in patterns</b></p><div class="example-contents"><pre class="screen">
210
</p><div class="example"><a id="ex-pattern-bool"></a><p class="title"><b>Example 4.2. Using boolean operators in patterns</b></p><div class="example-contents"><pre class="screen">
203
211
!(~t mutt|~c mutt) ~f elkins
204
212
</pre></div></div><br class="example-break" /><p>
205
213
Here is an example using white space in the regular expression (note
275
282
Once you have tagged the desired messages, you can use the
276
283
“<span class="quote">tag-prefix</span>” operator, which is the “<span class="quote">;</span>” (semicolon) key by default.
277
When the “<span class="quote">tag-prefix</span>” operator is used, the <span class="bold"><strong>next</strong></span> operation will
284
When the “<span class="quote">tag-prefix</span>” operator is used, the <span class="emphasis"><em>next</em></span> operation will
278
285
be applied to all tagged messages if that operation can be used in that
279
manner. If the <a class="link" href="reference.html#auto-tag" title="3.18. auto_tag">$auto_tag</a>
286
manner. If the <a class="link" href="reference.html#auto-tag" title="3.17. auto_tag">$auto_tag</a>
280
287
variable is set, the next operation applies to the tagged messages
281
288
automatically, without requiring the “<span class="quote">tag-prefix</span>”.
283
In <a class="link" href="configuration.html#macro" title="8. Keyboard macros">macros</a> or <a class="link" href="configuration.html#push" title="22. Adding key sequences to the keyboard buffer">push</a> commands,
284
you can use the “<span class="quote">tag-prefix-cond</span>” operator. If there are no tagged
285
messages, mutt will "eat" the rest of the macro to abort it's execution.
286
Mutt will stop "eating" the macro when it encounters the “<span class="quote">end-cond</span>”
287
operator; after this operator the rest of the macro will be executed as
290
In <a class="link" href="configuration.html#macro" title="8. Keyboard Macros"><span class="command"><strong>macro</strong></span>s</a> or <a class="link" href="configuration.html#push" title="22. Adding Key Sequences to the Keyboard Buffer"><span class="command"><strong>push</strong></span></a> commands,
291
you can use the <code class="literal"><tag-prefix-cond></code> operator. If there are no tagged
292
messages, Mutt will “<span class="quote">eat</span>” the rest of the macro to abort it's execution.
293
Mutt will stop “<span class="quote">eating</span>” the macro when it encounters the <code class="literal"><end-cond></code>
294
operator; after this operator the rest of the macro will be executed as
289
296
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="hooks"></a>4. Using Hooks</h2></div></div></div><p>
290
297
A <span class="emphasis"><em>hook</em></span> is a concept found in many other programs which allows you to
293
300
reading, or to whom you are sending mail. In the Mutt world, a <span class="emphasis"><em>hook</em></span>
294
301
consists of a <a class="link" href="advancedusage.html#regexp" title="1. Regular Expressions">regular expression</a> or
295
302
<a class="link" href="advancedusage.html#patterns" title="2. Patterns: Searching, Limiting and Tagging">pattern</a> along with a
296
configuration option/command. See
303
configuration option/command. See:
298
305
</p><div class="itemizedlist"><ul type="disc"><li><p>
299
<a class="link" href="configuration.html#folder-hook" title="7. Setting variables based upon mailbox">folder-hook</a>
301
<a class="link" href="configuration.html#send-hook" title="19. Change settings based upon message recipients">send-hook</a>
303
<a class="link" href="configuration.html#message-hook" title="20. Change settings before formatting a message">message-hook</a>
305
<a class="link" href="configuration.html#save-hook" title="16. Specify default save mailbox">save-hook</a>
307
<a class="link" href="configuration.html#mbox-hook" title="13. Using Multiple spool mailboxes">mbox-hook</a>
309
<a class="link" href="configuration.html#fcc-hook" title="17. Specify default Fcc: mailbox when composing">fcc-hook</a>
311
<a class="link" href="configuration.html#fcc-save-hook" title="18. Specify default save filename and default Fcc: mailbox at once">fcc-save-hook</a>
306
<a class="link" href="optionalfeatures.html#account-hook" title="6. Managing Multiple Accounts"><span class="command"><strong>account-hook</strong></span></a>
308
<a class="link" href="configuration.html#charset-hook" title="6. Defining Aliases for Character Sets"><span class="command"><strong>charset-hook</strong></span></a>
310
<a class="link" href="configuration.html#crypt-hook" title="21. Choosing the Cryptographic Key of the Recipient"><span class="command"><strong>crypt-hook</strong></span></a>
312
<a class="link" href="configuration.html#fcc-hook" title="17. Specify Default Fcc: Mailbox When Composing"><span class="command"><strong>fcc-hook</strong></span></a>
314
<a class="link" href="configuration.html#fcc-save-hook" title="18. Specify Default Save Filename and Default Fcc: Mailbox at Once"><span class="command"><strong>fcc-save-hook</strong></span></a>
316
<a class="link" href="configuration.html#folder-hook" title="7. Setting Variables Based Upon Mailbox"><span class="command"><strong>folder-hook</strong></span></a>
318
<a class="link" href="configuration.html#iconv-hook"><span class="command"><strong>iconv-hook</strong></span></a>
320
<a class="link" href="configuration.html#mbox-hook" title="13. Using Multiple Spool Mailboxes"><span class="command"><strong>mbox-hook</strong></span></a>
322
<a class="link" href="configuration.html#message-hook" title="20. Change Settings Before Formatting a Message"><span class="command"><strong>message-hook</strong></span></a>
324
<a class="link" href="configuration.html#reply-hook"><span class="command"><strong>reply-hook</strong></span></a>
326
<a class="link" href="configuration.html#save-hook" title="16. Specify Default Save Mailbox"><span class="command"><strong>save-hook</strong></span></a>
328
<a class="link" href="configuration.html#send-hook" title="19. Change Settings Based Upon Message Recipients"><span class="command"><strong>send-hook</strong></span></a>
330
<a class="link" href="configuration.html#send2-hook"><span class="command"><strong>send2-hook</strong></span></a>
312
331
</p></li></ul></div><p>
314
333
for specific details on each type of <span class="emphasis"><em>hook</em></span> available.
315
334
</p><div class="note"><h3 class="title">Note</h3><p>
316
335
If a hook changes configuration settings, these changes remain
317
effective until the end of the current mutt session. As this is generally
318
not desired, a default hook needs to be added before all other hooks to
319
restore configuration defaults. Here is an example with send-hook and the
321
</p></div><div class="example"><a id="ex-send-hook-my-hdr"></a><p class="title"><b>Example 4.2. Combining <code class="literal">send-hook</code> and <code class="literal">my_hdr</code></b></p><div class="example-contents"><pre class="screen">
336
effective until the end of the current Mutt session. As this is generally
337
not desired, a “<span class="quote">default</span>” hook needs to be added before all
338
other hooks of that type to restore configuration defaults.
339
</p></div><div class="example"><a id="ex-default-hook"></a><p class="title"><b>Example 4.3. Specifying a “<span class="quote">default</span>” hook</b></p><div class="example-contents"><pre class="screen">
322
340
send-hook . 'unmy_hdr From:'
323
341
send-hook ~C'^b@b\.b$' my_hdr from: c@c.c
324
</pre></div></div><br class="example-break" /><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="pattern-hook"></a>4.1. Message Matching in Hooks</h3></div></div></div><p>
325
Hooks that act upon messages (<code class="literal">message-hook, reply-hook,
326
send-hook, send2-hook, save-hook, fcc-hook</code>) are evaluated in a
342
</pre></div></div><br class="example-break" /><p>
343
In <a class="xref" href="advancedusage.html#ex-default-hook" title="Example 4.3. Specifying a default hook">Example 4.3, “Specifying a default hook”</a>, by default the value of
344
<a class="link" href="reference.html#from" title="3.75. from">$from</a>
345
and <a class="link" href="reference.html#realname" title="3.209. realname">$realname</a>
346
is not overridden. When sending messages either To: or Cc:
347
to <code class="literal"><b@b.b></code>, the From: header is changed to
348
<code class="literal"><c@c.c></code>.
349
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="pattern-hook"></a>4.1. Message Matching in Hooks</h3></div></div></div><p>
350
Hooks that act upon messages (<span class="command"><strong>message-hook</strong></span>, <span class="command"><strong>reply-hook</strong></span>,
351
<span class="command"><strong>send-hook</strong></span>, <span class="command"><strong>send2-hook</strong></span>, <span class="command"><strong>save-hook</strong></span>, <span class="command"><strong>fcc-hook</strong></span>) are evaluated in a
327
352
slightly different manner. For the other
328
353
types of hooks, a <a class="link" href="advancedusage.html#regexp" title="1. Regular Expressions">regular expression</a> is
329
354
sufficient. But in dealing with messages a finer grain of control is
385
410
The other mechanism for accessing the query function is for address
386
411
completion, similar to the alias completion. In any prompt for address
387
412
entry, you can use the <code class="literal"><complete-query></code> function (default: ^T) to run a
388
query based on the current address you have typed. Like aliases, mutt
413
query based on the current address you have typed. Like aliases, Mutt
389
414
will look for what you have typed back to the last space or comma. If
390
there is a single response for that query, mutt will expand the address
391
in place. If there are multiple responses, mutt will activate the query
415
there is a single response for that query, Mutt will expand the address
416
in place. If there are multiple responses, Mutt will activate the query
392
417
menu. At the query menu, you can select one or more addresses to be
393
418
added to the prompt.
394
419
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="mailbox-formats"></a>6. Mailbox Formats</h2></div></div></div><p>
395
Mutt supports reading and writing of four different mailbox formats:
420
Mutt supports reading and writing of four different local mailbox formats:
396
421
mbox, MMDF, MH and Maildir. The mailbox type is autodetected, so there
397
422
is no need to use a flag for different mailbox types. When creating new
398
mailboxes, Mutt uses the default specified with the <a class="link" href="reference.html#mbox-type" title="3.117. mbox_type">$mbox_type</a> variable.
423
mailboxes, Mutt uses the default specified with the
424
<a class="link" href="reference.html#mbox-type" title="3.127. mbox_type">$mbox_type</a> variable. A
425
short description of the formats follows.
400
<span class="bold"><strong>mbox</strong></span>. This is the most widely used mailbox format for UNIX. All
427
<span class="emphasis"><em>mbox</em></span>. This is a widely used mailbox format for UNIX. All
401
428
messages are stored in a single file. Each message has a line of the form:
402
429
</p><pre class="screen">
403
430
From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST
405
432
to denote the start of a new message (this is often referred to as the
406
“<span class="quote">From_</span>” line).
408
<span class="bold"><strong>MMDF</strong></span>. This is a variant of the <span class="emphasis"><em>mbox</em></span> format. Each message is
409
surrounded by lines containing “<span class="quote">^A^A^A^A</span>” (four control-A's).
411
<span class="bold"><strong>MH</strong></span>. A radical departure from <span class="emphasis"><em>mbox</em></span> and <span class="emphasis"><em>MMDF</em></span>, a mailbox
433
“<span class="quote">From_</span>” line). The mbox format requires mailbox
434
locking, is prone to mailbox corruption with concurrently writing
435
clients or misinterpreted From_ lines. Depending on the
436
environment, new mail detection can be unreliable. Mbox folders are fast
437
to open and easy to archive.
439
<span class="emphasis"><em>MMDF</em></span>. This is a variant of
440
the <span class="emphasis"><em>mbox</em></span> format. Each message is surrounded by
441
lines containing “<span class="quote">^A^A^A^A</span>” (four
442
control-A's). The same problems as for mbox apply (also with finding the
443
right message separator as four control-A's may appear in message
446
<span class="emphasis"><em>MH</em></span>. A radical departure from <span class="emphasis"><em>mbox</em></span> and <span class="emphasis"><em>MMDF</em></span>, a mailbox
412
447
consists of a directory and each message is stored in a separate file.
413
448
The filename indicates the message number (however, this is may not
414
449
correspond to the message number Mutt displays). Deleted messages are
415
renamed with a comma (,) prepended to the filename. Mutt
450
renamed with a comma (“<span class="quote">,</span>”) prepended to the filename. Mutt
416
451
detects this type of mailbox by looking for either <code class="literal">.mh_sequences</code>
417
or <code class="literal">.xmhcache</code> (needed to distinguish normal directories from MH
452
or <code class="literal">.xmhcache</code> files (needed to distinguish normal directories from MH
453
mailboxes). MH is more robust with concurrent clients writing the mailbox,
454
but still may suffer from lost flags; message corruption is less likely
455
to occur than with mbox/mmdf. It's usually slower to open compared to
456
mbox/mmdf since many small files have to be read (Mutt provides
457
<a class="xref" href="optionalfeatures.html#header-caching" title="7.1. Header Caching">Section 7.1, “Header Caching”</a> to greatly speed this process up).
458
Depending on the environment, MH is not very disk-space efficient.
420
<span class="bold"><strong>Maildir</strong></span>. The newest of the mailbox formats, used by the Qmail MTA (a
460
<span class="emphasis"><em>Maildir</em></span>. The newest of the mailbox formats, used by the Qmail MTA (a
421
461
replacement for sendmail). Similar to <span class="emphasis"><em>MH</em></span>, except that it adds three
422
462
subdirectories of the mailbox: <span class="emphasis"><em>tmp</em></span>, <span class="emphasis"><em>new</em></span> and <span class="emphasis"><em>cur</em></span>. Filenames
423
463
for the messages are chosen in such a way they are unique, even when two
424
464
programs are writing the mailbox over NFS, which means that no file locking
465
is needed and corruption is very unlikely. Maildir maybe
466
slower to open without caching in Mutt, it too is not very
467
disk-space efficient depending on the environment. Since no additional
468
files are used for metadata (which is embedded in the message filenames)
469
and Maildir is locking-free, it's easy to sync across different machines
470
using file-level synchronization tools.
426
471
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="shortcuts"></a>7. Mailbox Shortcuts</h2></div></div></div><p>
427
472
There are a number of built in shortcuts which refer to specific mailboxes.
428
473
These shortcuts can be used anywhere you are prompted for a file or mailbox
474
path or in path-related configuration variables. Note that these only
475
work at the beginning of a string.
430
476
</p><div class="itemizedlist"><ul type="disc"><li><p>
431
! -- refers to your <a class="link" href="reference.html#spoolfile" title="3.277. spoolfile">$spoolfile</a> (incoming) mailbox
433
> -- refers to your <a class="link" href="reference.html#mbox" title="3.116. mbox">$mbox</a> file
435
< -- refers to your <a class="link" href="reference.html#record" title="3.240. record">$record</a> file
437
^ -- refers to the current mailbox
439
- or !! -- refers to the file you've last visited
441
˜ -- refers to your home directory
443
= or + -- refers to your <a class="link" href="reference.html#folder" title="3.58. folder">$folder</a> directory
445
@<span class="emphasis"><em>alias</em></span> -- refers to the <a class="link" href="configuration.html#save-hook" title="16. Specify default save mailbox">default save folder</a> as determined by the address of the alias
446
</p></li></ul></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="using-lists"></a>8. Handling Mailing Lists</h2></div></div></div><p>
477
! — refers to your <a class="link" href="reference.html#spoolfile" title="3.269. spoolfile">$spoolfile</a> (incoming) mailbox
479
> — refers to your <a class="link" href="reference.html#mbox" title="3.126. mbox">$mbox</a> file
481
< — refers to your <a class="link" href="reference.html#record" title="3.211. record">$record</a> file
483
^ — refers to the current mailbox
485
- or !! — refers to the file you've last visited
487
˜ — refers to your home directory
489
= or + — refers to your <a class="link" href="reference.html#folder" title="3.66. folder">$folder</a> directory
491
@<span class="emphasis"><em>alias</em></span> — refers to the <a class="link" href="configuration.html#save-hook" title="16. Specify Default Save Mailbox">default save folder</a> as determined by the address of the alias
492
</p></li></ul></div><p>
493
For example, to store a copy of outgoing messages in the folder they
495
a <a class="link" href="configuration.html#folder-hook" title="7. Setting Variables Based Upon Mailbox"><span class="command"><strong>folder-hook</strong></span></a> can
496
be used to set <a class="link" href="reference.html#record" title="3.211. record">$record</a>:
497
</p><pre class="screen">
498
folder-hook . 'set record=^'</pre></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="using-lists"></a>8. Handling Mailing Lists</h2></div></div></div><p>
447
499
Mutt has a few configuration options that make dealing with large
448
500
amounts of mail easier. The first thing you must do is to let Mutt
449
501
know what addresses you consider to be mailing lists (technically
450
502
this does not have to be a mailing list, but that is what it is most
451
503
often used for), and what lists you are subscribed to. This is
452
accomplished through the use of the <a class="link" href="configuration.html#lists" title="12. Mailing lists">lists and subscribe</a> commands in your muttrc.
504
accomplished through the use of the <a class="link" href="configuration.html#lists" title="12. Mailing Lists"><span class="command"><strong>lists</strong></span> and <span class="command"><strong>subscribe</strong></span></a> commands in your <code class="literal">.muttrc</code>.
454
506
Now that Mutt knows what your mailing lists are, it can do several
455
507
things, the first of which is the ability to show the name of a list
456
508
through which you received a message (i.e., of a subscribed list) in
457
509
the <span class="emphasis"><em>index</em></span> menu display. This is useful to distinguish between
458
personal and list mail in the same mailbox. In the <a class="link" href="reference.html#index-format" title="3.101. index_format">$index_format</a> variable, the escape “<span class="quote">%L</span>”
459
will return the string “<span class="quote">To <list></span>” when “<span class="quote">list</span>” appears in the
510
personal and list mail in the same mailbox. In the <a class="link" href="reference.html#index-format" title="3.114. index_format">$index_format</a> variable, the expando “<span class="quote">%L</span>”
511
will print the string “<span class="quote">To <list></span>” when “<span class="quote">list</span>” appears in the
460
512
“<span class="quote">To</span>” field, and “<span class="quote">Cc <list></span>” when it appears in the “<span class="quote">Cc</span>”
461
field (otherwise it returns the name of the author).
513
field (otherwise it prints the name of the author).
463
515
Often times the “<span class="quote">To</span>” and “<span class="quote">Cc</span>” fields in mailing list messages
464
516
tend to get quite large. Most people do not bother to remove the
521
573
uninteresting threads and quickly find topics of value.
522
574
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="handling-folders"></a>9. Handling multiple folders</h2></div></div></div><p>
523
575
Mutt supports setups with multiple folders, allowing all of them to
524
be monitored for new mail (see <a class="xref" href="configuration.html#mailboxes" title="14. Monitoring incoming mail">Section 14, “Monitoring incoming mail”</a> for details).
576
be monitored for new mail (see <a class="xref" href="configuration.html#mailboxes" title="14. Monitoring Incoming Mail">Section 14, “Monitoring Incoming Mail”</a> for details).
526
578
When in the index menu and being idle (also see
527
<a class="link" href="reference.html#timeout" title="3.288. timeout">$timeout</a>), Mutt periodically checks
579
<a class="link" href="reference.html#timeout" title="3.291. timeout">$timeout</a>), Mutt periodically checks
528
580
for new mail in all folders which have been configured via the
529
<code class="literal">mailboxes</code> command. The interval depends on the folder
581
<span class="command"><strong>mailboxes</strong></span> command. The interval depends on the folder
530
582
type: for local/IMAP folders it consults
531
<a class="link" href="reference.html#mail-check" title="3.105. mail_check">$mail_check</a> and
532
<a class="link" href="reference.html#pop-checkinterval" title="3.216. pop_checkinterval">$pop_checkinterval</a>
583
<a class="link" href="reference.html#mail-check" title="3.118. mail_check">$mail_check</a> and
584
<a class="link" href="reference.html#pop-checkinterval" title="3.187. pop_checkinterval">$pop_checkinterval</a>
535
587
Outside the index menu the directory browser supports checking
536
588
for new mail using the <code class="literal"><check-new></code> function which is
537
589
unbound by default. Pressing TAB will bring up a
538
menu showing the files specified by the <code class="literal">mailboxes</code> command,
590
menu showing the files specified by the <span class="command"><strong>mailboxes</strong></span> command,
539
591
and indicate which contain new messages. Mutt will automatically enter this
540
592
mode when invoked from the command line with the <code class="literal">-y</code> option.
547
599
For the index, by default Mutt displays the number of mailboxes with new
548
600
mail in the status bar, please refer to the
549
<a class="link" href="reference.html#index-format" title="3.101. index_format">$index_format</a>
601
<a class="link" href="reference.html#status-format" title="3.282. status_format">$status_format</a>
550
602
variable for details.
552
604
When changing folders, Mutt fills the prompt with the first folder from
553
605
the mailboxes list containing new mail (if any), pressing
554
606
<span class="emphasis"><em>space</em></span> will cycle through folders with new mail.
555
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="editing-threads"></a>10. Editing threads</h2></div></div></div><p>
607
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="editing-threads"></a>10. Editing Threads</h2></div></div></div><p>
556
608
Mutt has the ability to dynamically restructure threads that are broken
557
609
either by misconfigured software or bad behavior from some
558
correspondents. This allows to clean your mailboxes formats) from these
610
correspondents. This allows to clean your mailboxes from these
559
611
annoyances which make it hard to follow a discussion.
560
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="link-threads"></a>10.1. Linking threads</h3></div></div></div><p>
561
Some mailers tend to "forget" to correctly set the "In-Reply-To:" and
562
"References:" headers when replying to a message. This results in broken
612
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="link-threads"></a>10.1. Linking Threads</h3></div></div></div><p>
613
Some mailers tend to “<span class="quote">forget</span>” to correctly set the “<span class="quote">In-Reply-To:</span>” and
614
“<span class="quote">References:</span>” headers when replying to a message. This results in broken
563
615
discussions because Mutt has not enough information to guess the correct
565
617
You can fix this by tagging the reply, then moving to the parent message
566
618
and using the <code class="literal"><link-threads></code> function (bound to & by default). The
567
reply will then be connected to this "parent" message.
619
reply will then be connected to this parent message.
569
621
You can also connect multiple children at once, tagging them and using the
570
tag-prefix command (';') or the auto_tag option.
571
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="break-threads"></a>10.2. Breaking threads</h3></div></div></div><p>
622
<code class="literal"><tag-prefix></code> command (';') or the <a class="link" href="reference.html#auto-tag" title="3.17. auto_tag">$auto_tag</a> option.
623
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="break-threads"></a>10.2. Breaking Threads</h3></div></div></div><p>
572
624
On mailing lists, some people are in the bad habit of starting a new
573
discussion by hitting "reply" to any message from the list and changing
625
discussion by hitting “<span class="quote">reply</span>” to any message from the list and changing
574
626
the subject to a totally unrelated one.
575
627
You can fix such threads by using the <code class="literal"><break-thread></code> function (bound
576
628
by default to #), which will turn the subthread starting from the
580
632
about the status of electronic mail messages. These can be thought of as
581
633
“<span class="quote">return receipts.</span>”
583
To support DSN, there are two variables. <a class="link" href="reference.html#dsn-notify" title="3.47. dsn_notify">$dsn_notify</a> is used to request receipts for
635
To support DSN, there are two variables. <a class="link" href="reference.html#dsn-notify" title="3.54. dsn_notify">$dsn_notify</a> is used to request receipts for
584
636
different results (such as failed message, message delivered, etc.).
585
<a class="link" href="reference.html#dsn-return" title="3.48. dsn_return">$dsn_return</a> requests how much
637
<a class="link" href="reference.html#dsn-return" title="3.55. dsn_return">$dsn_return</a> requests how much
586
638
of your message should be returned with the receipt (headers or full
589
When using <a class="link" href="reference.html#sendmail" title="3.258. sendmail">$sendmail</a> for mail
641
When using <a class="link" href="reference.html#sendmail" title="3.230. sendmail">$sendmail</a> for mail
590
642
delivery, you need to use either Berkeley sendmail 8.8.x (or greater) a MTA
591
643
supporting DSN command line options compatible to Sendmail: The -N and -R
592
644
options can be used by the mail client to make requests as to what type of
593
645
status messages should be returned. Please consider your MTA documentation
594
646
whether DSN is supported.
596
For SMTP delivery using <a class="link" href="reference.html#smtp-url" title="3.270. smtp_url">$smtp_url</a>, it depends on the
597
capabilities announced by the server whether mutt will attempt to
648
For SMTP delivery using <a class="link" href="reference.html#smtp-url" title="3.262. smtp_url">$smtp_url</a>, it depends on the
649
capabilities announced by the server whether Mutt will attempt to
598
650
request DSN or not.
599
651
</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="urlview"></a>12. Start a WWW Browser on URLs</h2></div></div></div><p>
600
652
If a message contains URLs, it is efficient to get
606
658
</p><pre class="screen">
607
659
macro index \cb |urlview\n
608
660
macro pager \cb |urlview\n
609
</pre></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="configuration.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="mimesupport.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 3. Configuration </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5. Mutt's MIME Support</td></tr></table></div></body></html>
661
</pre></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="misc-topics"></a>13. Miscellany</h2></div></div></div><p>
662
This section documents various features that fit nowhere else.
663
</p><div class="variablelist"><dl><dt><span class="term">
664
Address normalization
666
Mutt normalizes all e-mail addresses to the simplest form possible. If
667
an address contains a realname, the form
668
<span class="emphasis"><em>Joe User <joe@example.com></em></span> is used and the
669
pure e-mail address without angle brackets otherwise, i.e. just
670
<span class="emphasis"><em>joe@example.com</em></span>.
672
This normalization affects all headers Mutt generates including aliases.
673
</p></dd><dt><span class="term">
674
Initial folder selection
676
The folder Mutt opens at startup is determined as follows: the folder
677
specified in the <code class="literal">$MAIL</code> environment variable if
678
present. Otherwise, the value of <code class="literal">$MAILDIR</code> is taken
679
into account. If that isn't present either, Mutt takes the user's
680
mailbox in the mailspool as determined at compile-time (which may also
681
reside in the home directory). The
682
<a class="link" href="reference.html#spoolfile" title="3.269. spoolfile">$spoolfile</a> setting overrides
683
this selection. Highest priority has the mailbox given with the
684
<code class="literal">-f</code> command line option.
685
</p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="configuration.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="mimesupport.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 3. Configuration </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5. Mutt's MIME Support</td></tr></table></div></body></html>