1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
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 6. Optional features</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="mimesupport.html" title="Chapter 5. Mutt's MIME Support" /><link rel="next" href="tuning.html" title="Chapter 7. Performance tuning" /><style xmlns="" type="text/css">
4 body { margin-left:2%; margin-right:2%; font-family:serif; }
5 .toc, .list-of-tables, .list-of-examples { font-family:sans-serif; }
6 h1, h2, h3, h4, h5, h6 { font-family:sans-serif; }
7 em.replaceable code { font-family:sans-serif; }
8 p { text-align:justify; }
9 div.table p.title, div.example p.title { font-size:smaller; font-family:sans-serif; }
10 .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 {
14 font-family:sans-serif;
19 pre.screen, div.note { background:#f0f0f0; border:1px solid #c0c0c0; padding:5px; }
20 div.note h3 { font-size:small; font-style:italic; font-variant: small-caps; }
21 div.note h3:after { content: ":" }
22 div.note { margin-bottom: 5px; }
24 </style></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 6. Optional features</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mimesupport.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="tuning.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="optionalfeatures"></a>Chapter 6. Optional features</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="optionalfeatures.html#optionalfeatures-notes">1. General notes</a></span></dt><dd><dl><dt><span class="sect2"><a href="optionalfeatures.html#compile-time-features">1.1. Enabling/disabling features</a></span></dt><dt><span class="sect2"><a href="optionalfeatures.html#url-syntax">1.2. URL syntax</a></span></dt></dl></dd><dt><span class="sect1"><a href="optionalfeatures.html#ssl">2. SSL/TLS Support</a></span></dt><dt><span class="sect1"><a href="optionalfeatures.html#pop">3. POP3 Support</a></span></dt><dt><span class="sect1"><a href="optionalfeatures.html#imap">4. IMAP Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="optionalfeatures.html#imap-browser">4.1. The Folder Browser</a></span></dt><dt><span class="sect2"><a href="optionalfeatures.html#imap-authentication">4.2. Authentication</a></span></dt></dl></dd><dt><span class="sect1"><a href="optionalfeatures.html#smtp">5. SMTP Support</a></span></dt><dt><span class="sect1"><a href="optionalfeatures.html#account-hook">6. Managing multiple accounts</a></span></dt><dt><span class="sect1"><a href="optionalfeatures.html#caching">7. Local caching</a></span></dt><dd><dl><dt><span class="sect2"><a href="optionalfeatures.html#header-caching">7.1. Header caching</a></span></dt><dt><span class="sect2"><a href="optionalfeatures.html#body-caching">7.2. Body caching</a></span></dt><dt><span class="sect2"><a href="optionalfeatures.html#maint-cache">7.3. Maintenance</a></span></dt></dl></dd><dt><span class="sect1"><a href="optionalfeatures.html#exact-address">8. Exact address generation</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="optionalfeatures-notes"></a>1. General notes</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="compile-time-features"></a>1.1. Enabling/disabling features</h3></div></div></div><p>
25 Mutt supports several of optional features which can be enabled or
26 disabled at compile-time by giving the <span class="emphasis"><em>configure</em></span> script
27 certain arguments. These are listed in the “<span class="quote">Optional features</span>” section of
28 the <span class="emphasis"><em>configure --help</em></span> output.
30 Which features are enabled or disabled can later be determined from the
31 output of <code class="literal">mutt -v</code>. If a compile option starts with
32 “<span class="quote">+</span>” it is enabled and disabled if prefixed with “<span class="quote">-</span>”. For example, if
33 mutt was compiled using GnuTLS for encrypted communication instead of
34 OpenSSL, <code class="literal">mutt -v</code> would contain:
35 </p><pre class="screen">
36 -USE_SSL_OPENSSL +USE_SSL_GNUTLS</pre></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="url-syntax"></a>1.2. URL syntax</h3></div></div></div><p>
37 Mutt optionally supports the IMAP, POP3 and SMTP protocols which require
38 to access servers using URLs. The canonical syntax for specifying URLs
39 in mutt is (an item enclosed in <code class="literal">[]</code> means it is optional and
41 </p><pre class="screen">
42 proto[s]://[username[:password]@]server[:port]/[path]
44 <code class="literal">proto</code> is the communication protocol:
45 <code class="literal">imap</code> for IMAP, <code class="literal">pop</code> for POP3 and
46 <code class="literal">smtp</code> for SMTP. If “<span class="quote">s</span>” for “<span class="quote">secure communication</span>”
47 is appended, mutt will attempt to establish an encrypted communication
48 using SSL or TLS. If no explicit port is given, mutt will use the
49 system's default for the given protocol.
51 Since all protocols by mutt support authentication, the username may be
52 given directly in the URL instead of using the <code class="literal">pop_user</code> or
53 <code class="literal">imap_user</code> variables. It may contain the “<span class="quote">@</span>” symbol
54 being used by many mail systems as part of the login name. A password can be
55 given, too but is not recommended if the URL is specified in a configuration
58 The optional path is only relevant for IMAP.
60 For IMAP for example, you can select an alternative port by specifying it with the
61 server: <code class="literal">imap://imapserver:port/INBOX</code>. You can also specify different
62 username for each folder: <code class="literal">imap://username@imapserver[:port]/INBOX</code>
63 or <code class="literal">imap://username2@imapserver[:port]/path/to/folder</code>.
64 Replacing <code class="literal">imap://</code> by <code class="literal">imaps://</code>
65 would make mutt attempt to connect using SSL or TLS on a different port
66 to encrypt the communication.
67 </p></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="ssl"></a>2. SSL/TLS Support</h2></div></div></div><p>
68 If mutt is compiled with IMAP, POP3 and/or SMTP support, it can also be
69 compiled with support for SSL or TLS using either OpenSSL or GnuTLS (
70 by running the <span class="emphasis"><em>configure</em></span> script with the
71 <span class="emphasis"><em>--enable-ssl=...</em></span> option for OpenSSL or
72 <span class="emphasis"><em>--enable-gnutls=...</em></span> for GnuTLS). Mutt can then
73 attempt to encrypt communication with remote servers if these protocols
74 are suffixed with “<span class="quote">s</span>” for “<span class="quote">secure communication</span>”.
75 </p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="pop"></a>3. POP3 Support</h2></div></div></div><p>
76 If Mutt was compiled with POP3 support (by running the <span class="emphasis"><em>configure</em></span>
77 script with the <span class="emphasis"><em>--enable-pop</em></span> flag), it has the ability to work
78 with mailboxes located on a remote POP3 server and fetch mail for local
81 Remote POP3 servers can be accessed using URLs with the <code class="literal">pop</code> protocol
82 for unencrypted and <code class="literal">pops</code> for encrypted
83 communication, see <a class="xref" href="optionalfeatures.html#url-syntax" title="1.2. URL syntax">Section 1.2, “URL syntax”</a> for details.
85 Polling for new mail is more expensive over POP3 than locally. For this
86 reason the frequency at which Mutt will check for mail remotely can be
88 <a class="link" href="reference.html#pop-checkinterval" title="3.216. pop_checkinterval">$pop_checkinterval</a>
89 variable, which defaults to every 60 seconds.
90 </p><a id="fetch-mail"></a><p>
91 Another way to access your POP3 mail is the <code class="literal"><fetch-mail$</code> function
92 (default: G). It allows to connect to <a class="link" href="reference.html#pop-host" title="3.218. pop_host">$pop_host</a>, fetch all your new mail and place it in the
93 local <a class="link" href="reference.html#spoolfile" title="3.277. spoolfile">$spoolfile</a>. After this
94 point, Mutt runs exactly as if the mail had always been local.
95 </p><div class="note"><h3 class="title">Note</h3><p>
96 If you only need to fetch all messages to a
97 local mailbox you should consider using a specialized program, such as
98 <code class="literal">fetchmail</code>, <code class="literal">getmail</code> or similar.
99 </p></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="imap"></a>4. IMAP Support</h2></div></div></div><p>
100 If Mutt was compiled with IMAP support (by running the <span class="emphasis"><em>configure</em></span>
101 script with the <span class="emphasis"><em>--enable-imap</em></span> flag), it has the ability to work
102 with folders located on a remote IMAP server.
104 You can access the remote inbox by selecting the folder by its URL
105 (see <a class="xref" href="optionalfeatures.html#url-syntax" title="1.2. URL syntax">Section 1.2, “URL syntax”</a> for details) using the
106 <code class="literal">imap</code> or <code class="literal">imaps</code> protocol.
107 Alternatively, a pine-compatible notation is also supported, ie
108 <code class="literal">{[username@]imapserver[:port][/ssl]}path/to/folder</code>
110 Note that not all servers use “<span class="quote">/</span>” as the hierarchy separator. Mutt should
111 correctly notice which separator is being used by the server and convert
114 When browsing folders on an IMAP server, you can toggle whether to look
115 at only the folders you are subscribed to, or all folders with the
116 <span class="emphasis"><em>toggle-subscribed</em></span> command. See also the
117 <a class="link" href="reference.html#imap-list-subscribed" title="3.89. imap_list_subscribed">$imap_list_subscribed</a> variable.
119 Polling for new mail on an IMAP server can cause noticeable delays. So, you'll
120 want to carefully tune the
121 <a class="link" href="reference.html#mail-check" title="3.105. mail_check">$mail_check</a>
123 <a class="link" href="reference.html#timeout" title="3.288. timeout">$timeout</a>
124 variables. Personally I use
125 </p><pre class="screen">
129 with relatively good results over my slow modem line.
130 </p><div class="note"><h3 class="title">Note</h3><p>
131 Note that if you are using mbox as the mail store on UW servers prior to
132 v12.250, the server has been reported to disconnect a client if another client
133 selects the same folder.
134 </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="imap-browser"></a>4.1. The Folder Browser</h3></div></div></div><p>
135 As of version 1.2, mutt supports browsing mailboxes on an IMAP
136 server. This is mostly the same as the local file browser, with the
137 following differences:
138 </p><div class="itemizedlist"><ul type="disc"><li><p>
139 In lieu of file permissions, mutt displays the string "IMAP",
140 possibly followed by the symbol "+", indicating
141 that the entry contains both messages and subfolders. On
142 Cyrus-like servers folders will often contain both messages and
145 For the case where an entry can contain both messages and
146 subfolders, the selection key (bound to <code class="literal">enter</code> by default)
147 will choose to descend into the subfolder view. If you wish to view
148 the messages in that folder, you must use <code class="literal">view-file</code> instead
149 (bound to <code class="literal">space</code> by default).
151 You can create, delete and rename mailboxes with the
152 <code class="literal">create-mailbox</code>, <code class="literal">delete-mailbox</code>, and
153 <code class="literal">rename-mailbox</code> commands (default bindings: <code class="literal">C</code>,
154 <code class="literal">d</code> and <code class="literal">r</code>, respectively). You may also
155 <code class="literal">subscribe</code> and <code class="literal">unsubscribe</code> to mailboxes (normally
156 these are bound to <code class="literal">s</code> and <code class="literal">u</code>, respectively).
157 </p></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="imap-authentication"></a>4.2. Authentication</h3></div></div></div><p>
158 Mutt supports four authentication methods with IMAP servers: SASL,
159 GSSAPI, CRAM-MD5, and LOGIN (there is a patch by Grant Edwards to add
160 NTLM authentication for you poor exchange users out there, but it has
161 yet to be integrated into the main tree). There is also support for
162 the pseudo-protocol ANONYMOUS, which allows you to log in to a public
163 IMAP server without having an account. To use ANONYMOUS, simply make
164 your username blank or "anonymous".
166 SASL is a special super-authenticator, which selects among several protocols
167 (including GSSAPI, CRAM-MD5, ANONYMOUS, and DIGEST-MD5) the most secure
168 method available on your host and the server. Using some of these methods
169 (including DIGEST-MD5 and possibly GSSAPI), your entire session will be
170 encrypted and invisible to those teeming network snoops. It is the best
171 option if you have it. To use it, you must have the Cyrus SASL library
172 installed on your system and compile mutt with the <span class="emphasis"><em>--with-sasl</em></span> flag.
174 Mutt will try whichever methods are compiled in and available on the server,
175 in the following order: SASL, ANONYMOUS, GSSAPI, CRAM-MD5, LOGIN.
177 There are a few variables which control authentication:
178 </p><div class="itemizedlist"><ul type="disc"><li><p>
179 <a class="link" href="reference.html#imap-user" title="3.96. imap_user">$imap_user</a> - controls
180 the username under which you request authentication on the IMAP server,
181 for all authenticators. This is overridden by an explicit username in
182 the mailbox path (ie by using a mailbox name of the form
183 <code class="literal">{user@host}</code>).
185 <a class="link" href="reference.html#imap-pass" title="3.91. imap_pass">$imap_pass</a> - a
186 password which you may preset, used by all authentication methods where
187 a password is needed.
189 <a class="link" href="reference.html#imap-authenticators" title="3.83. imap_authenticators">$imap_authenticators</a> - a colon-delimited list of IMAP
190 authentication methods to try, in the order you wish to try them. If
191 specified, this overrides mutt's default (attempt everything, in the order
193 </p></li></ul></div></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="smtp"></a>5. SMTP Support</h2></div></div></div><p>
194 Besides supporting traditional mail delivery through a
195 sendmail-compatible program, mutt supports delivery through SMTP if it
196 was configured and built with <code class="literal">--enable-smtp</code>.
198 If the configuration variable
199 <a class="link" href="reference.html#smtp-url" title="3.270. smtp_url">$smtp_url</a> is set, mutt
200 will contact the given SMTP server to deliver messages; if it is unset,
201 mutt will use the program specified by <a class="link" href="reference.html#sendmail" title="3.258. sendmail">$sendmail</a>.
203 For details on the URL syntax, please see <a class="xref" href="optionalfeatures.html#url-syntax" title="1.2. URL syntax">Section 1.2, “URL syntax”</a>.
205 The built-in SMTP support supports encryption (the <code class="literal">smtps</code> protocol
206 using SSL or TLS) as well as SMTP authentication using SASL. The authentication mechanisms
207 for SASL are specified in <a class="link" href="reference.html#smtp-authenticators" title="3.268. smtp_authenticators">$smtp_authenticators</a>
208 defaulting to an empty list which makes mutt try all available methods
209 from most-secure to least-secure.
210 </p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="account-hook"></a>6. Managing multiple accounts</h2></div></div></div><p>
211 If you happen to have accounts on multiple IMAP, POP and/or SMTP servers,
212 you may find managing all the authentication settings inconvenient and
213 error-prone. The account-hook command may help. This hook works like
214 folder-hook but is invoked whenever you access a remote mailbox
215 (including inside the folder browser), not just when you open the
216 mailbox which includes (for example) polling for new mail, storing Fcc
217 messages and saving messages to a folder. As a consequence,
218 account-hook should only be used to set connection-related settings such
219 as passwords or tunnel commands but not settings such as sender
220 address or name (because in general it should be considered unpredictable
221 which account-hook was last used).
224 </p><pre class="screen">
225 account-hook . 'unset imap_user; unset imap_pass; unset tunnel'
226 account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
227 account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'
228 account-hook smtp://user@host3/ 'set tunnel="ssh host3 /usr/libexec/smtpd"'
229 </pre></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="caching"></a>7. Local caching</h2></div></div></div><p>
230 Mutt contains two types of local caching: <span class="emphasis"><em>(1)</em></span>
231 the so-called “<span class="quote">header caching</span>” and <span class="emphasis"><em>(2)</em></span> the
232 so-called “<span class="quote">body caching</span>” which are both described in this section.
234 Header caching is optional as it depends on external libraries, body
235 caching is always enabled if mutt is compiled with POP and/or IMAP
236 support as these use it (body caching requires no external library).
237 </p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="header-caching"></a>7.1. Header caching</h3></div></div></div><p>
238 Mutt provides optional support for caching message headers for the
239 following types of folders: IMAP, POP, Maildir and MH. Header caching
240 greatly improves speed because for remote folders, headers
241 usually only need to be downloaded once. For Maildir and MH, reading the
242 headers from a single file is much faster than looking at possibly
243 thousands of single files (since Maildir and MH use one file per message.)
245 Header caching can be enabled via the configure script and the
246 <span class="emphasis"><em>--enable-hcache</em></span> option. It's not turned on
247 by default because external database libraries are required: one
248 of tokyocabinet, qdbm, gdbm or bdb must be present.
250 If enabled, <a class="link" href="reference.html#header-cache" title="3.108. header_cache">$header_cache</a> can be
251 used to either point to a file or a directory. If set to point to
252 a file, one database file for all folders will be used (which may
253 result in lower performance), but one file per folder if it points
256 For the one-file-per-folder case, database files for remote folders
257 will be named according to their URL while database files for local
258 folders will be named by the MD5 checksums of their path. These database
259 files may be safely removed if a system is short on space. You
260 can compute the name of the header cache file for a particular local folder
261 through a command like the following:
262 </p><pre class="screen">
263 $ printf '%s' '/path/to/folder' | md5sum
265 The <code class="literal">md5sum</code> command may also be
266 named <code class="literal">md5</code>, depending on your operating system.
267 </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="body-caching"></a>7.2. Body caching</h3></div></div></div><p>
268 Both cache methods can be combined using the same directory for storage
269 (and for IMAP/POP even provide meaningful file names) which simplifies
270 manual maintenance tasks.
272 In addition to caching message headers only, mutt can also cache
273 whole message bodies. This results in faster display of messages
274 for POP and IMAP folders because messages usually have to be
275 downloaded only once.
277 For configuration, the variable <a class="link" href="reference.html#message-cachedir" title="3.133. message_cachedir">$message_cachedir</a> must point to a
278 directory. There, mutt will create a hierarchy of subdirectories
279 named like: <code class="literal">proto:user@hostname</code> where
280 <code class="literal">proto</code> is either “<span class="quote">pop</span>” or “<span class="quote">imap.</span>” Within
281 there for each folder, mutt stores messages in single files (just
282 like Maildir) so that with manual symlink creation these cache
283 directories can be examined with mutt as read-only Maildir folders.
285 All files can be removed as needed if the consumed disk space
286 becomes an issue as mutt will silently fetch missing items again.
287 </p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="maint-cache"></a>7.3. Maintenance</h3></div></div></div><p>
288 Mutt does not (yet) support maintenance features for header cache
289 database files so that files have to be removed in case they grow too
290 big. It depends on the database library used for header caching whether
291 disk space freed by removing messages is re-used.
293 For body caches, mutt can keep the local cache in sync with the
294 remote mailbox if the
295 <a class="link" href="reference.html#message-cache-clean" title="3.134. message_cache_clean">$message_cache_clean</a>
296 variable is set. Cleaning means to remove messages from the cache which
297 are no longer present in the mailbox which only happens when other mail
298 clients or instances of mutt using a different body cache location
299 delete messages (Mutt itself removes deleted messages from the cache
300 when syncing a mailbox). As cleaning can take a noticeable amount of time,
301 it should not be set in general but only occasionally.
302 </p></div></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="exact-address"></a>8. Exact address generation</h2></div></div></div><p>
303 Mutt supports the “<span class="quote">Name <user@host></span>” address syntax for reading and
304 writing messages, the older “<span class="quote">user@host (Name)</span>” syntax is only supported when
305 reading messages. The <span class="emphasis"><em>--enable-exact-address</em></span>
306 switch can be given to configure to build it with write-support
307 for the latter syntax. <code class="literal">EXACT_ADDRESS</code> in the output of
308 <code class="literal">mutt -v</code> indicates whether it's supported.
309 </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mimesupport.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="tuning.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 5. Mutt's MIME Support </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 7. Performance tuning</td></tr></table></div></body></html>