FILOFANT INSTALL GUIDE

Installation
Currently there is no installscript, so you
have to do all at your own...

1) Binaries
configure && make & make install
in the src directory.
It is recommended to provide an prefix for
the installation like --prefix=/opt/filofant


You can also set the path for the data storage place in
filofant while configuration. Use the directive

--with-datadir=path

eg. --with-datadir=/opt/data

default value for this directive is /usr/local/filofant


2) CGIs
The CGIs will be installed in $PREFIX/bin/cgi-bin.
If this is not the cgi-directory of your webserver,
you should move them there.

3) Environment
filofant needs the variable FILOFANT_HOME to declared,
to find its config and binary files. It this variable
is not defined, the base config has to be stored at
/etc/filofant.rc

This variable has to be set for the CGI also, eg in Apache
you could set it with the SetEnv directive.
If you dont set FILOFANT_HOME, all data files for filofant will
be stored in the default location /usr/local/filofant

You can change this value also from the database configuration
settings (see below)

4) System
Create a systemuser for the filofant (eg. filofant). The user
has to be access to the base directory ($FILOFANT_HOME) of the
installation.

5) Database
PostgreSQL:
Create a database with the createdb command, create an user
of the same name as the system user with the createuser command

NOTE: If you have your database located at the same host as the
filofant mailimport process, you can use the bulkload feature
of postgresql from file, which is much faster than over network.
(See also the LocalDB configuration below)
In order to make this possible, this user has to be database
administrator.

su to the filofant user.
Insert database schema from the file filofant.sql (in directory sql)
If you have nonstandard system user for the webserver or the
filofant, please correct the grants in the sql file before inserting
it.

6) Base configuration
The file filofant.rc has to be located in the directory
$FILOFANT_HOME/etc. Edit (or create) this file and enter
the following lines:

BaseDir=/opt/filofant
User=filofant
DBUser=filofant
DBName=filofant

Fill in the appropriate data. I you have password protection
at the database or the database is not at the same machine, add
the following lines:

DBPwd=
DBPort=
DBHost=

7) Test configuration

Run the script ffcfg and check if the output correspond
with the given data.

8) Additional configuration

Add the loglevel
ffcfg loglevel=debug
After the installation set it to
ffcfg loglevel=no

Possible values are: no, trace, error, debug

Add the Path for storing the documents

ffcfg mailpath=/opt/filofant/data

Please note that the filofant system user _and_ the
webserver user needs to have write access to this direcrory
at the moment!

9) Add templates to the database
Change into directory templates and call the mktempl.sh script:

sh mktempl filofant

Where filofant is the name of the database.

10) Call the cgi-interface
Try to access the cgi-interface with your browser.
your.server/cgi-bin/filofant
or
your.server/cgi-bin/admin
should work. Log in with user admin, pwd ff_admin.

11) Try to import an email
Import an emailfile (mbx-format) with
mailimport filename.
Check for syslog messages if process is ended
correctly.

12) start ffdaemon
ffdaemon does the following things:
.) Create the cronjob entries after receiving a
database notification from the admin cgi.
.) Start the mailimport processes

There is an example for a sysV init-script in the
install directory. Try to use this, otherwise start
ffdaemon from rc.local.
ffdaemon has to be started after the postmaster!

13) get mails from pop-account

There is a helper application (startjob) which
gets the database entries from the admin interface and
transforms it into fetchmail rc-files. Fetchmail is
invoked after this from the startjob.sh file and
pulls the mail to the local users mail file.

To start the processing of the files, you have to
create a procmail rule and pipe the mails to the
ffmailsplit tool. This tool will do some preprocessing
and saves the mails in the appropriate directory
for ffdaemon.

ffdaemon creates a crontab rule for the startjob
process, if the neccesary entries in the scheduler
are made.

14) Indexing filesystems
Create the groupinputs in the admin frontend and
select the time where the indexing should start
in the scheduler settings.

At the given time, the scheduler starts a startjob
which prepares the neccesary configurations and
starts the indexing.

Appendix 1) Change Configuration parameters

System parameters can be changed and retrieved with
the ffcfg command. Calling just ffcfg gives you a list
of all previous set parameters.
Possible parameters are:

Name: LogFile
Possible values: stderr, stdout, syslog
Default value: syslog
Description: Target of the logging output.

Name: WorkPath
Possible values: Any filesystem directory
Default value: FILOFANT_HOME/work
Description: The workdirectory for the mailimport tasks started

by ffdaemon

Name: NewMailDir
Possible values: Any filesystem directory

Default value: $FILOFANT_HOME/new
Description: The location where ffdaemon looks after new mailfiles

Name: ErrMailDir
Possible values: Any filesystem directory
Default value: $FILOFANT_HOME/err
Description: The directory where mailfiles will be moved after an
import error.

Name: Path
Possible values: Any filesystem directory
Default value: $FILOFANT_HOME/bin
Description: Path the the filofant binaries

Name: SpoolDir
Possible values: Any filesystem directory
Default value: $FILOFANT_HOME/spool
Description: Directory for ffdaemon lockfiles

Name: WorkDirCount
Possible values: 1-n
Default value: 3
Description: Count of parallel used work directories for importing
mails. This count is also limiting the count of processes for
the import.

Name: LocalDB
Possible values: 0, 1
Default value: 1
Description: If Localdb==1, it is assumed that the DB server is running
on the local host and has access to the /tmp directory. Therefore the
bulk loading of the dictionary entries take place via loadfiles. When
LocalDB==0, bulk loading via network is used (slower).

Name: MailPath
Possible values: Any Filesystem directory
Default value: $FILOFANT_HOME/data
Description: The storage path for archived mail parts.

Name: nodb.html
Possible values: Any filesystem file
Default value: $FILOFANT_HOME/html/nodb.html
Description: This file will be displayed when no database
connection can be opened.

Name: InstalledLanguages
Possible values: List including de, en, tr, comma seperated
Default value: de,en,tr
Description: A list of installed languages with existing templates

Name: DefaultLanguage
Possible values: Any of InstalledLanguages
Default value: en
Description: When no language is recognized from teh browser, this
one is used.

Name: SessionLen
Possible values: 1-n
Default value: 20
Description: Length of the session in minutes

Name: SearchAction
Possible values: mail, files
Default value: empty
Description: The default setting for the Source combobox in the
search form.

Name: HtmlRoot (Deprecated)
Possible values: Any filesystem directory
Default value: $FILOFANT_HOME/html
Description: Root of the template structure

Name: LocalDB
Possible values: 0,1
Default value: 1
Description: Sets the usage of the bulkload from file feature of POstgreSQL
  0: Loads over network (This is for remote databases or non-administrator db user)
  1: Loads from file