|
Appendix: Utility ProgramsThis appendix describes the additional utility programs that are included in the MHonArc distribution. The utility programs are installed with mhonarc during the installation process. mha-dbeditmha-dbedit allows modifications to be made to an archive database without regenerating any archive pages. Typical usage: shell> mha-dbedit -rcfile res.mrc -outdir /path/to/archive mha-dbrecovermha-dbrecover recreates an archive database from the individual message pages. This program is useful if an archive database gets corrupted, or accidentally deleted. Typical usage: shell> mha-dbrecover -outdir /path/to/archive If the archive used different resource settings from the defaults for controling filenames, then you must specify those settings when invoking mha-dbrecover. For example, if you are using "shtml" for HTMLEXT, then you should invoke mha-dbrecover like the following: shell> mha-dbrecover -htmlext shtml -outdir /path/to/archive mha-dbrecover will only recreate non-layout message related data. If the archive had resource settings that were different than the the defaults, then those resource settings must be specified when invoking mha-dbrecover. For example: shell> mha-dbrecover -rcfile res.mrc -outdir /path/to/archive Additional Optionsmha-dbrecover supports the additional command-line options:
Using the number range options are typically not needed, but may be useful if the archive is maintained with a MAXSIZE (or EXPIREAGE), and KEEPONRMM is active. The message number range options will allow you to minimize recovering processing by having mha-dbrecover skip messaages that will be dropped from the database due to the MAXSIZE, or EXPIREAGE, setting. For example, say you have an archive directory with 1000 message pages numbered 0 through 999, and the maximum size of the archive is 200. The following command will make recovering more efficient by skipping the first 800 messages since they will be dropped from the database anyway: shell> mha-dbrecover -dbr-startnum 800 -outdir /path/to/archive
mha-decodemha-decode is a utility program unrelated to MHonArc archives. mha-decode provides basic MIME decoding capabilites for messages. If given mail folders as input, all messages within in the mail folders will be decoded. All message parts are written to files. If a filename is specified for a message part, that filename will be used when writing the part to a file. If no filename is specified in the message, a unique name will be used based upon the content-type of the message part. A single message can be decoded by using the -single option. Only MHonArc options that affect parsing of mail folders are applicable for mha-decode. The following options are applicable: -conlen, -mhpattern, -msgsep, -noconlen, -outdir, -perlinc, -rcfile, -single, -umask.Additional Optionsmha-decode supports the additional command-line options:
ExamplesBasic usage: shell> mha-decode inbox Use -outdir to have all decoded data placed into a separate directory: shell> mha-decode -outdir /var/tmp inbox And to decode a single message: shell> mha-decode -single msg.822 or from standard input: shell> some_program | mha-decode -single Save out attached messages and then pass them into MHonArc to be added to a archive: shell> mha-decode -dcd-digest -single digest shell> mhonarc -outdir /path/to/archive -mhpattern '^822.*\.822$' . Note: There is a trailing dot, '.', at the end of the called to mhonarc to tell mhonarc to process the current working directory. Note: You may need to reset the MHPATTERN resource if normal input into the archive is from MH-style mail folders. $Date: 2002/05/03 04:30:50 $ MHonArc Copyright © 1998-1999, Earl Hood, mhonarc@mhonarc.org |