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 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427
|
<html lang="en">
<head>
<title>Searching - The MH-E Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="The MH-E Manual">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Tool-Bar.html#Tool-Bar" title="Tool Bar">
<link rel="next" href="Threading.html#Threading" title="Threading">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This is version 8.0.3 of `The MH-E
Manual', last updated 2006-11-12.
Copyright (C) 1995, 2001, 2002, 2003, 2005, 2006 Free
Software Foundation, Inc.
The MH-E manual is free documentation; you can redistribute it
and/or modify it under the terms of either:
a. 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 Texts, and no Back-Cover
Texts.
b. the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option)
any later version.
The MH-E manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License or GNU Free Documentation License for more
details.
The GNU General Public License and the GNU Free Documentation
License appear as appendices to this document. You may also
request copies by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Searching"></a>
Next: <a rel="next" accesskey="n" href="Threading.html#Threading">Threading</a>,
Previous: <a rel="previous" accesskey="p" href="Tool-Bar.html#Tool-Bar">Tool Bar</a>,
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">15 Searching Through Messages</h2>
<p><a name="index-g_t_0040samp_007bSearch_007d-menu-1670"></a><a name="index-menu_002c-_0040samp_007bSearch_007d-1671"></a><a name="index-searching-1672"></a><a name="index-mh_002dsearch-1673"></a><a name="index-F-s-1674"></a>
Earlier, the command <kbd>F s</kbd> (<code>mh-search</code>) was introduced which
helps you find messages that lie buried in your folders
(see <a href="Folders.html#Folders">Folders</a>). This chapter covers this command in more detail.
Several commands are used to compose the search criteria and to start
searching. A couple of them can be found in the `<samp><span class="samp">Search</span></samp>' menu.
<a name="index-C_002dc-_003f-1675"></a>
<a name="index-mh_002dhelp-1676"></a>
<dl><dt><kbd>C-c ?</kbd><dd>Display cheat sheet for the MH-E commands (<code>mh-help</code>).
<!-- -->
<a name="index-g_t_0040samp_007bSearch-_003e-Perform-Search_007d-menu-item-1677"></a><a name="index-menu-item_002c-_0040samp_007bSearch-_003e-Perform-Search_007d-1678"></a><a name="index-C_002dc-C_002dc-1679"></a><a name="index-mh_002dindex_002ddo_002dsearch-1680"></a><br><dt><kbd>C-c C-c</kbd><dd>Find messages using <code>mh-search-program</code>
(<code>mh-index-do-search</code>).
<!-- -->
<a name="index-g_t_0040samp_007bSearch-_003e-Search-with-pick_007d-menu-item-1681"></a><a name="index-menu-item_002c-_0040samp_007bSearch-_003e-Search-with-pick_007d-1682"></a><a name="index-C_002dc-C_002dp-1683"></a><a name="index-mh_002dpick_002ddo_002dsearch-1684"></a><br><dt><kbd>C-c C-p</kbd><dd>Find messages using <samp><span class="command">pick</span></samp> (<code>mh-pick-do-search</code>).
<!-- -->
<a name="index-C_002dc-_003f-1685"></a><a name="index-mh_002dhelp-1686"></a><br><dt><kbd>C-c ?</kbd><dd>Display cheat sheet for the MH-E commands (<code>mh-help</code>).
<!-- -->
<a name="index-C_002dc-C_002df-C_002da-1687"></a><a name="index-C_002dc-C_002df-a-1688"></a><a name="index-mh_002dto_002dfield-1689"></a><br><dt><kbd>C-c C-f a</kbd><dt><kbd>C-c C-f C-a</kbd><dd>Move to `<samp><span class="samp">Mail-Reply-To:</span></samp>' header field (<code>mh-to-field</code>).
<!-- -->
<a name="index-C_002dc-C_002df-C_002db-1690"></a><a name="index-C_002dc-C_002df-b-1691"></a><br><dt><kbd>C-c C-f b</kbd><dt><kbd>C-c C-f C-b</kbd><dd>Move to `<samp><span class="samp">Bcc:</span></samp>' header field (<code>mh-to-field</code>).
<!-- -->
<a name="index-C_002dc-C_002df-C_002dc-1692"></a><a name="index-C_002dc-C_002df-c-1693"></a><br><dt><kbd>C-c C-f c</kbd><dt><kbd>C-c C-f C-c</kbd><dd>Move to `<samp><span class="samp">Cc:</span></samp>' header field (<code>mh-to-field</code>).
<!-- -->
<a name="index-C_002dc-C_002df-C_002dd-1694"></a><a name="index-C_002dc-C_002df-d-1695"></a><br><dt><kbd>C-c C-f d</kbd><dt><kbd>C-c C-f C-d</kbd><dd>Move to `<samp><span class="samp">Dcc:</span></samp>' header field (<code>mh-to-field</code>).
<!-- -->
<a name="index-C_002dc-C_002df-C_002df-1696"></a><a name="index-C_002dc-C_002df-f-1697"></a><br><dt><kbd>C-c C-f f</kbd><dt><kbd>C-c C-f C-f</kbd><dd>Move to `<samp><span class="samp">Fcc:</span></samp>' header field (<code>mh-to-field</code>).
<!-- -->
<a name="index-C_002dc-C_002df-C_002dl-1698"></a><a name="index-C_002dc-C_002df-l-1699"></a><br><dt><kbd>C-c C-f l</kbd><dt><kbd>C-c C-f C-l</kbd><dd>Move to `<samp><span class="samp">Mail-Followup-To:</span></samp>' header field (<code>mh-to-field</code>).
<!-- -->
<a name="index-C_002dc-C_002df-C_002dm-1700"></a><a name="index-C_002dc-C_002df-m-1701"></a><br><dt><kbd>C-c C-f m</kbd><dt><kbd>C-c C-f C-m</kbd><dd>Move to `<samp><span class="samp">From:</span></samp>' header field (<code>mh-to-field</code>).
<!-- -->
<a name="index-C_002dc-C_002df-C_002dr-1702"></a><a name="index-C_002dc-C_002df-r-1703"></a><br><dt><kbd>C-c C-f r</kbd><dt><kbd>C-c C-f C-r</kbd><dd>Move to `<samp><span class="samp">Reply-To:</span></samp>' header field (<code>mh-to-field</code>).
<!-- -->
<a name="index-C_002dc-C_002df-C_002ds-1704"></a><a name="index-C_002dc-C_002df-s-1705"></a><br><dt><kbd>C-c C-f s</kbd><dt><kbd>C-c C-f C-s</kbd><dd>Move to `<samp><span class="samp">Subject:</span></samp>' header field (<code>mh-to-field</code>).
<!-- -->
<a name="index-C_002dc-C_002df-C_002dt-1706"></a><a name="index-C_002dc-C_002df-t-1707"></a><br><dt><kbd>C-c C-f t</kbd><dt><kbd>C-c C-f C-t</kbd><dd>Move to `<samp><span class="samp">To:</span></samp>' header field (<code>mh-to-field</code>).
</dl>
<p>Another few commands are available in the MH-Folder buffer resulting
from a search.
<a name="index-g_t_0040key_007bTAB_007d-1708"></a>
<a name="index-mh_002dindex_002dnext_002dfolder-1709"></a>
<dl><dt><kbd><TAB></kbd><dd>Jump to the next folder marker (<code>mh-index-next-folder</code>).
<!-- -->
<a name="index-S_002d_0040key_007bTAB_007d-1710"></a><a name="index-mh_002dindex_002dprevious_002dfolder-1711"></a><br><dt><kbd>S-<TAB></kbd><dd>Jump to the previous folder marker (<code>mh-index-previous-folder</code>).
<!-- -->
<a name="index-v-1712"></a><a name="index-mh_002dindex_002dvisit_002dfolder-1713"></a><br><dt><kbd>v</kbd><dd>Visit original folder from where the message at point was found
(<code>mh-index-visit-folder</code>).
</dl>
<p><a name="index-g_t_0040samp_007bmh_002dsearch_007d-customization-group-1714"></a><a name="index-customization-group_002c-_0040samp_007bmh_002dsearch_007d-1715"></a>
There is one option from the `<samp><span class="samp">mh-search</span></samp>' customization group used
in searching.
<dl>
<dt><code>mh-search-program</code><a name="index-mh_002dsearch_002dprogram-1716"></a><dd>Search program that MH-E shall use (default: `<samp><span class="samp">Auto-detect</span></samp>').
</dl>
<p>The following hook is available.
<dl>
<dt><code>mh-search-mode-hook</code><a name="index-mh_002dsearch_002dmode_002dhook-1717"></a><dd>Hook run upon entry to <code>mh-search-mode</code> (default: <code>nil</code>).
</dl>
<p>The following face is available.
<dl>
<dt><code>mh-search-folder</code><a name="index-mh_002dsearch_002dfolder-1718"></a><dd>Folder heading face in MH-Folder buffers created by searches.
</dl>
<p><a name="index-mh_002dsearch_002dfolder-1719"></a><a name="index-F-s-1720"></a>
The command <kbd>F s</kbd> (<code>mh-search-folder</code>) helps you find
messages in your entire corpus of mail. You can search for messages to
or from a particular person or about a particular subject. In fact,
you can also search for messages containing selected strings in any
arbitrary header field or any string found within the messages.
<p><a name="index-g_t_0040command_007bpick_007d-1721"></a><a name="index-MH-commands_002c-_0040command_007bpick_007d-1722"></a>
Out of the box, MH-E uses <samp><span class="command">pick</span></samp> to find messages. With a
little extra effort, you can set an indexing program which rewards you
with extremely quick results. The drawback is that sometimes the index
does not contain the words you're looking for. You can still use
<samp><span class="command">pick</span></samp> in these situations.
<p>You are prompted for the folder to search. This can be `<samp><span class="samp">all</span></samp>' to
search all folders. Note that the search works recursively on the
listed folder.
<p><a name="index-MH_002dSearch-mode-1723"></a><a name="index-modes_002c-MH_002dSearch-1724"></a>
Next, an MH-Search buffer appears where you can enter search criteria.
<p><table class="cartouche" summary="cartouche" border="1"><tr><td>
<pre class="smallexample"> From:
To:
Cc:
Date:
Subject:
--------
#
--:** search-pattern All L7 (MH-Search)---------------------------
Type C-c C-c to search messages, C-c C-p to use pick, C-c ? for help
</pre>
</td></tr></table>
<i>Search window</i>
<p><a name="index-g_t_0040command_007bpick_007d-1725"></a><a name="index-MH-commands_002c-_0040command_007bpick_007d-1726"></a>
Edit this template by entering your search criteria in an appropriate
header field that is already there, or create a new field yourself. If
the string you're looking for could be anywhere in a message, then
place the string underneath the row of dashes.
<p>As an example, let's say that we want to find messages from Ginnean
about horseback riding in the Kosciusko National Park (Australia)
during January, 1994. Normally we would start with a broad search and
narrow it down if necessary to produce a manageable amount of data,
but we'll cut to the chase and create a fairly restrictive set of
criteria as follows:
<pre class="smallexample"> From: ginnean
To:
Cc:
Date: Jan 1994
Subject:
--------
horse
kosciusko
</pre>
<p><a name="index-mh_002dto_002dfield-1727"></a><a name="index-C_002dc-C_002df-C_002dt-1728"></a>
As with MH-Letter mode, MH-Search provides commands like <kbd>C-c C-f
C-t</kbd> (<code>mh-to-field</code>) to help you fill in the blanks.
See <a href="Editing-Message.html#Editing-Message">Editing Message</a>.
<p><a name="index-F-s-1729"></a><a name="index-mh_002dsearch_002dmode_002dhook-1730"></a>
If you find that you do the same thing over and over when editing the
search template, you may wish to bind some shortcuts to keys. This can
be done with the variable <code>mh-search-mode-hook</code>, which is called
when <kbd>F s</kbd> is run on a new pattern.
<p><a name="index-mh_002dindex_002ddo_002dsearch-1731"></a><a name="index-mh_002dpick_002ddo_002dsearch-1732"></a><a name="index-C_002dc-C_002dc-1733"></a><a name="index-C_002dc-C_002dp-1734"></a>
To perform the search, type <kbd>C-c C-c</kbd> (<code>mh-index-do-search</code>).
Sometimes you're searching for text that is either not indexed, or
hasn't been indexed yet. In this case you can override the default
method with the pick method by running the command <kbd>C-c C-p</kbd>
(<code>mh-pick-do-search</code>).
<p><a name="index-folders_002c-_0040samp_007b_002bmhe_002dindex_007d-1735"></a><a name="index-g_t_0040samp_007b_002bmhe_002dindex_007d-1736"></a><a name="index-mh_002dindex_002dnext_002dfolder-1737"></a><a name="index-mh_002dindex_002dprevious_002dfolder-1738"></a><a name="index-g_t_0040key_007bTAB_007d-1739"></a><a name="index-S_002d_0040key_007bTAB_007d-1740"></a><a name="index-mh_002dsearch_002dfolder-1741"></a>
The messages that are found are put in a temporary sub-folder of
`<samp><span class="samp">+mhe-index</span></samp>' and are displayed in an MH-Folder buffer. This
buffer is special because it displays messages from multiple folders;
each set of messages from a given folder has a heading with the folder
name. The appearance of the heading can be modified by customizing the
face <code>mh-search-folder</code>. You can jump back and forth between the
headings using the commands <kbd><TAB></kbd>
(<code>mh-index-next-folder</code>) and <kbd>S-<TAB></kbd>
(<code>mh-index-previous-folder</code>).
<p><a name="index-mh_002dindex_002dvisit_002dfolder-1742"></a><a name="index-mh_002drescan_002dfolder-1743"></a><a name="index-F-r-1744"></a><a name="index-v-1745"></a>
In addition, the command <kbd>v</kbd> (<code>mh-index-visit-folder</code>) can be
used to visit the folder of the message at point. Initially, only the
messages that matched the search criteria are displayed in the folder.
While the temporary buffer has its own set of message numbers, the
actual messages numbers are shown in the visited folder. Thus, the
command <kbd>v</kbd> is useful to find the actual message number of an
interesting message, or to view surrounding messages with the command
<kbd>F r</kbd> <code>mh-rescan-folder</code>. See <a href="Folders.html#Folders">Folders</a>.
<p><a name="index-mh_002dkill_002dfolder-1746"></a><a name="index-F-k-1747"></a>
Because this folder is temporary, you'll probably get in the habit of
killing it when you're done with <kbd>F k</kbd> (<code>mh-kill-folder</code>).
See <a href="Folders.html#Folders">Folders</a>.
<p><a name="index-F-s-1748"></a>
You can regenerate the results by running <kbd>F s</kbd> with a prefix
argument.
<p><a name="index-g_t_0040command_007bprocmail_007d-1749"></a><a name="index-Unix-commands_002c-_0040command_007bprocmail_007d-1750"></a><a name="index-g_t_0040samp_007bX_002dMHE_002dChecksum_003a_007d-header-field-1751"></a><a name="index-header-field_002c-_0040samp_007bX_002dMHE_002dChecksum_003a_007d-1752"></a>
Note: This command uses an `<samp><span class="samp">X-MHE-Checksum:</span></samp>' header field to
cache the MD5 checksum of a message. This means that if an incoming
message already contains an `<samp><span class="samp">X-MHE-Checksum:</span></samp>' field, that message
might not be found by this command. The following <samp><span class="command">procmail</span></samp>
recipe avoids this problem by renaming the existing header field:
<pre class="smallexample"> :0 wf
| formail -R "X-MHE-Checksum" "X-Old-MHE-Checksum"
</pre>
<p>See <a href="Limits.html#Limits">Limits</a>, for an alternative interface to searching.
<h3 class="section">15.1 Configuring Indexed Searches</h3>
<p><a name="index-g_t_0040command_007bgrep_007d-1753"></a><a name="index-g_t_0040command_007bmairix_007d-1754"></a><a name="index-g_t_0040command_007bnamazu_007d-1755"></a><a name="index-g_t_0040command_007bpick_007d-1756"></a><a name="index-g_t_0040command_007bswish_002b_002b_007d-1757"></a><a name="index-g_t_0040command_007bswish_002de_007d-1758"></a><a name="index-Unix-commands_002c-_0040command_007bgrep_007d-1759"></a><a name="index-Unix-commands_002c-_0040command_007bmairix_007d-1760"></a><a name="index-Unix-commands_002c-_0040command_007bnamazu_007d-1761"></a><a name="index-Unix-commands_002c-_0040command_007bpick_007d-1762"></a><a name="index-Unix-commands_002c-_0040command_007bswish_002b_002b_007d-1763"></a><a name="index-Unix-commands_002c-_0040command_007bswish_002de_007d-1764"></a><a name="index-mh_002dsearch-1765"></a><a name="index-F-s-1766"></a><a name="index-mh_002dsearch_002dprogram-1767"></a>
The command <kbd>F s</kbd> (<code>mh-search</code>) runs the command defined by
the option <code>mh-search-program</code>. The default value is
`<samp><span class="samp">Auto-detect</span></samp>' which means that MH-E will automatically choose one
of <samp><span class="command">swish++</span></samp>, <samp><span class="command">swish-e</span></samp>, <samp><span class="command">mairix</span></samp>,
<samp><span class="command">namazu</span></samp>, <samp><span class="command">pick</span></samp> and <samp><span class="command">grep</span></samp> in that order. If,
for example, you have both <samp><span class="command">swish++</span></samp> and <samp><span class="command">mairix</span></samp>
installed and you want to use <samp><span class="command">mairix</span></samp>, then you can set this
option to `<samp><span class="samp">mairix</span></samp>'.
<p>The following sub-sections describe how to set up the various indexing
programs to use with MH-E.
<h4 class="subsection">15.1.1 swish++</h4>
<p><a name="index-g_t_0040command_007bswish_002b_002b_007d-1768"></a><a name="index-Unix-commands_002c-_0040command_007bswish_002b_002b_007d-1769"></a>
In the examples below, replace <samp><span class="file">/home/user/Mail</span></samp> with the path to
your MH directory.
<p>First create the directory <samp><span class="file">/home/user/Mail/.swish++</span></samp>. Then
create the file <samp><span class="file">/home/user/Mail/.swish++/swish++.conf</span></samp> with the
following contents:
<pre class="smallexample"> IncludeMeta Bcc Cc Comments Content-Description From Keywords
IncludeMeta Newsgroups Resent-To Subject To
IncludeMeta Message-Id References In-Reply-To
IncludeFile Mail *
IndexFile /home/user/Mail/.swish++/swish++.index
</pre>
<p>Use the following command line to generate the swish index. Run this
daily from cron:
<pre class="smallexample"> find /home/user/Mail -path /home/user/Mail/mhe-index -prune \
-o -path /home/user/Mail/.swish++ -prune \
-o -name "[0-9]*" -print \
| index -c /home/user/Mail/.swish++/swish++.conf -
</pre>
<p>This command does not index the folders that hold the results of your
searches in `<samp><span class="samp">+mhe-index</span></samp>' since they tend to be ephemeral and the
original messages are indexed anyway.
<p><a name="index-g_t_0040command_007bindex_007d-1770"></a><a name="index-Unix-commands_002c-_0040command_007bindex_007d-1771"></a><a name="index-g_t_0040command_007bindex_002b_002b_007d-1772"></a><a name="index-Unix-commands_002c-_0040command_007bindex_002b_002b_007d-1773"></a>
On some systems (Debian GNU/Linux, for example), use <samp><span class="command">index++</span></samp>
instead of <samp><span class="command">index</span></samp>.
<h4 class="subsection">15.1.2 swish</h4>
<p><a name="index-g_t_0040command_007bswish_002de_007d-1774"></a><a name="index-Unix-commands_002c-_0040command_007bswish_002de_007d-1775"></a>
In the examples below, replace <samp><span class="file">/home/user/Mail</span></samp> with the path to
your MH directory.
<p>First create the directory <samp><span class="file">/home/user/Mail/.swish</span></samp>. Then create
the file <samp><span class="file">/home/user/Mail/.swish/config</span></samp> with the following
contents:
<pre class="smallexample"> DefaultContents TXT*
IndexDir /home/user/Mail
IndexFile /home/user/Mail/.swish/index
IndexName "Mail Index"
IndexDescription "Mail Index"
IndexPointer "http://nowhere"
IndexAdmin "nobody"
#MetaNames automatic
IndexReport 3
FollowSymLinks no
UseStemming no
IgnoreTotalWordCountWhenRanking yes
WordCharacters abcdefghijklmnopqrstuvwxyz0123456789-
BeginCharacters abcdefghijklmnopqrstuvwxyz
EndCharacters abcdefghijklmnopqrstuvwxyz0123456789
IgnoreLimit 50 1000
IndexComments 0
FileRules filename contains \D
FileRules pathname contains /home/user/Mail/.swish
FileRules pathname contains /home/user/Mail/mhe-index
FileRules filename is index
</pre>
<p>This configuration does not index the folders that hold the results of
your searches in `<samp><span class="samp">+mhe-index</span></samp>' since they tend to be ephemeral and
the original messages are indexed anyway.
<p>If there are any directories you would like to ignore, append lines
like the following to <samp><span class="file">config</span></samp>:
<pre class="smallexample"> FileRules pathname contains /home/user/Mail/scripts
</pre>
<p><a name="index-g_t_0040command_007bswish_002de_007d-1776"></a><a name="index-Unix-commands_002c-_0040command_007bswish_002de_007d-1777"></a>
Use the following command line to generate the swish index. Run this
daily from cron:
<pre class="smallexample"> swish-e -c /home/user/Mail/.swish/config
</pre>
<h4 class="subsection">15.1.3 mairix</h4>
<p><a name="index-g_t_0040command_007bmairix_007d-1778"></a><a name="index-Unix-commands_002c-_0040command_007bmairix_007d-1779"></a>
In the examples below, replace <samp><span class="file">/home/user/Mail</span></samp> with the path to
your MH directory.
<p>First create the directory <samp><span class="file">/home/user/Mail/.mairix</span></samp>. Then create
the file <samp><span class="file">/home/user/Mail/.mairix/config</span></samp> with the following
contents:
<pre class="smallexample"> base=/home/user/Mail
# List of folders that should be indexed. 3 dots at the end means there
# are subfolders within the folder
mh=archive...:inbox:drafts:news:sent:trash
vfolder_format=raw
database=/home/user/Mail/mairix/database
</pre>
<p>Use the following command line to generate the mairix index. Run this daily
from cron:
<pre class="smallexample"> mairix -f /home/user/Mail/.mairix/config
</pre>
<h4 class="subsection">15.1.4 namazu</h4>
<p><a name="index-g_t_0040command_007bnamazu_007d-1780"></a><a name="index-Unix-commands_002c-_0040command_007bnamazu_007d-1781"></a>
In the examples below, replace <samp><span class="file">/home/user/Mail</span></samp> with the path to
your MH directory.
<p>First create the directory <samp><span class="file">/home/user/Mail/.namazu</span></samp>. Then create
the file <samp><span class="file">/home/user/Mail/.namazu/mknmzrc</span></samp> with the following
contents:
<pre class="smallexample"> package conf; # Don't remove this line!
$ADDRESS = 'user@localhost';
$ALLOW_FILE = "[0-9]*";
$EXCLUDE_PATH = "^/home/user/Mail/(mhe-index|spam)";
</pre>
<p>This configuration does not index the folders that hold the results of
your searches in `<samp><span class="samp">+mhe-index</span></samp>' since they tend to be ephemeral and
the original messages are indexed anyway.
<p>Use the following command line to generate the namazu index. Run this
daily from cron:
<pre class="smallexample"> mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \
/home/user/Mail
</pre>
<h4 class="subsection">15.1.5 pick</h4>
<p><a name="index-g_t_0040command_007bpick_007d-1782"></a><a name="index-MH-commands_002c-_0040command_007bpick_007d-1783"></a>
This search method does not require any setup.
<p>Read <samp><span class="command">pick</span></samp>(1) or the section
<a href="http://rand-mh.sourceforge.net/book/mh/finpic.html">Finding Messages with pick</a> in
the MH book to find out more about how to enter the criteria.
<h4 class="subsection">15.1.6 grep</h4>
<p><a name="index-g_t_0040command_007bgrep_007d-1784"></a><a name="index-Unix-commands_002c-_0040command_007bgrep_007d-1785"></a>
This search method does not require any setup.
<p>Unlike the other search methods, this method does not use the
MH-Search buffer. Instead, you simply enter a regular expression in
the minibuffer. For help in constructing regular expressions, see your
man page for <samp><span class="command">grep</span></samp>.
</body></html>
|