To install the ifile executables and the ifile man page in the default
place, run:

	./configure
	gmake install

If your "make" executable is GNU make, you should substitute "make"
for "gmake".  The configure script takes a number of options.  Run
"./configure --help" to see a list.  A popular option is
--prefix=/install/path which allows you to specify where you would
like ifile to be installed (default is /usr/local).  After
installation, "ifile --version" should report the version of ifile
that you just installed.

The rest of this INSTALL file is specific to clients that use the MH
environment.  Information about other clients can be found at the
ifile home page, http://www.ai.mit.edu/~jrennie/ifile/.

Next, you need to interface your client with ifile.  Below,
instructions are given for slocal, (n)mh and exmh.

##################
# --- 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 /install/path/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, see the above section on slocal.

################
# --- 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 /install/path/ifilter.mh and /install/path/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.  If you
do not currently have any user-defined code in this directory, copy
ifile.tcl and user.tcl to ~/.tk/exmh/, change directory to ~/.tk/exmh
and run the following command:

echo "auto_mkindex . *.tcl; puts done; exit" | wish

If you do have user defined code for EXMH, you can still blindly move
ifile.tcl to ~/.tk/exmh, however, you will have to merge user.tcl with
whatever you already have in ~/.tk/exmh.  You'll notice that user.tcl
defines User_Init and User_Layout, but only includes code in
User_Layout.  After copying ifile.tcl to ~/.tk/exmh, copy the code in
User_Layout to your User_Layout function and then run the above
auto_mkindex command to have EXMH recognize the newly added code.

When EXMH runs, it will execute this newly added code, giving EXMH an
interface to the ifile system.  The newly added code replaces the
Mh_Refile procedure and adds Msg_Filter.  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.

If you have any trouble with getting Mh_Refile to take effect, it is
likely due to a bug that is fixed in 2.0.4 and later releases of EXMH.
Please update to this or a later version if you have not already done
so.

Currently, ifile will not filter messages on arrival unless you use
another filter to call ifile (such as slocal).

In more recent versions (2.0.2 and later), EXMH offers a "custom"
incorporation method.  By defining an Inc_Custom procedure in the
user-defined code, it would be possible to have EXMH automatically
filter mail via ifile.  You may wish to try this if you are a tcl/tk
hacker.  Send notice to the mailing list
<ifile-discuss@yahoogroups.com> of any code that you produce; I will
add it to the distribution.

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.7 2002/09/11 21:30:20 jrennie Exp $
