Debian Codegraph @

doc/faq/archives.html

raw
1 <HTML>
2 <HEAD>
3 <TITLE>MHonArc FAQ: Archives</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="usage.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="indexpgs.html">Next</a>]</nobr></td></tr></table>
9 </p>
10 <!--X-NavButtons-End-->
11
12 <!-- ===================================================================== -->
13 <HR>
14 <H2><a name="archives">Archives</a></H2>
15
16 <!--X-TOC-Start-->
17 <ul>
18 <li><a href="#split">Why does a message get split into mulitple messages with no headers?</a></li>
19 <li><a href="#move">Can I move a message from one archive to another?</a></li>
20 <li><a href="#reconstruct">Can I reconstruct a database from the HTML messages?</a></li>
21 <li><a href="#dynamic">Is it safe to add messages to an archive as they are received?</a></li>
22 <li><a href="#forward">So it is safe. How do I do it?</a></li>
23 <li><a href="#majordomo">How can I do it with Majordomo lists?</a></li>
24 <li><a href="#different">Can I get MHonArc to filter messages to different archives?</a></li>
25 <li><a href="#exclude">Does MHonArc support the "no archive" flag in messages?</a></li>
26 <li><a href="#addsafe">Is it safe to specify <tt>-add</tt> when no archive exists?</a></li>
27 <li><a href="#jumps">Why are there "jumps" in message numbers?</a></li>
28 <li><a href="#dups">Why do some messages get re-added each time MHonArc processes a mail folder?</a></li>
29 <li><a href="#remove">How do I remove messages from an archive?</a></li>
30 <li><a href="#tombox">Can I convert an archive back to mailbox format?</a></li>
31 </ul>
32 <!--X-TOC-End-->
33
34 <!-- ??????????????????????????????????????????????????????????????? -->
35 <hr noshade size=1>
36 <table border=0>
37 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
38 <h3><b><a name="split">Why does a message get split into mulitple messages with no headers?</a></b></h3>
39 </td></tr></table>
40
41 <P>If you are processing UUCP mailbox files, messages are
42 separated by a line starting with "<code>From </code>" (ie. The
43 word "<code>From</code>" followed by a space). Some mail software
44 will prefix lines in message bodies with a `<code>&gt;</code>'
45 to avoid MUA's from incorrectly treating the line as a message
46 separator. However, some mail software doesn't. </P>
47
48 <P>To avoid incorrect separator detection, many MUAs perform
49 a more stricter detection of separators beyond "<code>From </code>".
50 MHonArc, by default, will treat lines starting
51 with "<code>From </code>" as a message separator, which can lead to
52 incorrect message termination if the From line has not been escaped
53 with a `<code>&gt;</code>'. </P>
54
55 <P>To fix the problem, use the
56 <a href="../resources/msgsep.html">MSGSEP</a> resource to
57 instruct MHonArc to use a stricter test detecting a message
58 separator. The following <a href="../resources/msgsep.html">MSGSEP</a>
59 resource setting is
60 known to work well: </P>
61
62 <pre class="code">
63 <b>&lt;MsgSep&gt;</b>
64 ^From \S+\s+\S+\s+\S+\s+\d+\s+\d+:\d+:\d+\s+\d+
65 <b>&lt;/MsgSep&gt;</b>
66 </pre>
67
68 <p>In case you have message separates with quoted local parts in
69 the address part of the separator, you can use the following:
70 </p>
71
72 <pre class="code">
73 <b>&lt;MsgSep></b>
74 ^From\s+(?:"[^"]+"<!--
75 -->&#64;<!--
76 -->\S+|\S+)\s+\S+\s+\S+\s+\d+\s+\d+:\d+:\d+\s+\d+
77 <b>&lt;/MsgSep></b>
78 </pre>
79
80 <p>Make sure to test things out before using in production
81 environments.
82 </p>
83
84 <p>If this fails, you can try the
85 <a href="../resources/conlen.html">CONLEN</a>
86 resource available in v2.0 and later. The
87 <a href="../resources/conlen.html">CONLEN</a> resource, when set, tells
88 MHonArc to utilize the <code>Content-Length</code> fields
89 in the message head. If your MTA defines this field accurately,
90 then you can utilize this feature.
91 Sun Solaris' delivery agent will define the
92 <tt>Content-Length</tt> field for messages delivered to local users.
93 </p>
94 <p>If you use Procmail to filter your mail,
95 you can try the following Procmail recipe (contributed by
96 <a href="mailto:lindsey&#37;40ncsa.uiuc.edu">Christopher Lindsey</a>):
97 </p>
98 <blockquote>
99 <p>However, one can add a Content-Length: header with everyone's favorite
100 tool, procmail. :) Here's a recipe borrowed from David Tamkin about
101 9 moons ago:
102 </p>
103 <pre class="code">
104 :0fhw # B won't help; size conditions ignore H and B flags on the :0 line
105 * ! ^Content-Length:.*[0-9]
106 * 1^1 B ?? &gt;1
107 | formail -a "Content-Length: $="
108 </pre>
109 <p>So if you want to count on Content-Length, the message could be
110 piped into procmail with a specific procmailrc file which would
111 do this counting and then call MHonArc.
112 </p>
113 </blockquote>
114
115 <p>If <a href="http://www.sendmail.org/">sendmail</a> is
116 your system's MTA and you use Procmail as your local delivery agent,
117 you can configure things to have <tt>Content-Length</tt> defined
118 for all locally delivered mail. The following technique is
119 contributed by
120 <a href="mailto:tibbs&#37;40math.uh.edu">Jason L Tibbitts III</a>:
121 </p>
122 <blockquote>
123 <p>I use Procmail as my local delivery agent. I have the following extremely
124 disgusting settings in my .mc (M4 config) file to add in a Content-Length:
125 header, <u>but I'm <b>not</b> sure if I would recommend that anyone
126 actually think of using this</u>:
127 </p>
128 <pre class="code">
129 define(`LOCAL_MAILER_FLAGS',`SPfhn9Z')
130 define(`LOCAL_MAILER_ARGS',`procmail -a $h -d $u')
131
132 LOCAL_CONFIG
133 #
134 # Add fake Content-Length Header for local mailer
135 # This is corrected by Procmail
136 # Note that the Z flag is used here; if Z is ever defined, this
137 # will break something
138 H?Z?Content-Length: 0000000000
139 </pre>
140 </blockquote>
141
142 <p>If possible, try to avoid relying on the use of
143 <tt>Content-Length</tt> since it is hard to guarantee that it is
144 set properly. When
145 <a href="../resources/conlen.html">CONLEN</a>
146 is specified, MHonArc will read at
147 least the number of bytes specified by <tt>Content-Length</tt> before
148 checking for the message separator, as defined by the
149 <a href="../resources/msgsep.html">MSGSEP</a>
150 resource. Therefore, the value of <tt>Content-Length</tt> can be less
151 than the actual message size, and message extraction will
152 work as expected. However, if <tt>Content-Length</tt> for a message
153 has a value that is larger than the actual size, MHonArc may include
154 the content of the next message as part of the current message.
155 </p>
156
157 <!-- ??????????????????????????????????????????????????????????????? -->
158 <hr noshade size=1>
159 <table border=0>
160 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
161 <h3><b><a name="move">Can I move a message from one archive to another?</a></b></h3>
162 </td></tr></table>
163
164 <P>No. In order to achieve the same effect, you must add the original,
165 unprocessed, message to the destination archive, then remove the
166 appropriate HTML version of the message from the source archive. </P>
167
168 <!-- ??????????????????????????????????????????????????????????????? -->
169 <hr noshade size=1>
170 <table border=0>
171 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
172 <h3><b><a name="reconstruct">Can I reconstruct a database from the HTML messages?</a></b></h3>
173 </td></tr></table>
174
175 <p>Yes. v2.3 of MHonArc introduced a utility program called
176 <b>mha-dbrecover</b>. It gets installed with the other MHonArc
177 files during the installation process. See the documentation for
178 usage information.
179 </p>
180
181
182 <!-- ??????????????????????????????????????????????????????????????? -->
183 <hr noshade size=1>
184 <table border=0>
185 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
186 <h3><b><a name="dynamic">Is it safe to add messages to an archive as they are received?</a></b></h3>
187 </td></tr></table>
188
189 <p>Yes. MHonArc performs archive locking to protect from
190 multiple MHonArc process attempting to write to an archive
191 at the same time. This locking allows MHonArc to safely
192 be used to add messages as they are received.
193 </p>
194
195 <table class="note" width="100%">
196 <tr valign="baseline">
197 <td><strong>NOTE:</strong></td>
198 <td width="100%"><p>
199 As an archive increases in size, performing updates as
200 a message is received takes more processing time. Therefore, for
201 large archives, you may need to do updates through a periodic
202 batch process (like via <b>cron</b>(8)) to avoid time-out problems.
203 </p>
204 </td>
205 </tr>
206 </table>
207
208 <!-- ??????????????????????????????????????????????????????????????? -->
209 <hr noshade size=1>
210 <table border=0>
211 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
212 <h3><b><a name="forward">So it is safe. How do I do it?</a></b></h3>
213 </td></tr></table>
214
215 <p>Many users use <b>Procmail</b>
216 <a href="http://www.procmail.org/"
217 >&lt;http://www.procmail.org/&gt;</a> to call MHonArc
218 to archive messages. Procmail provides the ability to preprocess
219 mail as it arrives to do selective processing and automated tasks
220 with your mail.
221 </p>
222
223 <p>For illustrative purposes, the following simple example shows
224 a possible way of archiving messages as it arrives w/o using a tool
225 like Procmail.
226 This example assumes you are on a Unix-based system
227 using <a href="http://www.sendmail.org/"><b>sendmail</b></a>
228 as the mail transfer agent.
229 Please refer to documentation about <b>sendmail</b> if you
230 are not familiar with it
231 (<cite><a href="http://www.ora.com/catalog/sendmail2/noframes.html"
232 >sendmail, 2ed</a>, from O'Reilly</cite> is an excellent source).
233 </p>
234
235 <p>The approach shown here uses a
236 <b><tt>.forward</tt></b> file in the home directory of the
237 account you want mailed archived. For this example, let's
238 assume it is my account.
239 Here is how to set up the <tt>.forward</tt> file
240 to invoke MHonArc on incoming mail: </P>
241
242 <pre class="code">
243 \ehood, "|/home/ehood/bin/webnewmail #ehood"
244 </pre>
245
246 <table class="note" width="100%">
247 <tr valign="baseline">
248 <td><strong>NOTE:</strong></td>
249 <td width="100%"><p>
250 The "<code>\ehood</code>" tells <tt>sendmail</tt>
251 to still deposit the incoming message to my mail spool file. The
252 "<code>#ehood</code>" Bourne shell comment is needed to insure the
253 command is unique from another user. Otherwise, <tt>sendmail</tt>
254 may not invoke the program for you or the other user.
255 </p>
256 </td>
257 </tr>
258 </table>
259
260 <P><tt>webnewmail</tt> is a Perl program that calls
261 MHonArc with the appropriate arguments. A wrapper program
262 is used instead of calling MHonArc directly to keep
263 the <tt>.forward</tt> file simple, but you can call MHonArc
264 directly if you want. Here is the code to the
265 <tt>webnewmail</tt> program: </P>
266
267 <pre class="code">
268 #!/usr/local/bin/perl
269 # Edit above path to point to where perl is on your system.
270
271 ## Specify a package to protect names from MHonArc.
272
273 package WebNewMail;
274
275 ## Edit to point to installed mhonarc.
276
277 $MHonArc = "/home/ehood/bin/mhonarc";
278
279 ## Define ARGV (ARGV is same across all packages).
280 ## Edit options as required/desired.
281
282 <!--
283 -->&#64;<!--
284 -->ARGV = ("-add",
285 "-quiet",
286 "-outdir", "/home/ehood/public_html/newmail");
287
288 ## Just require mhonarc, this prevents the overhead of a
289 ## fork/exec.
290
291 require $MHonArc;
292
293 </pre>
294
295 <p>The <tt>webnewmail</tt> program has to have the executable
296 bit set. This is achieved by using "<tt><b>chmod a+x webnewmail</b></tt>".
297 </p>
298
299 <table class="note" width="100%">
300 <tr valign="baseline">
301 <td><strong>NOTE:</strong></td>
302 <td width="100%"><p>
303 For better scalability and resource usage, the author
304 recommends calling MHonArc from a facility like <b><tt>cron</tt></b>,
305 which is provided on Unix-based operating systems.
306 For those unfamiliar cron, it is a daemon that allows the execution
307 of commands on a scheduled basis.
308 </p>
309 </td>
310 </tr>
311 </table>
312
313 <!-- ??????????????????????????????????????????????????????????????? -->
314 <hr noshade size=1>
315 <table border=0>
316 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
317 <h3><b><a name="majordomo">How can I do it with Majordomo lists?</a></b></h3>
318 </td></tr></table>
319
320 <p>Here is a
321 template for archiving messages as they arrive for a
322 Majordomo list to include in sendmail's <tt>aliases</tt> file:
323 </p>
324 <pre class="code">
325 <em>xxxx</em>: "|<em>/usr/lib/majordomo/</em>wrapper resend -l <em>xxxx</em> <em>xxxx</em>-outgoing"
326 <em>xxxx</em>-outgoing: :include:<em>/var/lib/majordomo/lists/</em><em>xxxx</em>, <em>xxxx</em>-mhonarc
327 <em>xxxx</em>-request: <em>list-admin-address</em>
328 owner-<em>xxxx</em>: <em>list-admin-address</em>
329 <em>xxxx</em>-owner: <em>list-admin-address</em>
330
331 <em>xxxx</em>-mhonarc: "|<em>/usr/lib/majordomo/</em>wrapper mhonarc -add -quiet -outdir <em>/home/httpd/html/yyyyyyy</em> <em>-rcfile rcs.mrc</em> <em>-stderr /var/log/mhonarc</em>"
332 </pre>
333
334 <p>Replace text that <tt class="icode"><em>is rendered like this</em></tt> with
335 what is appropriate for your configuration.
336 </p>
337 <p>In order to run MHonArc with Majordomo's wrapper, the program has to
338 be in the same directory where the Majordomo programs are located.
339 An easy way to insure this is to create a symbolic link to in Majordomo's
340 program directory to where MHonArc is installed. For example:
341 </p>
342 <pre class="shell">
343 prompt&gt; <b>ln -s <em>/usr/bin/mhonarc</em> <em>/usr/lib/majordomo/mhonarc</em></b>
344 </pre>
345 <p>Make sure <em><tt>/usr/bin/mhonarc</tt></em> is readable and executable
346 by the majordomo user. Something like the following can be done
347 to insure this:
348 </p>
349 <pre class="shell">
350 prompt&gt; <b>chmod <em>755</em> <em>/usr/bin/mhonarc</em></b>
351 </pre>
352 <p>If you redirect stderr to a logfile, the logfile must
353 be owned by the majordomo user and be writable by the majordomo user.
354 The directory for that logfile must exist.
355 </p>
356 <p>The MHonArc-archive directory must be owned by the majordomo user
357 and must have the minimum access permission 755. Group ownership does not
358 matter.
359 </p>
360
361 <!-- ??????????????????????????????????????????????????????????????? -->
362 <hr noshade size=1>
363 <table border=0>
364 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
365 <h3><b><a name="different">Can I get MHonArc to filter messages to different archives?</a></b></h3>
366 </td></tr></table>
367
368 <p>No. This is outside of the MHonArc's scope. You can grow your
369 own filter, using the method described in the
370 <a href="#forward">previous question</a>, to
371 scan the message header an invoke MHonArc with the proper arguments.
372 Or. you can use a tool like
373 <b>Procmail</b>
374 <a href="http://www.procmail.org/"
375 >&lt;http://www.procmail.org/&gt;</a>.
376 </p>
377
378 <table class="note" width="100%">
379 <tr valign="baseline">
380 <td><strong>NOTE:</strong></td>
381 <td width="100%"><p>You may want to check out the following:
382 <strong><a href="http://www.mhonarc.org/release/mharc/">mharc</a></strong>
383 at <a href="http://www.mhonarc.org/release/mharc/"
384 >&lt;http://www.mhonarc.org/release/mharc/&gt;</a>:
385 Mharc is a web-based mail archiving system for multiple mailing
386 lists using Procmail, MHonArc, and Namazu.
387 </p>
388 </td>
389 </tr>
390 </table>
391
392 <p>Here are a some messages from users about using Procmail:
393 </p>
394
395 <blockquote class="mail">
396 <UL>
397 <LI><em>From</em>: Achim Bohnet &lt;<A HREF="mailto:ach&#37;40rosat.mpe-garching.mpg.de">ach<!--
398 -->&#64;<!--
399 -->rosat.mpe-garching.mpg.de</A>&gt;</LI>
400 <LI><em>Date</em>: Wed, 13 Nov 1996 13:56:08 +0100</LI>
401 </UL>
402 <pre>
403 <var>... some text deleted ...</var>
404
405 Here is what I use in .procmailrc to archive the mhonarc list:
406
407 NEWDATE="`/usr/bin/date +%Y-%m`"
408 MHONARC_MBOX="/local/mail/lists/mhonarc/$NEWDATE.mbox"
409 :0: $MHONARC_MBOX$LOCKEXT
410 * ^Sender:.*owner-mhonarc<!--
411 -->&#64;<!--
412 -->
413 {
414 :0 c
415 $MHONARC_MBOX
416
417 :0 c
418 | /local/mail/mhonarc-1.2.2/mailarchive -add mhonarc "$NEWDATE"
419 }
420
421 Mailarchive is nothing more than a wrapper around mhonarc with my long.
422 list of options.
423
424 Achim
425 P.S. Procmail itself comes with an example manual page. It's worth
426 looking into it.
427
428 </pre>
429 </blockquote>
430
431 <blockquote class="mail">
432 <UL>
433 <LI><em>From</em>: "Eric D. Friedman" &lt;<A HREF="mailto:friedman&#37;40hydra.acs.uci.edu">friedman<!--
434 -->&#64;<!--
435 -->hydra.acs.uci.edu</A>&gt;</LI>
436 <LI><em>Date</em>: Wed, 13 Nov 1996 06:38:42 -0800</LI>
437 </UL>
438 <pre>
439 You can actually dispense with the wrapper if you use environment
440 variables to pass options to MHonArc, but I'm sure Achim has a good
441 reason for doing it his way. Just for the purposes of comparion,
442 here's how I do it:
443
444 eeeweb% cat .procmailrc
445 #Set on when debugging
446 VERBOSE=off
447 #Replace `mail' with your mail directory (Pine uses mail, Elm uses Mail)
448 MAILDIR=$HOME/Mail
449 #Directory for storing procmail log and rc files
450 PMDIR=$HOME/.procmail
451 #Path and options for mhonarc
452 MHONARC='/dcs/packages/infosys/bin/mhonarc -add -quiet -umask 022 -idxfname inde
453 x.html'
454 :0
455 * ^Originator:.*<!--
456 -->&#64;<!--
457 -->classes.uci.edu
458 {
459 MHHOME=$HOME/classarc
460 LOGFILE=$PMDIR/classlists.log
461 INCLUDERC=$PMDIR/rc.classlists
462 }
463 :0 E
464 {
465 MHHOME=$HOME/mail-arc
466 LOGFILE=$PMDIR/otherlists.log
467 INCLUDERC=$PMDIR/rc.otherlists
468 }
469
470 and then in the file .procmail/rc.classlists or rc.otherlists (depending
471 on the Originator: of the message), lots of the following:
472
473 # Procmail Entry for uci-www
474 :0 E
475 * ^TOuci-www
476 {
477 :0 c
478 uci-www/.
479
480 :0
481 |$MHONARC -rcfile $MHHOME/uci-www/0-rcfile.html -outdir $MHHOME/uci-www
482 }
483
484 Eric D. Friedman
485 friedman<!--
486 -->&#64;<!--
487 -->uci.edu
488 </pre>
489 </blockquote>
490
491 <blockquote class="mail">
492 <UL>
493 <LI><em>From</em>: Paul McKinley &lt;<A HREF="mailto:mckinley&#37;40austin.asc.slb.com">mckinley<!--
494 -->&#64;<!--
495 -->austin.asc.slb.com</A>&gt;</LI>
496 <LI><em>Date</em>: Mon, 21 Apr 1997 15:29:08 -0500</LI>
497 </UL>
498 <pre>
499 <var>... some text deleted ...</var>
500
501 I use procmail to drive mhonarc archives from Majordomo. I set up a
502 single pseudouser and drive several archives from the one pseudouser.
503
504 Here's a sample .forward file:
505
506 "|/usr/ucb/rsh cappuccino \"set IFS=' '; exec
507 /usr/local/procmail/bin/procmail #widget\""
508
509 Another example is:
510
511 "|/bin/csh -c \"set IFS=' '; exec /usr/local/procmail/bin/procmail
512 #widget\""
513
514 Two reasons to use the "rsh cappuccino":
515 1. doesn't require the user to be able to login to server, although
516 the username must still be valid
517 2. gets the processing load off the mail server
518
519 Here's an example .procmail recipe:
520
521 LOGFILE=$HOME/procmail_errors
522 LOGABSTRACT=all
523 LOCKEXT=.lock
524 VERBOSE=on
525 UMASK=003
526
527 # widget: list short description
528 :0 H
529 * ^List-Name: widget
530 {
531 # The rotate call (under construction) does archive rotation
532 # leave commented!
533 #:0c i
534 #| /home/web-arch/bin/rotate /usr/local/web/webarchive/widget
535
536 # Put the mail in the mailbox, which is used by archiver to re-generate
537 # the html indexes
538 :0 cA
539 /usr/local/web/webarchive/widget/current/mbox
540
541 # The mhonarc call examines mbox, turns the mail messages into .html
542 # documents, and compiles the indexes.
543 # -reverse -treverse\
544 :0 ia
545 | /usr/local/mhonarc/bin/mhonarc \
546 -idxfname index.shtml \
547 -tidxfname threads.shtml \
548 -rcfile widget.rc\
549 -outdir /usr/local/web/webarchive/widget/current \
550 /usr/local/web/webarchive/widget/current/mbox
551
552 }
553
554 I have a directory per archive, and put the current period in directory
555 "current". Then I have an index page per archive that indexes the
556 periods, plus gives information about the list and how to
557 subscribe/unsubscribe. The widget.rc file resides in the pseudouser's
558 home directory.
559
560 Note the
561 * ^List-Name: widget
562 I put the following in the majordomo list's config file:
563
564 message_headers &lt;&lt; END
565 List-Name: widget
566 END
567
568 This adds the "List-Name" header to messages, which is what procmail
569 filters for.
570
571 Hope this helps
572
573 Paul McKinley
574 Unix SysAdmin Contractor
575 </pre>
576 </blockquote>
577
578 <!-- ??????????????????????????????????????????????????????????????? -->
579 <hr noshade size=1>
580 <table border=0>
581 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
582 <h3><b><a name="exclude">Does MHonArc support the "no archive" flag in messages?</a></b></h3>
583 </td></tr></table>
584
585 <p>Version 2.4, or later, does via the
586 <a href="../resources/checknoarchive.html">CHECKNOARCHIVE</a>
587 resource.
588 </p>
589
590 <p>If using an earlier version, or if you are already doing some preprocessing,
591 you can use a pre-processor like <b>Procmail</b>
592 to do the filtering. Here is a message sent to the
593 <a href="mailto:mhonarc-users&#37;40mhonarc.org">MHonArc mailing list</a>:
594 </p>
595
596 <blockquote class="mail">
597 <UL>
598 <LI><em>Subject</em>: Re: No archive</LI>
599 <LI><em>From</em>: Christopher Lindsey &lt;<A HREF="mailto:lindsey&#37;40ncsa.uiuc.edu">lindsey<!--
600 -->&#64;<!--
601 -->ncsa.uiuc.edu</A>&gt;</LI>
602 <LI><em>Date</em>: Thu, 1 Oct 1998 11:33:07 -0500 (CDT)</LI>
603 </UL>
604 <pre>
605 &gt; Subscribers who don't want their messages to be archived
606 &gt; could add a "no archive" flag within their mail.
607
608 The most common way to do this is by checking for the existence
609 of an 'X-no-archive: yes' or 'Restrict: no-external-archive' header.
610
611 &gt; As I'm invoking MHonArc through a procmail recipe I guess
612 &gt; it's possible to do this within the recipe.
613
614 Very easy:
615
616 # If people don't want to be archived, then remove their
617 # message
618 :0
619 * ^(X-no-archive: yes|Restrict: no-external-archive)
620 /dev/null
621
622 Chris
623 </pre>
624 </blockquote>
625
626 <!-- ??????????????????????????????????????????????????????????????? -->
627 <hr noshade size=1>
628 <table border=0>
629 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
630 <h3><b><a name="addsafe">Is it safe to specify <tt>-add</tt> when no archive exists?</a></b></h3>
631 </td></tr></table>
632
633 <p>Yes. If MHonArc sees no archive exists when perform
634 an add, it will automatically create the archive.
635 </p>
636
637 <table class="caution" width="100%">
638 <tr valign="baseline">
639 <td><strong style="color: red;">WARNING:</strong></td>
640 <td width="100%"><p>
641 If using MHonArc versions 2.4, or earlier, make sure the file
642 <tt>maillist.html</tt> (or the value
643 of the IDXFNAME resource) does not exist if no archive exists and
644 <tt>-add</tt> has been specified. Otherwise, unpredictable output
645 of the <tt>maillist.html</tt> file may result if <tt>maillist.html</tt>
646 is not in the proper format.
647 </p>
648 </td>
649 </tr>
650 </table>
651
652 <!-- ??????????????????????????????????????????????????????????????? -->
653 <hr noshade size=1>
654 <table border=0>
655 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
656 <h3><b><a name="jumps">Why are there "jumps" in message numbers?</a></b></h3>
657 </td></tr></table>
658
659 <p>Big gaps in the message number sequence may occur if you
660 defined the
661 <a href="../resources/maxsize.html">MAXSIZE</a>
662 resource and you have
663 MHonArc rescanning a mail folder for adding new messages.
664 The problem occurs when MHonArc
665 reads in messages that will automatically get deleted due
666 to
667 <a href="../resources/maxsize.html">MAXSIZE</a>.
668 Ie. Messages subject to automatic deletion are
669 the oldest ones. If the input contains old messages that will
670 get deleted at the end of processing, the old messages will
671 still use up message numbers since messages to be deleted are not
672 determined until all input is read. Since MHonArc does
673 not keep information about deleted messages, if the messages are
674 fed into MHonArc again, the "jumping" will occur
675 again (and the jump will get larger for each additional update).
676 </p>
677
678 <p>To avoid the problem, try to pass only new, never processed,
679 messages to MHonArc instead of having MHonArc
680 rescanning the same mail folder for new messages. Another
681 approach is to set either the
682 <a href="../resources/expireage.html">EXPIREAGE</a> or
683 <a href="../resources/expiredate.html">EXPIREDATE</a>
684 resources (available in v2.0 beta 2,
685 or later). These work as an alternative to
686 <a href="../resources/maxsize.html">MAXSIZE</a>
687 and will help in
688 preventing message number jumping since expiration of a message is
689 checked when it is initially read (bypassing the assignment of
690 a message number). </p>
691
692 <!-- ??????????????????????????????????????????????????????????????? -->
693 <hr noshade size=1>
694 <table border=0>
695 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
696 <h3><b><a name="dups">Why do some messages get re-added each time MHonArc processes a mail folder?</a></b></h3>
697 </td></tr></table>
698
699 <p>This condition may occur when you have MHonArc examine the
700 same folder periodically to add any new message. If there are
701 messages in the folder without message-ids, then those messages
702 will be re-added each time MHonArc runs.
703 </p>
704
705 <p>Why? Well, MHonArc uses message-ids for determining if a
706 message has been archived, or not. Therefore, if a message-id
707 is missing for a message, then MHonArc believes it is new.
708 </p>
709
710 <p>In general, mail has message-ids. They get assigned by
711 MTAs. However, if messages are generated by a CGI
712 program, or other non-mail specific software, then the program
713 in question should create a message-id. Else, you will need
714 to move already-processed messages into a different area so
715 MHonArc does not read them again.
716 </p>
717
718 <table class="note" width="100%">
719 <tr valign="baseline">
720 <td><strong>NOTE:</strong></td>
721 <td width="100%"><p>
722 In MHonArc v2.4 and later, and if you have
723 the <b>Digest::MD5</b> module installed, MHonArc will compute
724 the MD5 digest of message headers without message-ids. This
725 allows MHonArc to skip the message in subsequent add operations.
726 </p>
727 </td>
728 </tr>
729 </table>
730
731 <p>A related problem is messages showing up again in the archive
732 after you deleted them with RMM. MHonArc does not keep track of
733 delete message-ids. Therefore, if want to make sure that
734 a message will not appear in the archive after explicitly deleted
735 via RMM, make sure to remove the message from input source.
736 </p>
737
738 <!-- ??????????????????????????????????????????????????????????????? -->
739 <hr noshade size=1>
740 <table border=0>
741 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
742 <h3><b><a name="remove">How do I remove messages from an archive?</a></b></h3>
743 </td></tr></table>
744
745 <p>Automatic removal can be done via the
746 <a href="../resources/expireage.html">EXPIREAGE</a> or
747 <a href="../resources/expiredate.html">EXPIREDATE</a>
748 resources (available in v2.0 beta 2,
749 or later) or the
750 <a href="../resources/maxsize.html">MAXSIZE</a>
751 resource.
752 </p>
753 <p>Explicit message removal can be done with the
754 <a href="../resources/rmm.html">RMM</a>
755 resource. Please read the RMM resource page for more information
756 and examples.
757 </p>
758
759 <!-- ??????????????????????????????????????????????????????????????? -->
760 <hr noshade size=1>
761 <table border=0>
762 <tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
763 <h3><b><a name="tombox">Can I convert an archive back to mailbox format?</a></b></h3>
764 </td></tr></table>
765
766 <p><a href="mailto:anthonyw&#37;40albany.net">Anthony W</a> developed a
767 Perl program called <tt>mhn2mbox</tt> for converting archives back
768 into mailbox format. A copy of the script is included in the contrib
769 directory of the MHonArc distribution.
770 </p>
771
772 <!-- ===================================================================== -->
773 <hr>
774
775 <!--X-NavButtons-Start-->
776 <table width="100%"><tr><td align="left"><nobr>[<a href="usage.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="indexpgs.html">Next</a>]</nobr></td></tr></table>
777 </p>
778 <!--X-NavButtons-End-->
779
780 <hr>
781 <address>
782 $Date: 2005/06/07 19:17:25 $ <br>
783 <img align="top" src="monicon.png" alt="">
784 <a href="http://www.mhonarc.org/"
785 ><strong>MHonArc</strong></a><br>
786 Copyright &#169; 1997-2001, <a href="http://www.earlhood.com/"
787 >Earl Hood</a>, <a href="mailto:mhonarc&#37;40mhonarc.org"
788 >mhonarc<!--
789 -->&#64;<!--
790 -->mhonarc.org</a><br>
791 </address>
792
793 </body>
794 </html>