Announcing the new Courier-IMAP installation script (version 2).

Packagers: you can now create a master package of Courier-IMAP, with
the base package providing basic system authentication, and additional
add-on packages that add LDAP and MySQL authentication ability.

Additionally, starting with version 1.3, configuration files can be
upgraded automatically, see below.

Here's how.

A) Build Courier-IMAP on a machine that has OpenLDAP and MySQL development
   libraries.  Choose the default option to build the authdaemon module.

B) Run make install.

C) Package everything that gets installed, EXCEPT for authdaemon.ldap and
   authdaemon.mysql, into the base package.

D) Package authdaemon.ldap into the ldap subpackage. 

E) Package authdaemon.mysql into the mysql subpackage.

F) The base package is installable on ANY system, it does not need MySQL
   or OpenLDAP.  The subpackages are installable only on those system
   that have the necessary runtime OpenLDAP and MySQL libraries.

That's it.

VERSION 1.3 AUTOCONFIGURATION

Courier-IMAP 1.3 includes a new script to upgrade configuration files.
Previously each new version copied default configuration files, with default
settings.  It was necessary to back up the current configuration, and reenter
it after upgrading.

Configuration scripts in Courier-IMAP 1.3 include some additional metadata that
allows them to be intelligently updated.  For this to work both the old
and the new version must include the metadata.  Therefore, the first upgrade
to a version with the new configuration files will still install a default
configuration, and back up the existing configuration.  Subsequent updates
will, however, be carried out automatically.

Also, as long as configuration installation has been overhauled, this was
also used as an opportunity to rename some configuration files:

Old name            New name
--------            ---------
imapd.config        imapd
imapd-ssl.config    imapd-ssl
pop3d.config        pop3d
pop3d-ssl.config    pop3d-ssl

A new step has been added to the installation document:
"make install-configure" to be performed after "make install".
"make install-configure" will install the new configuration files, but
preserve the existing configuration, provided that it's compatible.

The output of "make install-configure" should be saved.  It will list
each configuration setting, and its eventual disposition.

See INSTALL for more information.

Make install-configure should only be used when installing Courier-IMAP
by hand.  To create an installable package, do not run make install-configure
during the build, instead:

* After running make install, obtain the list of all $sysconfdir/*.dist
files.  The configuration files that are installed by 'make install'
are named 'filename.dist', instead of 'filename' (well, filename.config)
as was the case previously.

* Add the sysconftool script to the installation package.  'make install'
does not automatically install the 'sysconftool' script anywhere, because
'make install-configure' runs it directly from the source directory.
You want to include the tiny sysconftool script in the installed package.

* When the package is installed, the post-installation script must run
sysconftool, and provide the filename list $sysconfdir/*.dist as its
arguments.  sysconftool takes each filename.dist and copies it to
filename.  Additionally, if there is an existing filename, its
configuration settings are automatically preserved.  Additionally, the
previous filename is automatically backed up as filename.bak, by
sysconftool.

As a rough example, you need to do something like this during packaging:

ls $sysconfdir/*.dist >$datadir/courier-imap/configlist
cp sysconftool >$datadir/courier-imap/sysconftool

Then, your package installation script runs the following after the
package is installed:

$datadir/courier-imap/sysconftool `cat $datadir/courier-imap/configlist`
