MHonArc v2.5 -- Release Notes

# Release Notes

Read the `CHANGES` document included in the distribution for a more complete summary of changes to MHonArc. This document highlights important changes that have occurred and important usage details which you should be aware of before using MHonArc. If you are upgrading from a previous release, make sure to check for the highlighted incompatibilites from earlier releases.

- Compatibility Notes
  - UPGRADING FROM v2.4.x OR EARLIER: DEFRCNAME Change
  - UPGRADING FROM v2.4.x OR EARLIER: HEADER and FOOTER Removed
  - UPGRADING FROM v2.4.x OR EARLIER: MIMEFILTERS API Change
  - UPGRADING FROM v2.1.x OR EARLIER: Database Format Change
  - DOWNGRADING TO OLDER VERSIONS
- General Notes

## Compatibility Notes

This sections provides notes dealing with compatibility issues if upgrading from a previous release of MHonArc:

### UPGRADING FROM v2.4.x OR EARLIER: DEFRCNAME Change

The default value for the DEFRCNAME is now called "`.mhonarc.mrc`", or "`mhonarc.mrc`" under Windows and VMS. The old value was "`.mhonarc.rc`", or "`mhonarc.rc`". If you use the default resource file, you will need to rename the file to match the filenames used for v2.5 and later.

### UPGRADING FROM v2.4.x OR EARLIER: HEADER and FOOTER Removed

The HEADER and FOOTER resources are no longer supported. If you are using these resources, the HEADER content and FOOTER content will be lost once v2.5, or later, of MHonArc processes an archive containing these resources.

The HEADER and FOOTER resources have been deprecated for a long time since they only applied to the main index; the thread index has no equivalent. The IDXPGBEGIN or LISTBEGIN resources can be used to achieve the same effect of HEADER. The IDXPGEND or LISTEND can be used to achieve the same effect of FOOTER.

### UPGRADING FROM v2.4.x OR EARLIER: MIMEFILTERS API Change

The API for data filters registered via MIMEFILTERS is not capability with filters written for v2.4.x and earlier. See CHANGES and the documentation for the MIMEFILTERS resource for the API.

If you use custom style filters written for v2.4.x, or earlier, you will need to update them for them to work properly under v2.5, and later.

### UPGRADING FROM v2.1.x OR EARLIER: Database Format Change

If you have archives created with v2.1.x, or earlier, you must update the archives before using versions v2.2, or later. The format of how mime-related information is stored has changed.

To update your archives, you use the `mha-dbedit` program using the `def-mime.mrc` in the examples directory. For example:

        mha-dbedit -rcfile examples/def-mime.mrc \
    	       -outdir /path/to/archive

Make sure that the mhonarc you are using is v2.2, or later. Change the -rcfile and -outdir pathnames to reflect where you are running mhonarc and where your archive is located, respectively.

Note, if your archives are using custom settings of MIMEFILTERS, MIMEARGS, and/or CHARSETCONVERTERS resources, you will need to create a variant version of def-mime.mrc (included in the examples directory) to include your settings and use the variant version when updating your archives.

### DOWNGRADING TO OLDER VERSIONS

Downgrading to an earlier version of MHonArc can be dangerous, especially if downgrading to an older version that used different storage formats in archive database files from the current version in use. If an older version of MHonArc is used to process an archive last updated by a new version, archive data can get lost and/or unexpected output can occur.

Changes in archive format are not common, so downgrading can be okay depending on the versions involved. The key versions to watch out for are the ones noted in this section where database format changes have occured. The following lists release numbers where a format change occured:

- 2.0.0
- 2.2.0
- 2.5.0

For example, if an archive was last updated with v2.5.0, processing the archive with a previous release will cause problems.

A possible method for successfully downgrading to a release with differences in the database format, is to try to reconstruct the database file using the `mha-dbrecover` utility contained in the MHonArc version the archive is being downgraded to.

Of course, the safest way to downgrade is to recreate an archive from the original raw mail data. It is good practice to preserve the raw mail data in some form for cases like these and for general archive recovering situations due to file corruption or other system failures.

## General Notes

- For v2.5, the default text/html filter (mhtxthtml.pl) will now convert auto-loaded URL attributes to '`javascript:void(0);`' for some HTML elements -- `IMG`, `BODY`, `IFRAME`, `FRAME`, `OBJECT`, `SCRIPT`, `INPUT` -- except for cid: URLs. This behavior can be disabled if the '`allownoncidurls`' filter argument is specified.

  The new behavior is to prevent malicious URLs that verify mail addresses for spam purposes, secretly set cookies, or gather some statistical data automatically with the use of elements that cause browsers to automatically fetch data.

- ISO-8859 character set data processing now defaults to using the `MHonArc::CharEnt` module in v2.5. The old `iso8859.pl` library is still provided for compatibility with older archives. To update archives to use the new settings, you can run the following command,

          mha-dbedit -rcfile examples/def-mime.mrc \
      	       -outdir /path/to/archive

  where "examples/def-mime.mrc" represents the default MIME processing resources for MHonArc provided within the MHonArc distribution.

- The value of the TSLICE resource is used to determine the number of messages to update, before and after by thread, of each new message added. To insure that messages within a thread slice are updated when a new message is added, make sure the before and after ranges specified for TSLICE is equal to maximum before and the maximum after range arguments specifed in the uses of the `$TSLICE$` resource variable. For example, if you have `$TSLICE(0;4)$` and `$TSLICE(3;3)$` in message layout resources, you should set TSLICE to `3:4`.

  If you only use `$TSLICE$` once, it is best to set options for thread slice formatting via the TSLICE resource so you will not have anything to worry about.

- If updgrading from v2.4.x, or earlier, reference and follow-up information of a message is now stored in a different format in the database (and internally). MHonArc will auto-update older archives to the new format, so no action should be required on your part.

- If upgrading from v2.1.x, or earlier, any custom filters you have developed may need to modified. If your filter accessed some main variables, your filter will not operate properly. All variables that used to be in package "main" are no longer. The major variables are now in package "mhonarc". For example, `$::OUTDIR` is now `$mhonarc::OUTDIR`. See the MIMEFILTERS resource page for more information.

- See the warnings in the documentation for the HTMLEXT and MSGPREFIX resources before using them.

- Occasionally, a new release of MHonArc may contain new MIME filters. See the `CHANGES` file to check if any new filters have been added.

  If you confirm that new filters have been added, and you want to apply them to your archives, you use the `mha-dbedit` program using the `def-mime.mrc` in the examples directory. For example:

          mha-dbedit -rcfile examples/def-mime.mrc \
      	       -outdir /path/to/archive

  Change the -rcfile and -outdir pathnames to reflect where you are running mhonarc and where your archive is located, respectively.

  Note, if your archives are using custom settings of MIMEFILTERS, MIMEARGS, and/or CHARSETCONVERTERS resources, you will need to create a variant version of def-mime.mrc (included in the examples directory) to include your settings and use the variant version when updating your archives.