         fffff       lll
        fff  ff       lll
 iii    fff fff iii   lll
 iii    fff     iii   lll
      fffffff         lll   eeeeee           000    2222   3333
iiii    fff    iiii   lll  eee   ee         0   0       2      3
 iii    fff     iii   lll  eeeeeeee     v v 0   0    222    333
 iii    fff     iii   lll  eee          v v 0   0   2          3
iiiii  fffff   iiiii lllll  eeeeee       v   000  * 2222 * 3333

Released Mon Jan 27 00:2 EST 1997

If you try to use ifile at all, I would definitely like to hear from you.
I would greatly appreciate hearing about your installation and/or the actual
operation of the system.
Please send me e-mail at "jr6b+@andrew.cmu.edu".

NOTE FOR THOSE UPGRADING: Read the UPGRADE and CHANGES files.

Current version can be found at "ftp://syrinx.res.cmu.edu/pub/ifile/CURRENT_VERSION"

What is ifile?

ifile is an intelligent mail filtering program which uses framework provided by
the mh mailing system and the slocal filtering system.  It uses the text-based
learning algorithm, Naive Bayesian, to determine what type of mail you like
to have filtered into your different folders.  It learns by observing any
actions you take to move (refile) messages to different folders than they were
originally filtered to.  The great benefit of ifile is that once ifile is in
place, ifile will update its knowlege about your preferences with every
message that you refile.  Normally, with other filters, the user must write
down a strict set of rules and then change those rules as his/her preferences
change.  ifile does not deal with keywords, but rather with actual message
content.  And as it is well integrated in the EXMH package, it requires
little maintainance after the initial installation.

Does it actually work?

Yes.  I've had four users of ifile tell me that ifile does a great job of
filtering mail and in my own experiences, it has also done a nice job.
Since I've added code to keep track of the number of filters vs. refiles,
ifile has correctly filtered 81% of my mail.  I've only needed to refile 19%
of the last 120 e-mails which I have received; quite an impressive number considering that I have 25 different mail folders for ifile to choose from.

What exactly does it do?

The ifile mail filtering system replaces two pieces of the system commonly
found with exmh.  The first of those is the mh refile program, which is
completely replaced by irefile, one of the perl scripts which comes with this
package.  Instead of simply refiling the message which it is given, irefile
reads the entire message and keeps track of the content of the message in your
~/.idata file.  ifile will then pass the message on to the MH refile to be
placed in its rightful mailbox.

ifile also replaces the filtering.  Better put, it uses the slocal filtering
system to call its own mail filtering program.  The idea is simple enough that
it could be called from any filtering program, or even exmh itself (idea for
future version :), but the simplicity of running through slocal won out for
early versions.  The filtering program reads in one message from standard
input, parses it and then uses the information in the ifile knowledge
database, .idata, to decide which folder to filter the message into.

How do I know if I can actually use this system?

To be able to use this system, you must have the entire MH mailing system
installed on your machine.  You (most likely) will need to have root access
on this machine to install the new refile program.  You must have the slocal
mail filtering program installed on your machine.  You must have perl v4.036 or
later installed on your system (I have tested it with perl v5.003).  It is
also highly recommended that you have EXMH installed and use that as your
primary e-mail program.  ifile will probably work without EXMH (which is
basically a graphical interface to MH), but I give no guarantees. :)

So, how do I install this wonderful system?

Unzip this package in the directory of your choice (I would suggest
/usr/local/ - it will create a subdirectory for its own files) and then run
the install script (if you do not have perl installed in /usr/bin, you will
need to edit 'install.perl' and change the first line to the proper directory).

The script will search for certain binaries, prompting you if it cannot find
them.  If you are prompted and aren't sure of their location, stop the
installation (Ctrl-C) and take the time to find them.

Once it has the directory information, the installation program will backup
the current mh refile program and replace it with a link to irefile.  It will
also add two lines to your .maildelivery file (creating it if necessary) 
which will have slocal run the ifilter program.

Finally, once the script has finished, you must change the
"Incorporate Mail -> Ways to Inc" option within EXMH to "presort".

With the install program run, ifile is ready to be used by your user account.
The only effect this installation will have on other users of your system is
that now all users will use the irefile script instead of the standard MH
refile program.  In the context of EXMH, the only difference should be a
noticable slowdown in refiling operations, along with the accumulation of an
.idata file in the user's home directory.

To allow other users to use the ifile filtering system, each user must
change their Inc option to presort and must add the following line to their
.maildelivery file:

* - ^ ? /ifile/install/directory/ifilter

The ifilter line acts as any other entry in the .maildelivery file.  If you
wish, you may add entries before the ifilter line if there are messages with
certain keywords which you always want handled in a certain way.

With this version of ifile, I have included a program which will search through
your currently stored messages and create your .idata file accordingly.  I
have found that this system of knowlege accumulation allows ifile much better
knowlege of your preferences and does a much better job of filtering messages.
To use this program, run "knowledge_base.perl" from your user account.  If
there are any folders which you do not want ifile to attempt to filter messages
into (like a 'drafts' folder), create a ".skip_me" file in that folder.

Is that it?

Yup.  Once you have completed those minor tasks, ifile will be installed.
If you choose the knowledge base script, ifile should have a good idea of
how you like your mail organized and you should be able to see the beauty
of ifile after the first few messages you receive.

In general, mailboxes with a specific theme, or those which only contain
messages from a certain person should be easy for ifile to learn.  Those with
varying topics or which contain mail from a wide spread of people may be more
difficult to learn.

Why is this version 0.2.3?

The program is still under heavy development.  The first two numbers indicate
the major version number (0.2).  The last number indicates the minor version
number (3).  Each new major version is likely to contain major developments
and lots of new code unseen in previous new versions.  Each new minor version
within a major version will comprise primarily of bug fixes and other less
major changes.

Who wrote this?

Why, I did!  'I' am Jason Rennie, a sophomore majoring in Computer Science at
Carnegie Mellon University.  I've been programming for most of my life,
starting with BASIC as a youth, moving through Pascal during high school and
then widening my horizons in college with such languages as C/C++, perl, Java
and ML.  Since installing it in December of '95, I have become a big-time linux
fan, running it almost exclusively (I still have Win95 for those occasional
Quake, Decent or Diablo sessions :)
I've been doing quite a bit of work with learning algorithms, especially
text-based learning over the summer and decided it would be cool to apply
one of the algorithms to mail filtering.  So, I did.

How do I contact this computer geek?

By e-mail, of course!  jr6b+@andrew.cmu.edu  You can also check out my web
page at "http://syrinx.res.cmu.edu/".


Credits
-------
Tom Mitchell - the professor who was willing to hire me for the summer during
	       which I learned all I know about the Naive Bayesian algorithm
               and text-based learning in general.
Dave Robinson - Alpha tester, pointed out some major bugs in version 0.1.x.
                Good source of encouragement :)


If you do find this program helpful and would like to support it and see
it grow into a powerful, full-featured mail filtering system :) please
fill out the following short survey and mail it to jr6b@andrew.cmu.edu:

------------------------->8--------------------------

What operating system do you run? :

What version of exmh do you have? :

What version of perl is on your system? :

Did you have any problems installing ifile?  If so, please describe them here:








Did you encounter any problems while running ifile (lost mail - poor job of
filtering)?  If so, please describe them here (copies of .idata and
/tmp/irefile.info and /tmp/ifilter.info would be really helpful!) :








Do you have any suggestions on how to improve ifile?  (this would be most
helpful if you have specific code changes)








----------------------8<---------------------------

Thank you for your interest!!!! :)