This file is indexed.

/usr/share/doc/mailutils-doc/mailutils.html/Mailbox-Statement.html is in mailutils-doc 1:2.99.99-1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Published by the Free Software Foundation,
51 Franklin Street, Fifth Floor
Boston, MA 02110-1301, USA

Copyright (C) 1999-2004, 2008-2012, 2014-2015 Free Software
Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover, and no Back-Cover texts.
A copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>GNU Mailutils Manual: Mailbox Statement</title>

<meta name="description" content="GNU Mailutils Manual: Mailbox Statement">
<meta name="keywords" content="GNU Mailutils Manual: Mailbox Statement">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Function-Index.html#Function-Index" rel="index" title="Function Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="configuration.html#configuration" rel="up" title="configuration">
<link href="Locking-Statement.html#Locking-Statement" rel="next" title="Locking Statement">
<link href="Debug-Statement.html#Debug-Statement" rel="prev" title="Debug Statement">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<a name="Mailbox-Statement"></a>
<div class="header">
<p>
Next: <a href="Locking-Statement.html#Locking-Statement" accesskey="n" rel="next">Locking Statement</a>, Previous: <a href="Debug-Statement.html#Debug-Statement" accesskey="p" rel="prev">Debug Statement</a>, Up: <a href="configuration.html#configuration" accesskey="u" rel="up">configuration</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Function-Index.html#Function-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Mailbox-Statement-1"></a>
<h4 class="subsection">2.2.5 Mailbox Statement</h4>
<a name="index-mailbox"></a>
<a name="Syntax-4"></a>
<h4 class="subheading">Syntax</h4>
<div class="example">
<pre class="example">mailbox {
  # <span class="roman">Use specified <var>url</var> as a mailspool.</span>
  mail-spool <var>url</var>;
  # <span class="roman">Create mailbox <var>url</var> using <var>pattern</var>.</span>
  mailbox-pattern <var>pattern</var>;
  # <span class="roman">Default mailbox type.</span>
  mailbox-type <var>type</var>;
  # <span class="roman">Default user mail folder.</span>
  folder <var>dir</var>;
}
</pre></div>

<a name="Description-2"></a>
<h4 class="subheading">Description</h4>
<p>The <code>mailbox</code> statement configures the location, name and type of
user mailboxes.
</p>
<p>The mailbox location can be specified using <code>mail-spool</code> or
<code>mail-pattern</code> statements.
</p>
<dl>
<dt><a name="index-mail_002dspool"></a>Configuration: <strong>mail-spool</strong> <em><var>path</var></em></dt>
<dd><p>The <code>mail-spool</code> statement specifies directory that holds user
mailboxes.  Once this statement is given, the <code>libmailutils</code>
library will assume that the mailbox of user <var>login</var> is kept in
file <samp><var>path</var>/<var>login</var></samp>.
</p>
<p>Historically, <var>path</var> can contain mailbox type prefix, e.g.:
&lsquo;<samp>maildir:///var/spool/mail</samp>&rsquo;, but such usage is discouraged in
favor of <code>mailbox-pattern</code> statement.
</p></dd></dl>

<dl>
<dt><a name="index-mailbox_002dpattern"></a>Configuration: <strong>mailbox-pattern</strong> <em><var>pattern</var></em></dt>
<dd><p>The <code>mailbox-pattern</code> statement is a modern way of configuring
mailbox locations.  It supersedes <code>mail-spool</code> statement.
</p>
<p>The <var>pattern</var> is valid <em>mailbox URL</em>, which 
may contain references to &lsquo;<samp>user</samp>&rsquo; macro-variable
(see <i>macro-variables</i>&nbsp;(<strong>Editor&rsquo;s note: dangling link</strong>)).  This macro-variable will be expanded
to the actual user name.  The full syntax for <var>pattern</var> is:
</p>
<div class="example">
<pre class="example">  [<var>type</var>://]<var>path</var>[;<var>args</var>]
</pre></div>

<p>where:
</p>
<dl compact="compact">
<dt><var>type</var></dt>
<dd><p>Specifies the mailbox type.  It must be one of mailbox types,
supported by Mailutils.  See <i>Mailbox URLs</i>&nbsp;(<strong>Editor&rsquo;s note: dangling link</strong>).  By default,
&lsquo;<samp>local</samp>&rsquo; is assumed.  
</p><table class="cartouche" border="1"><tr><td>
<div align="center"><strong>Editor&rsquo;s note:</strong>
</div><p>Verify this
</p></td></tr></table>
<p><!-- /@w -->.
</p>
</dd>
<dt><var>path</var></dt>
<dd><p>The path pattern.
</p>
</dd>
<dt><var>args</var></dt>
<dd><p>A semicolon-separated list of optional arguments, configuring
indexed directory structure.
</p>
<a name="index-directory-indexing"></a>
<p>An <em>indexed directory structure</em> is a special way of storing
mailboxes, which allows for faster access in case of very large
number of users. 
</p>
<p>By default, all user mailboxes are stored in a single directory and
are named after user login names.  To find the mailbox for a given
user, the system scans the directory for the corresponding
file.  This usually implies linear search, so the time needed to
locate a mailbox is directly proportional to the ordinal number of
the mailbox in the directory.
</p>
<p>GNU Mailutils supports three types of indexed directories:
&lsquo;<samp>direct</samp>&rsquo;, &lsquo;<samp>reverse</samp>&rsquo;, and &lsquo;<samp>hashed</samp>&rsquo;.
</p>
<a name="index-direct-indexing"></a>
<a name="index-indexing_002c-direct"></a>
<p>In direct indexed directory structure, <var>path</var> contains 26 subdirectories
named with lower-case letters of Latin alphabet.  The location of the
user mailbox is determined using the following algorithm:
</p>
<ol>
<li> Take the first letter of the user name.
</li><li> Map it to a lower-case letter using <em>index mapping</em>
table.  The result gives sub-directory name.
</li><li> Descend into this directory.
</li></ol>

<p>For example, using this algorithm, the mailbox of the user
&lsquo;<samp>smith</samp>&rsquo; is stored in file <samp><var>path</var>/s/smith</samp>.
</p>
<p>If each of single-letter subdirectories contains the
indexed directory structure, we have second level of indexing.  In
this case the file name of &lsquo;<samp>smith</samp>&rsquo;&rsquo;s mailbox is
<samp><var>path</var>/s/m/smith</samp>.
</p>
<a name="index-reverse-indexing"></a>
<a name="index-indexing_002c-reverse"></a>
<p>The <em>reverse</em> indexed structure uses the same principles, but the
indexing letters are taken from the <em>end</em> of the user name,
instead of from the beginning.  For example, in the 2nd level reverse
indexed structure, the &lsquo;<samp>smith</samp>&rsquo;&rsquo;s mailbox is located in
<samp><var>path</var>/h/t/smith</samp>.
</p>
<a name="index-hashed-indexing"></a>
<a name="index-indexing_002c-hashed"></a>
<p>Finally, the <em>hashed</em> structure consists of 256 subdirectories
under <var>path</var>, named by 2-letter hex codes from &lsquo;<samp>00</samp>&rsquo; to
&lsquo;<samp>FF</samp>&rsquo;.  Mailboxes are stored in these subdirectories.  The name
of the subdirectory is computed by hashing first <var>level</var> letters
of the user name.  The hashing algorithm is:
</p>
<ol>
<li> Take next letter from the user name
</li><li> Add its ASCII value to the hash sum.
</li><li> Continue (1-2) until <var>level</var> letters are processed, or all
letters from the file name are used, whichever occurs first.
</li><li> Convert the computed sum modulo 256 to a hex code.
</li></ol>

<p>Indexed directory structures are configured using the following
arguments:
</p>
<dl compact="compact">
<dd><a name="index-type"></a>
</dd>
<dt>type=<var>value</var></dt>
<dd><p>Specifies type of indexing.  Valid values are &lsquo;<samp>index</samp>&rsquo;, for direct
indexed structure, &lsquo;<samp>rev-index</samp>&rsquo; for reverse indexing, and
&lsquo;<samp>hash</samp>&rsquo; for hashed structure.
</p>
<a name="index-param"></a>
</dd>
<dt>param=<var>number</var></dt>
<dd><p>Specifies indexing level.
</p>
<a name="index-user-1"></a>
</dd>
<dt>user=<var>string</var></dt>
<dd><p>Specifies indexing key.  The only meaningful value, as of Mailutils
version 2.99.99 is &lsquo;<samp>user=${user}</samp>&rsquo;.
</p></dd>
</dl>

<p>Let&rsquo;s assume the traditional mail layout, in which user incoming
mails are stored in UNIX mailbox format in <samp>/var/mail</samp> directory.
The <code>mailbox-pattern</code> for this case is:
</p>
<div class="example">
<pre class="example">  mailbox-pattern &quot;/var/mail/${user}&quot;;
</pre></div>

<p>It is entirely equivalent to specifying &lsquo;<samp>mail-spool &quot;/var/mail&quot;</samp>&rsquo;.
</p>
<p>Now, if the layout is the same, but mailboxes are kept in
&lsquo;<samp>maildir</samp>&rsquo; format, then the corresponding statement is:
</p>
<div class="example">
<pre class="example">  mailbox-pattern &quot;maildir:///var/mail/${user}&quot;;
</pre></div>

<p>Finally, if the mailboxes are stored in a directly-indexed directory with
two levels of indexing, than:
</p>
<div class="example">
<pre class="example">  mailbox-pattern &quot;maildir:///var/mail;type=index;param=2;user=${user}&quot;;
</pre></div>
</dd>
</dl>
</dd></dl>

<p>If neither <code>mailbox-pattern</code> nor <code>mail-spool</code> are given, the
mailbox names are determined using the following algorithm:
</p>
<ol>
<li> If environment variable <code>FOLDER</code> its value is used.
</li><li> Otherwise, if environment variable <code>MAIL</code> is set, its value
is used.
</li><li> If neither of these is set, the mailbox name is constructed by
concatenating the built-in mail spool directory name, a directory
separator, and the user name.

<p>The built-in mail spool directory name is determined at compile
time, using &lsquo;<samp>_PATH_MAILDIR</samp>&rsquo; define from the include file
<samp>paths.h</samp>.  If this value is not defined, <samp>/var/mail</samp> or
<samp>/usr/spool/mail</samp> is used.
</p></li></ol>

<dl>
<dt><a name="index-mailbox_002dtype"></a>Configuration: <strong>mailbox-type</strong> <em><var>type</var></em></dt>
<dd><a name="index-MU_005fDEFAULT_005fSCHEME"></a>
<p>Specifies type of mailboxes.  By default, &lsquo;<samp>mbox</samp>&rsquo; (UNIX mailbox)
is assumed.  This can be changed while configuring the package by
setting <code>MU_DEFAULT_SCHEME</code> configuration variable.  The default
value can be verified by running <code>mailutils-config --info scheme</code>.
</p></dd></dl>

<dl>
<dt><a name="index-folder"></a>Configuration: <strong>folder</strong> <em><var>dir</var></em></dt>
<dd><a name="index-plus-expansion"></a>
<p>Sets user mail folder directory.  Its value is using when expanding
&lsquo;<samp>plus-notation</samp>&rsquo;, i.e. such mailbox names as <samp>+inbox</samp>.  The
&lsquo;<samp>+</samp>&rsquo; sign is replaced by <var>dir</var>, followed by a directory
separator (&lsquo;<samp>/</samp>&rsquo;).
</p>
<p>The <var>dir</var> argument can contain mailbox type prefix, e.g
&lsquo;<samp>mh://Mail</samp>&rsquo;.
</p>
<p>The default folder name is &lsquo;<samp>Mail/</samp>&rsquo;.
</p></dd></dl>

<hr>
<div class="header">
<p>
Next: <a href="Locking-Statement.html#Locking-Statement" accesskey="n" rel="next">Locking Statement</a>, Previous: <a href="Debug-Statement.html#Debug-Statement" accesskey="p" rel="prev">Debug Statement</a>, Up: <a href="configuration.html#configuration" accesskey="u" rel="up">configuration</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Function-Index.html#Function-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>