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