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.72.0" /><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" /></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#id2564897">1. General notes</a></span></dt><dd><dl><dt><span class="sect2"><a href="optionalfeatures.html#id2564903">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#id2565327">4.1. The Folder Browser</a></span></dt><dt><span class="sect2"><a href="optionalfeatures.html#id2565449">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></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2564897"></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="id2564903"></a>1.1. Enabling/disabling features</h3></div></div></div><p>
4
Mutt supports several of optional features which can be enabled or
5
disabled at compile-time by giving the <span class="emphasis"><em>configure</em></span> script
6
certain arguments. These are listed in the ``Optional features'' section of
7
the <span class="emphasis"><em>configure --help</em></span> output.
9
Which features are enabled or disabled can later be determined from the
10
output of <code class="literal">mutt -v</code>. If a compile option starts with
11
``+'' it is enabled and disabled if prefixed with ``-''. For example, if
12
mutt was compiled using GnuTLS for encrypted communication instead of
13
OpenSSL, <code class="literal">mutt -v</code> would contain:
14
</p><pre class="screen">
15
-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>
16
Mutt optionally supports the IMAP, POP3 and SMTP protocols which require
17
to access servers using URLs. The canonical syntax for specifying URLs
18
in mutt is (an item enclosed in <code class="literal">[]</code> means it is optional and
20
</p><pre class="screen">
21
proto[s]://[username[:password]@]server[:port]/[path]
23
<code class="literal">proto</code> is the communication protocol:
24
<code class="literal">imap</code> for IMAP, <code class="literal">pop</code> for POP3 and
25
<code class="literal">smtp</code> for SMTP. If ``s'' for ``secure communication''
26
is appended, mutt will attempt to establish an encrypted communication
27
using SSL or TLS. If no explicit port is given, mutt will use the
28
system's default for the given protocol.
30
Since all protocols by mutt support authentication, the username may be
31
given directly in the URL instead of using the <code class="literal">pop_user</code> or
32
<code class="literal">imap_user</code> variables. A password can be given, too but
33
is not recommended if the URL is specified in a configuration file on
36
The optional path is only relevant for IMAP.
38
For IMAP for example, you can select an alternative port by specifying it with the
39
server: <code class="literal">imap://imapserver:port/INBOX</code>. You can also specify different
40
username for each folder: <code class="literal">imap://username@imapserver[:port]/INBOX</code>
41
or <code class="literal">imap://username2@imapserver[:port]/path/to/folder</code>.
42
Replacing <code class="literal">imap://</code> by <code class="literal">imaps://</code>
43
would make mutt attempt to conect using SSL or TLS on a different port
44
to encrypt the communication.
45
</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>
46
If mutt is compiled with IMAP, POP3 and/or SMTP support, it can also be
47
compiled with support for SSL or TLS using either OpenSSL or GnuTLS (
48
by running the <span class="emphasis"><em>configure</em></span> script with the
49
<span class="emphasis"><em>--enable-ssl=...</em></span> option for OpenSSL or
50
<span class="emphasis"><em>--enable-gnutls=...</em></span> for GnuTLS). Mutt can then
51
attempt to encrypt communication with remote servers if these protocols
52
are suffixed with ``s'' for ``secure communication''.
53
</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>
54
If Mutt was compiled with POP3 support (by running the <span class="emphasis"><em>configure</em></span>
55
script with the <span class="emphasis"><em>--enable-pop</em></span> flag), it has the ability to work
56
with mailboxes located on a remote POP3 server and fetch mail for local
59
Remote POP3 servers can be accessed using URLs with the <code class="literal">pop</code> protocol
60
for unencrypted and <code class="literal">pops</code> for encrypted
61
communication, see <a href="optionalfeatures.html#url-syntax" title="1.2. URL syntax">Section 1.2, “URL syntax”</a> for details.
63
Polling for new mail is more expensive over POP3 than locally. For this
64
reason the frequency at which Mutt will check for mail remotely can be
66
<a href="reference.html#pop-checkinterval" title="3.215. pop_checkinterval">$pop_checkinterval</a>
67
variable, which defaults to every 60 seconds.
69
Another way to access your POP3 mail is the <span class="emphasis"><em>fetch-mail</em></span> function
70
(default: G). It allows to connect to <a href="reference.html#pop-host" title="3.217. pop_host">$pop_host</a>, fetch all your new mail and place it in the
71
local <a href="reference.html#spoolfile" title="3.275. spoolfile">$spoolfile</a>. After this
72
point, Mutt runs exactly as if the mail had always been local.
74
<span class="bold"><strong>Note:</strong></span> If you only need to fetch all messages to a
75
local mailbox you should consider using a specialized program, such as
76
<code class="literal">fetchmail</code>, <code class="literal">getmail</code> or similar.
77
</p></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>
78
If Mutt was compiled with IMAP support (by running the <span class="emphasis"><em>configure</em></span>
79
script with the <span class="emphasis"><em>--enable-imap</em></span> flag), it has the ability to work
80
with folders located on a remote IMAP server.
82
You can access the remote inbox by selecting the folder by its URL
83
(see <a href="optionalfeatures.html#url-syntax" title="1.2. URL syntax">Section 1.2, “URL syntax”</a> for details) using the
84
<code class="literal">imap</code> or <code class="literal">imaps</code> protocol.
85
Alternatively, a pine-compatible notation is also supported, ie
86
<code class="literal">{[username@]imapserver[:port][/ssl]}path/to/folder</code>
88
Note that not all servers use ``/'' as the hierarchy separator. Mutt should
89
correctly notice which separator is being used by the server and convert
92
When browsing folders on an IMAP server, you can toggle whether to look
93
at only the folders you are subscribed to, or all folders with the
94
<span class="emphasis"><em>toggle-subscribed</em></span> command. See also the
95
<a href="reference.html#imap-list-subscribed" title="3.89. imap_list_subscribed">$imap_list_subscribed</a> variable.
97
Polling for new mail on an IMAP server can cause noticeable delays. So, you'll
98
want to carefully tune the
99
<a href="reference.html#mail-check" title="3.104. mail_check">$mail_check</a>
101
<a href="reference.html#timeout" title="3.285. timeout">$timeout</a>
102
variables. Personally I use
104
</p><pre class="screen">
109
with relatively good results over my slow modem line.
111
Note that if you are using mbox as the mail store on UW servers prior to
112
v12.250, the server has been reported to disconnect a client if another client
113
selects the same folder.
114
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id2565327"></a>4.1. The Folder Browser</h3></div></div></div><p>
115
As of version 1.2, mutt supports browsing mailboxes on an IMAP
116
server. This is mostly the same as the local file browser, with the
117
following differences:
119
</p><div class="itemizedlist"><ul type="disc"><li><p>
120
In lieu of file permissions, mutt displays the string "IMAP",
121
possibly followed by the symbol "+", indicating
122
that the entry contains both messages and subfolders. On
123
Cyrus-like servers folders will often contain both messages and
126
For the case where an entry can contain both messages and
127
subfolders, the selection key (bound to <code class="literal">enter</code> by default)
128
will choose to descend into the subfolder view. If you wish to view
129
the messages in that folder, you must use <code class="literal">view-file</code> instead
130
(bound to <code class="literal">space</code> by default).
132
You can create, delete and rename mailboxes with the
133
<code class="literal">create-mailbox</code>, <code class="literal">delete-mailbox</code>, and
134
<code class="literal">rename-mailbox</code> commands (default bindings: <code class="literal">C</code>,
135
<code class="literal">d</code> and <code class="literal">r</code>, respectively). You may also
136
<code class="literal">subscribe</code> and <code class="literal">unsubscribe</code> to mailboxes (normally
137
these are bound to <code class="literal">s</code> and <code class="literal">u</code>, respectively).
138
</p></li></ul></div><p>
140
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id2565449"></a>4.2. Authentication</h3></div></div></div><p>
141
Mutt supports four authentication methods with IMAP servers: SASL,
142
GSSAPI, CRAM-MD5, and LOGIN (there is a patch by Grant Edwards to add
143
NTLM authentication for you poor exchange users out there, but it has
144
yet to be integrated into the main tree). There is also support for
145
the pseudo-protocol ANONYMOUS, which allows you to log in to a public
146
IMAP server without having an account. To use ANONYMOUS, simply make
147
your username blank or "anonymous".
149
SASL is a special super-authenticator, which selects among several protocols
150
(including GSSAPI, CRAM-MD5, ANONYMOUS, and DIGEST-MD5) the most secure
151
method available on your host and the server. Using some of these methods
152
(including DIGEST-MD5 and possibly GSSAPI), your entire session will be
153
encrypted and invisible to those teeming network snoops. It is the best
154
option if you have it. To use it, you must have the Cyrus SASL library
155
installed on your system and compile mutt with the <span class="emphasis"><em>--with-sasl</em></span> flag.
157
Mutt will try whichever methods are compiled in and available on the server,
158
in the following order: SASL, ANONYMOUS, GSSAPI, CRAM-MD5, LOGIN.
160
There are a few variables which control authentication:
162
</p><div class="itemizedlist"><ul type="disc"><li><p>
163
<a href="reference.html#imap-user" title="3.95. imap_user">$imap_user</a> - controls
164
the username under which you request authentication on the IMAP server,
165
for all authenticators. This is overridden by an explicit username in
166
the mailbox path (ie by using a mailbox name of the form
167
<code class="literal">{user@host}</code>).
169
<a href="reference.html#imap-pass" title="3.91. imap_pass">$imap_pass</a> - a
170
password which you may preset, used by all authentication methods where
171
a password is needed.
173
<a href="reference.html#imap-authenticators" title="3.83. imap_authenticators">$imap_authenticators</a> - a colon-delimited list of IMAP
174
authentication methods to try, in the order you wish to try them. If
175
specified, this overrides mutt's default (attempt everything, in the order
177
</p></li></ul></div><p>
179
</p></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>
180
Besides supporting traditional mail delivery through a
181
sendmail-compatible program, mutt supports delivery through SMTP if it
182
was configured and built with <code class="literal">--enable-smtp</code>.
184
If the configuration variable
185
<a href="reference.html#smtp-url" title="3.268. smtp_url">$smtp_url</a> is set, mutt
186
will contact the given SMTP server to deliver messages; if it is unset,
187
mutt will use the program specified by <a href="reference.html#sendmail" title="3.256. sendmail">$sendmail</a>.
189
For details on the URL syntax, please see <a href="optionalfeatures.html#url-syntax" title="1.2. URL syntax">Section 1.2, “URL syntax”</a>.
191
The built-in SMTP support supports encryption (the <code class="literal">smtps</code> protocol
192
using SSL or TLS) as well as SMTP authentication using SASL. The authentication mechanisms
193
for SASL are specified in <a href="reference.html#smtp-authenticators" title="3.266. smtp_authenticators">$smtp_authenticators</a>
194
defaulting to an empty list which makes mutt try all available methods
195
from most-secure to least-secure.
196
</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>
197
If you happen to have accounts on multiple IMAP, POP and/or SMTP servers,
198
you may find managing all the authentication settings inconvenient and
199
error-prone. The account-hook command may help. This hook works like
200
folder-hook but is invoked whenever you access a remote mailbox
201
(including inside the folder browser), not just when you open the
207
</p><pre class="screen">
208
account-hook . 'unset imap_user; unset imap_pass; unset tunnel'
209
account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
210
account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'
211
account-hook smtp://user@host3/ 'set tunnel="ssh host3 /usr/libexec/smtpd"'
214
</p></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>
215
Mutt contains two types of local caching: <span class="emphasis"><em>(1)</em></span>
216
the so-called ``header caching'' and <span class="emphasis"><em>(2)</em></span> the
217
so-called ``body caching'' which are both described in this section.
219
These are optional which means they're not enabled by default.
220
Details on how to enable either of these techniques are given in the
221
following subsections.
222
</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>
223
Mutt provides optional support for caching message headers for the
224
following types of folders: IMAP, POP, Maildir and MH. Header caching
225
greatly improves speed because for remote folders, headers
226
usually only need to be downloaded once. For Maildir and MH, reading the
227
headers from a single file is much faster than looking at possibly
228
thousands of single files (since Maildir and MH use one file per message.)
230
Header caching can be enabled via the configure script and the
231
<span class="emphasis"><em>--enable-hcache</em></span> option. It's not turned on
232
by default because external database libraries are required: one
233
of qdbm, gdbm or bdb must be present.
235
If enabled, <a href="reference.html#header-cache" title="3.107. header_cache">$header_cache</a> can be
236
used to either point to a file or a directory. If set to point to
237
a file, one database file for all folders will be used (which may
238
result in lower performance), but one file per folder if it points
241
For the one-file-per-folder case, database files will be named by MD5
242
sums. They may be safely removed if a system is short on space. You
243
can compute the name of the header cache file for a particular folder
244
through a command like the following:
246
</p><pre class="screen">
247
$ printf '%s' '/path/to/folder' | md5sum
248
$ printf '%s' 'imaps://user@host/path/to/folder' | md5sum
249
$ printf '%s' 'pops://user@host' | md5sum
252
The <code class="literal">md5sum</code> command may also be
253
named <code class="literal">md5</code>, depending on your operating system.
254
</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>
255
In addition to caching message headers only, mutt can also cache
256
whole message bodies. This results in faster display of messages
257
for POP and IMAP folders because messages usually have to be
258
downloaded only once.
260
If the configure script is called with <span class="emphasis"><em>--enable-pop</em></span>
261
and/or <span class="emphasis"><em>--enable-imap</em></span>, body caching will be
262
built in as it does not require additional software packages such
263
as database libraries.
265
For configuration, the variable <a href="reference.html#message-cachedir" title="3.132. message_cachedir">$message_cachedir</a> must point to a
266
directory. There, mutt will create a hierarchy of subdirectories
267
named like: <code class="literal">proto:user@hostname</code> where
268
<code class="literal">proto</code> is either ``pop'' or ``imap.'' Within
269
there for each folder, mutt stores messages in single files (just
270
like Maildir) so that with manual symlink creation these cache
271
directories can be examined with mutt as read-only Maildir folders.
273
All files can be removed as needed if the consumed disk space
274
becomes an issue as mutt will silently fetch missing items again.
275
</p></div></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>