Debian Codegraph @

doc/faq/usage.html

raw symbols SCIP
1 <HTML>
2 <HEAD>
3 <TITLE>MHonArc FAQ: General Usage</TITLE></HEAD>
4 <link rel="stylesheet" type="text/css" href="../docstyles.css">
5 <BODY>
6
7 <!--X-NavButtons-Start-->
8 <table width="100%"><tr><td align="left"><nobr>[<a href="envs.html">Prev</a>]</nobr></td><td align="center" width="100%">[<a href="faq.html">TOC</a>][<a href="../mhonarc.html">Manual</a>][<a href="http://www.mhonarc.org/">Home</a>]</td><td align="right"><nobr>[<a href="archives.html">Next</a>]</nobr></td></tr></table>
9 </p>
10 <!--X-NavButtons-End-->
11
12 <!-- ===================================================================== -->
13 <HR>
14 <H2><a name="genusage">General Usage</a></H2>
15
16 <!--X-TOC-Start-->
17 <ul>
18 <li><a href="#resources">What are "resources"?</a></li>
19 <li><a href="#rfileedit">Is there a resource file editor?</a></li>
20 <li><a href="#nilresource">How do you set a resource to nil?</a></li>
21 <li><a href="#todefaults">How do I reset an archive's resources to the default values?</a></li>
22 <li><a href="#newgetopt">I get an error that "newgetopt.pl" cannot be required, where is it?</a></li>
23 <li><a href="#searching">Does MHonArc provide searching of archives?</a></li>
24 <li><a href="#webui">Is there a Web interface for MHonArc?</a></li>
25 <li><a href="#orgmsg">Does MHonArc require that the original message be available when updating an archive?</a></li>
26 <li><a href="#respecify">Do I have to respecify the resource file each time I update an archive?</a></li>
27 <li><a href="#sepfiles">Can I have MHonArc process a bunch of separate message files?</a></li>
28 <li><a href="#stdin">Can I tell MHonArc to read a mailbox from standard input?</a></li>
29 <li><a href="#parsedate">Why am I getting "Could not parse date for message ..."?</a></li>
30 <li><a href="#parsedate">Why doesn't MHonArc extract the date from "From ..." line?</a></li>
31 <li><a href="#count">Why is the number of messages reported by MHonArc less than what is reported by my MUA?</a></li>
32 </ul>
33 <!--X-TOC-End-->
34
35 <!-- ??????????????????????????????????????????????????????????????? -->
36 <hr noshade size=1>
37 <table border=0>
38 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
39 <h3><b><a name="resources">What are "resources"?</a></b></h3>
40 </td></tr></table>
41
42 <p>The behavior of MHonArc is controled by <em>resources</em>.
43 Resources are set, or defined, by command-line options, environment
44 variables, or a resource file. For example, the MAXSIZE resource tells
45 MHonArc the maximum number of messages allowed in an archive. To set
46 the resource, you can use the <strong><code>-maxsize</code></strong>
47 command-line option, the <strong>M2H_MAXSIZE</strong> envariable, or the
48 <strong><code>&lt;MAXSIZE&gt;</code></strong> resource file element.
49 </p>
50
51 <p>See the <a href="../resources.html"><cite>Resources</cite></a>
52 section of the documentation for more information.
53 </p>
54
55 <!-- ??????????????????????????????????????????????????????????????? -->
56 <hr noshade size=1>
57 <table border=0>
58 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
59 <h3><b><a name="rfileedit">Is there a resource file editor?</a></b></h3>
60 </td></tr></table>
61
62 <p>If you are Vim user,
63 <a href="http://www.vim.org/">&lt;http://www.vim.org/&gt;</a>,
64 a syntax file
65 for MHonArc resource files is included in the examples directory
66 (<b>mhonarc.vim</b>). To use it, copy mhonarc.vim to an appropriate location
67 and add something like the following to your .vimrc file:
68 </p>
69 <pre class="code">
70 au BufNewFile,BufRead *.mrc so $HOME/share/vim/syntax/mhonarc.vim
71 </pre>
72 <p>Of course, change the pathname to mhonarc.vim to where ever you copied
73 it to.
74 </p>
75 <p>Now, any file with ".mrc" extension will put Vim into MHonArc resource
76 file highlighting mode. The mode is best used with color-capable
77 terminals.
78 </p>
79
80 <!-- ??????????????????????????????????????????????????????????????? -->
81 <hr noshade size=1>
82 <table border=0>
83 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
84 <h3><b><a name="nilresource">How do you set a resource to nil?</a></b></h3>
85 </td></tr></table>
86
87 <p>For page layout resources, do something like the following in
88 your resource file:
89 </p>
90 <pre class="code">
91 <b>&lt;BotLinks&gt;</b>
92
93 <b>&lt;/BotLinks&gt;</b>
94 </pre>
95 <p>Notice the blank line. If you specify no content, MHonArc will
96 fallback to the default value of the resource.
97 </p>
98 <table class="caution" width="100%">
99 <tr valign="baseline">
100 <td><strong style="color: red;">WARNING:</strong></td>
101 <td width="100%"><p>
102 Only do the above for page layout related resources.
103 For other resources, the above technique will have no effect, or
104 it may cause unexpected results. See
105 <a href="#todefaults">How do I reset an archive's resources to the default
106 values?</a> for more information on reseting resources to default
107 values.
108 </p>
109 </td>
110 </tr>
111 </table>
112
113 <!-- ??????????????????????????????????????????????????????????????? -->
114 <hr noshade size=1>
115 <table border=0>
116 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
117 <h3><b><a name="todefaults">How do I reset an archive's resources to the default values?</a></b></h3>
118 </td></tr></table>
119
120 <p>The following two commands will reset an archive to use default
121 resource values:
122 </p>
123 <pre class="shell">
124 prompt&gt; <b>mha-dbedit <a class="shell" href="../resources/saveresources.html">-nosaveresources</a> <a class="shell" href="../resources/outdir.html">-outdir</a> <var>/path/to/your/archive</var></b>
125 prompt&gt; <b>mhonarc <a class="shell" href="../resources/saveresources.html">-saveresources</a> <a class="shell" href="../resources/editidx.html">-editidx</a> <a class="shell" href="../resources/outdir.html">-outdir</a> <var>/path/to/your/archive</var></b>
126 </pre>
127 <p>You could also include
128 <a href="../resources/rcfile.html"><tt>-rcfile</tt></a> option
129 to the last step if
130 you want to modify some resources from the default in case you want
131 to reset some resources and not all of them.
132 </p>
133
134 <!-- ??????????????????????????????????????????????????????????????? -->
135 <hr noshade size=1>
136 <table border=0>
137 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
138 <h3><b><a name="newgetopt">I get an error that "newgetopt.pl" cannot be required, where is it?</a></b></h3>
139 </td></tr></table>
140
141 <p>newgetopt.pl comes with the standard Perl distribution. Check with
142 your sys admin on where it is located (it should be in the default Perl
143 search path).
144 </p>
145
146 <table class="note" width="100%">
147 <tr valign="baseline">
148 <td><strong>NOTE:</strong></td>
149 <td width="100%"><p>v2.3 and later use <b>Getopt::Long</b>, which is included
150 in the Perl 5 distribution.
151 </p>
152 </td>
153 </tr>
154 </table>
155
156 <!-- ??????????????????????????????????????????????????????????????? -->
157 <hr noshade size=1>
158 <table border=0>
159 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
160 <h3><b><a name="searching">Does MHonArc provide searching of archives?</a></b></h3>
161 </td></tr></table>
162
163 <p>No, but searching can be provided by another utility.
164 The following list of search indexing tools have been used with
165 MHonArc archives:
166 </p>
167 <ul>
168 <li><strong>Glimpse</strong>:
169 <a href="http://glimpse.cs.arizona.edu/"
170 >&lt;http://glimpse.cs.arizona.edu/&gt;</a></li>
171 <li><strong>ht://Dig</strong>:
172 <a href="http://www.htdig.org/">&lt;http://www.htdig.org/&gt;</a></li>
173 <li><strong>Lucene</strong>:
174 <a href="http://lucene.apache.org/">&lt;http://lucene.apache.org/&gt;</a></li>
175 <li><strong>Namazu</strong>:
176 <a href="http://www.namazu.org/">&lt;http://www.namazu.org/&gt;</a>
177 (MHonArc aware and supports Japanese)</li>
178 <li><strong>mnoGoSearch</strong>:
179 <a href="http://search.mnogo.ru/">&lt;http://search.mnogo.ru/&gt;</a></li>
180 </ul>
181 <p>For more information, see
182 the respective documentation of the search engine software of
183 interest.
184 </p>
185
186 <table class="note" width="100%">
187 <tr valign="baseline">
188 <td><strong>NOTE:</strong></td>
189 <td width="100%"><p>You may also want to check out the following:
190 </p>
191 <ul>
192 <li><strong><a href="http://www.mhonarc.org/release/mharc/">mharc</a></strong>
193 at <a href="http://www.mhonarc.org/release/mharc/"
194 >&lt;http://www.mhonarc.org/release/mharc/&gt;</a>:
195 Mharc is a web-based mail archiving system for multiple mailing
196 lists using Procmail, MHonArc, and Namazu.
197 </li>
198 <!--
199 <li><strong><a href="http://www.hpc.uh.edu/majordomo/#wilma">Wilma</a></strong>
200 at <a href="http://www.hpc.uh.edu/majordomo/#wilma"
201 >&lt;http://www.hpc.uh.edu/majordomo/#wilma&gt;</a>:
202 Wilma is the Web Interface to List Mail Archives, written by Dave Wolfe
203 and Jason Tibbitts with nods to Achim Bohnet and Tom Christiansen.
204 WIlma is a relatively simple bit of Perl which links together the
205 MHonArc mail-to-HTML converter and the Glimpse search engine.
206 The result is a useful tool for allowing folks to browse your list
207 archives over the web. It works very well with the archives generated
208 by Majordomo's archive2.pl script.
209 </li>-->
210 <p> </p>
211 </ul>
212 </td>
213 </tr>
214 </table>
215
216 <!-- ??????????????????????????????????????????????????????????????? -->
217 <hr noshade size=1>
218 <table border=0>
219 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
220 <h3><b><a name="webui">Is there a Web interface for MHonArc?</a></b></h3>
221 </td></tr></table>
222
223 <p>No official ones. Several users have created home-grown interfaces
224 to perform various tasks. An experimental, <strong>unsecure</strong>
225 web admin tool comes in
226 with the MHonArc distribution under the "admin" directory.
227 I recommend searching the
228 MHonArc mailing list archives for discussion about web interfaces.
229 </p>
230
231 <!-- ??????????????????????????????????????????????????????????????? -->
232 <hr noshade size=1>
233 <table border=0>
234 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
235 <h3><b><a name="orgmsg">Does MHonArc require that the original message be available when updating an archive?</a></b></h3>
236 </td></tr></table>
237
238 <p>No. Once a message is archived, the original can be stored
239 away. MHonArc preserves all relevant information in its
240 database. For possible recovering purposes, it is recommended
241 to preserve original messages in a storage archive. This allows
242 you to rebuild MHonArc archives in case of data corruption.
243 </p>
244
245 <!-- ??????????????????????????????????????????????????????????????? -->
246 <hr noshade size=1>
247 <table border=0>
248 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
249 <h3><b><a name="respecify">Do I have to respecify the resource file each time I update an archive?</a></b></h3>
250 </td></tr></table>
251
252 <P>No. The archive database stores all resource settings. The only
253 time you need to respecify the resource file is if changes are required
254 in the layout of the archive. </P>
255
256 <table class="note" width="100%">
257 <tr valign="baseline">
258 <td><strong>NOTE:</strong></td>
259 <td width="100%"><p>
260 When utilizing the <strong>OTHERINDEXES</strong> resource,
261 the resource filenames listed in the main resource file are stored
262 in the database, but the resources for each additional index are
263 <STRONG>NOT</STRONG>. Hence, the resource files defining the additional
264 indexes must be accesible.
265 </p>
266 </td>
267 </tr>
268 </table>
269
270 <!-- ??????????????????????????????????????????????????????????????? -->
271 <hr noshade size=1>
272 <table border=0>
273 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
274 <h3><b><a name="sepfiles">Can I have MHonArc process a bunch of separate message files?</a></b></h3>
275 </td></tr></table>
276
277 <p>Yes. MH mail folder processing is just processing a bunch of
278 separate message files in a directory. MHonArc uses
279 the MHPATTERN resource to determine which files to process. Therefore,
280 all you need to do is redefine the MHPATTERN resource and pass
281 the directory your message files are in when invoking MHonArc.
282 </p>
283
284 <p>For example, say I want to process all files in a directory
285 called "messages". I'd do the following:
286 </p>
287 <pre class="shell">
288 prompt&gt; <b>mhonarc -mhpattern "^[^.]" messages</b>
289 </pre>
290 <p>MHPATTERN can be any Perl regular expression. The one in
291 the example matches any file not beginning with ".". This
292 is to avoid the special files "." and ".." which are directories.
293 </p>
294
295 <p>The other way to process individual message files is to do
296 it one at a time. For example:
297 </p>
298 <pre class="shell">
299 prompt&gt; <b>mhonarc -add &lt; file1.822</b>
300 prompt&gt; <b>mhonarc -add &lt; file2.822</b>
301 ...
302 </pre>
303
304 <!-- ??????????????????????????????????????????????????????????????? -->
305 <hr noshade size=1>
306 <table border=0>
307 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
308 <h3><b><a name="stdin">Can I tell MHonArc to read a mailbox from standard input?</a></b></h3>
309 </td></tr></table>
310
311 <p>Yes, but only in v2.0 or later (v2.0 beta releases do not have
312 the capability). The syntax is something like the following:
313 </p>
314 <pre class="shell">
315 prompt&gt; <b>mhonarc </b><var>[options-here]</var> <b>-- -</b>
316 </pre>
317 <p>The "--" tells MHonArc to terminate all command-line
318 option processing and treat all following arguments as mail
319 folders. The "-" signifies to use standard input as a mailbox
320 source.
321 </p>
322
323 <p>Since MHonArc can read a mailbox from stdin, this
324 allows MHonArc to be part of a pipeline where MHonArc
325 takes input from some preprocessor that massages some data to
326 make it suitable for processing by MHonArc. For example:
327 </p>
328 <pre class="shell">
329 prompt&gt; <b>mypreproc | mhonarc -- -</b>
330 </pre>
331
332 <!-- ??????????????????????????????????????????????????????????????? -->
333 <hr noshade size=1>
334 <table border=0>
335 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
336 <h3><b><a name="parsedate">Why am I getting "Could not parse date for message ..."?</a></b></h3>
337 </td></tr></table>
338
339 <p>This warning is generated when a message does not contain any date
340 information, or the date format used in the message is not recognized
341 by MHonArc. The warning may also indicate an improper end of a message
342 and start of a new message when processing a mailbox file. You
343 may also want to see:
344 <a href="archives.html#split">Why does a
345 message get split into mulitple messages with no headers?</a>.
346 </p>
347
348 <!-- ??????????????????????????????????????????????????????????????? -->
349 <hr noshade size=1>
350 <table border=0>
351 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
352 <h3><b><a name="parsedate">Why doesn't MHonArc extract the date from "From ..." line?</a></b></h3>
353 </td></tr></table>
354
355 <p>The "From ..." line (applicable in UUCP-style mailbox files) is
356 the message separator and normally includes a date. The problem
357 is that <em>it is the message separator</em>. The message separator
358 is not part of actual message data, and the value of
359 the message separator is controled by the MSGSEP resource. I.e.
360 The MSGSEP resource can be set anything, so there is no reliable
361 way to extract a date from it.
362 </p>
363 <p>Do not lose hope. Provided in the extras directory of the
364 MHonArc distribution (v2.1.1 and later) is a Perl program called
365 <b>prsfrom.pl</b> by A.R. Burgers,
366 <a href="mailto:burgers&#37;40ecn.nl">burgers<!--
367 -->&#64;<!--
368 -->ecn.nl</a>. The program
369 will supply missing Date: and From: fields to mailboxes based upon
370 the message separator line.
371 </p>
372
373 <!-- ??????????????????????????????????????????????????????????????? -->
374 <hr noshade size=1>
375 <table border=0>
376 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
377 <h3><b><a name="count">Why is the number of messages reported by MHonArc less than what is reported by my MUA?</a></b></h3>
378 </td></tr></table>
379
380 <p>This usually implies that you have duplicate messages. MHonArc
381 skips messages that have already been archived.
382 A way to check if message duplication is the culprit, try the following
383 on your mailbox:
384 </p>
385 <pre class="shell">
386 prompt&gt; <b>grep -i '^message-id:' <var>my.mbox</var> | sort | uniq | wc -l</b>
387 </pre>
388 and
389 <pre class="shell">
390 prompt&gt; <b>grep -i '^message-id:' <var>my.mbox</var> | sort | wc -l</b>
391 </pre>
392
393 <p>If numbers printed by both commands differ, you have duplicate messages.
394 </p>
395
396 <!-- ===================================================================== -->
397 <hr>
398
399 <!--X-NavButtons-Start-->
400 <table width="100%"><tr><td align="left"><nobr>[<a href="envs.html">Prev</a>]</nobr></td><td align="center" width="100%">[<a href="faq.html">TOC</a>][<a href="../mhonarc.html">Manual</a>][<a href="http://www.mhonarc.org/">Home</a>]</td><td align="right"><nobr>[<a href="archives.html">Next</a>]</nobr></td></tr></table>
401 </p>
402 <!--X-NavButtons-End-->
403
404 <hr>
405 <address>
406 $Date: 2011/01/01 02:43:26 $ <br>
407 <img align="top" src="monicon.png" alt="">
408 <a href="http://www.mhonarc.org/"
409 ><strong>MHonArc</strong></a><br>
410 Copyright &#169; 1997-1999, <a href="http://www.earlhood.com/"
411 >Earl Hood</a>, <a href="mailto:mhonarc&#37;40mhonarc.org"
412 >mhonarc<!--
413 -->&#64;<!--
414 -->mhonarc.org</a><br>
415 </address>
416 </body>
417 </html>