Libelle Mail Archive Manual

Downloaded file placement and customisation

The zip archive

The zip archive should be unpacked in the Libelle Mail Archive user's home directory. It contains a set of files that will unpack into the same directory as the zip archive and one directory which contains SQL scripts.

All the files in this directory must be owned by the Libelle Mail Archive user.

SQL scripts

These should work without modification. Their use is described later.

Configuration files

These files should be left in the directory where the loader and backup programs will be run.

The three Libelle Mail Archive configuration files, which have .conf extensions will need to be customised for your installation. All are extensively commented:

mailarchive.conf

All parameters must be set to suit your installation. The first group are used by all Libelle Mail Archive programs to access the database that stores the archive.

Parameter name Meaning As supplied
db_driver database driver name postgresQL
db_name database name //zoogz/marchive
db_user database login name marchive
db_password database password n/a

The remaining parameters are used by the archive search program, MASearch.

Parameter name Description
archive_user
smtp_server
smtp_user
smtp_password
These are typically system-wide values. They set the sender name used by MASearch when mailing a retrieved message back to the user and define the SMTP server and login details it will use.
search_user Is the user's e-mail address. The value set by MASetProductionDB is a default and will be overidden by MASearch's command line option so each MASearch user receives their search results in their usual inbox.
mabackup.conf

This file controls the backup program, MABackup. You only need to edit this if you intend to do incremental backups rather than use your RDBMS backup utilities. The only parameters that should normally be changed are:

Parameter name Description
maxfilesize 10000 is a good starting point
home_directory
where MABackup will be run
backup_directory where the incremental backups and control data will be kept. Typically this will be on a backup disk that is normally kept offline and that can be mounted while a backup is done.
maloader.conf This file controls MALoader, which adds messages to the archive. Every parameter is described in the comments that immediately precede it in the file. Edit the file to define the way that MALoader will operate during a normal mail archiving run.
ehcache.xml
log4j.properties
mstor.properties
These files configure packages that MALoader and MABackup are dependent on. They should not need any changes. Put copies of them in the directory that contains the jar files.

Shell scripts

The remaining files are shell scripts. All of them must be edited to customise them for your environment.

runBackup
runFixMessages
runLoader
runParm
runSearch
runSetConfig
runTestConfig
runUpdate
Edit the second 'launcher' definition to set the absolute pathname of the MailArchive.jar file to match your configuration.
These are are all wrapper scripts that run MABackup, MAFixMessages, MALoader, MAParm, MASearch, MASetConfig, MATestConfig and MAUpdate respectively.
MASetProductionDB

This script updates the copy of mailarchive.conf in MailArchive.jar.

The mailarchive.conf file is only used during development when Libelle Mail Archive is not run from a jar file. This provides an easy way to use separate databases for development and production.

  • In the development environment classes are run from the package directory tree and read parameters from a copy of mailarchive.conf in the working directory.
  • During production runs programs are executed from the MailArchive.jar file and read mailarchive.conf as a resource from the jar file.

The options for runSetConfig must be given the same values as you used in mailarchive.conf. The script as issued contains the values used in my testing environment. Change them as shown below:

Option Meaning As supplied
-t Database driver name.
Defaults to 'postgresql' if omitted.
omitted
-n Database name. //zoogz/marchive
-u Database login name. marchive
-p Database password.
Defaults to 'n/a' if omitted.
omitted
-a Mail Archive's e-mail address. marchive@gregorie.org
-e Default destination address for search results. martin@gregorie.org
-s Mail server name. zoogz
-q Mail server SMTP account name. marchive
-r Mail server SMTP password. nzl128

These files should be on the search path of all users who have permission to run them. runSearch will be used by anybody who is allowed to search the archive and retrieve mail messages from it. The rest will not normally be used by anybody except the archive administrator.

Jar files

The three jar files must be placed in the same directory. This must also contain the prerequisite jar files or symbolic links to them.

The site-specific changes to mailarchive.conf must be applied to MailArchive.jar, preferably after the jar file has been installed alongside the other prerequisite jar files. Apply the site-specific changes by changing your current directory to the one holding the jar file and running

MASetProductionDB