If you are upgrading from a previous version of ifile, please read the UPGRADE
file.
If you haven't already, please read the NOTES file before installing.

To install the ifile executables in /usr/local/bin, do the following:

	./configure --prefix=/usr/local
	gmake
	gmake install

If your "make" executable is GNU make, you should substitute "make"
for "gmake".  If no errors are reported, all the executables will have been
installed.  All of the executables can be executed from the command line
and most of them will yield usage instructions if given a "--help" command
line option.

After having installed the executables, you should check to make sure
that the ifile executables are in directories that are part of your
path. An easy way to check is to run "ifile --version" from the
command line.  ifile should print a version number and exit.

Next, you should run the knowledge_base.<mail_client> executable that
corresponds to your mail client.  This will build a database of your
mail, storing it in ~/.idata.  This may take a few minutes,
especially if you have a large mail corpus or your mail is accessed
via a network file system.  Most generated ~/.idata files are less
than half a megabyte in size.

Once you've done this, you will need to give your mail client an
interface to the ifile system.  This entails giving your mail client
knowledge of how and when it should call the ifilter and irefile
executables.

Below lists mail clients I or other ifile users have adapted ifile to.
If you find your mail client in the list, follow the given
instructions on how to complete your installation.  If you do not find
your mail client on the list, then if such adaption is possible, it
will require a bit of hacking.  Run "ifilter.mh --help" for
information on the ifilter.mh interface.

NOTE: if you will be using slocal (via MH or EXMH) to filter your
mail, please read the section entitled SLOCAL.

##################
# --- SLOCAL --- #
##################

If you have yet to create a .maildelivery file, make sure that after you
create it, it is given permissions 0600 (chmod 0600 ~/.maildelivery).

If you plan to use slocal to filter your mail, add the following line
to your .maildelivery file:

* - ^ ? ifilter.mh

If you add this at the beginning of your ~/.maildelivery file, all of your
mail will be directly filtered through ifile.  If you put this at
the end of your ~/.maildelivery file, ifile will only filter those
messages that aren't filtered by other rules.

You should make sure to include a default rule in your .maildelivery file
which filters all mail to your inbox (or some other chosen default folder).
This default rule should go after all other rules and should look something
like the following:

default - ^ ? "/path/to/rcvstore/rcvstore +inbox"

If something goes wrong with ifilter.mh, this line will cause your
mail to be placed in your inbox instead of causing it to be lost.

slocal does not seem to pass the PATH environment variables to the
programs it executes.  Thus, before using slocal with the ifile
system, you will need to edit /usr/local/bin/ifilter.mh and specify
the locations of the rcvstore and ifile binaries (by modifying the
initial values of the $mh_rcvstore and $ifile_binary varaibles).

##############
# --- MH --- #
##############

Add the following line to your .mh_profile:

fileproc: /usr/local/bin/irefile.mh

This will allow ifile to track messages that you move between folders
(so that it can keep up-to-date of how you organize your messages)

If you use slocal to filter your mail, add the following line to your
.maildelivery file:

* - ^ ? ifilter.mh

If you add this to the beginning of your ~/.maildelivery file, all of
your mail will be directly filtered through ifile.  If you put this at
the end of your ~/.maildelivery file, ifile will only filter those
messages that aren't filtered by other rules.

If you do not use slocal for mail delivery, you will need to devise a method
for passing messages through ifilter.mh.  Run "ifilter.mh --help" for
information on the ifilter.mh interface.

################
# --- EXMH --- #
################

This installation assumes that your MH binaries are in directories which
are part of your PATH environment variable.  If they are not, you will need
to add such directories to your PATH or you will need to edit ifilter.mh
and irefile.mh and specify the full path names of the binaries that each
script uses (ifilter.mh uses rcvstore, irefile.mh uses refile).  

If ~/.tk/exmh/ does not already exist, create the directory.  Copy ifile.tcl
to ~/.tk/exmh/.  Run "wish" and at the command prompt, type the following
lines:

# auto_mkindex ~/.tk/exmh ifile.tcl
# exit

When EXMH runs, it will execute the code in ifile.tcl, thus giving
EXMH an interface to the ifile system.  ifile.tcl replaces the
Mh_Refile procedure adds Msg_Filter.  The Msg_Filter filters a message
using the ifile system.  The Mh_Refile message moves a message from one
folder to another, updating ~/.idata to reflect the move.

At the moment, ifile.tcl also contains a definition of Inc_Init.  It
is an exact copy of the EXMH 2.0.2 Inc_Init code.  I have found that
without this definition, EXMH does not recognize the redefined
Mh_Refile procedure.  If you have any trouble after installing ifile,
the problems may result from the redefinition of Inc_Init.  Copying
the version of Inc_Init from your distribution of EXMH (look in the
inc.tcl file) into ifile.tcl may solve the problem.

Currently, ifile will not filter messages on arrival unless you use
another filter to call ifile (such as slocal).  You will need to
incoporate all of your messages into a single folder (such as inbox).
When you no longer want a message to be in your inbox, Msg_Filter will
move the message to the appropriate folder.

The Msg_Filter function will move the currently highlighted message to
the mailbox that ifile deems appropriate.  This function can be
activated either via a keyboard key, or via a menu button.  To
activate it through a key, open up the Bindings...->Commands window,
type "Msg_Filter" for the Command, some key sequence for the Key (such
as <Key-i>) and then press the Define button.  To activate it via a
menu button, add the following lines to your .exmh-defaults file:

*Mops.ubuttonlist: ifilter
*Mops.ifilter.text: Filter
*Mops.ifilter.command: Msg_Filter
*Mops.ug_nodraft: ifilter
*Mops.ug_current: ifilter

A new button called "Filter" will pop up the next time you use EXMH.  Simply
press this button when you wish the currently highlighted message to be
filtered.

$Id: INSTALL,v 1.9 1999/04/23 02:49:17 jr6b Exp $
