Installing IMP 2.0.x for PHP 3.0.x with Apache 1.3.x on Red Hat Linux 5.x

by Nathan Wallace (August 11th, 1999)


This document describes how to install IMP for PHP with Apache on Red Hat Linux.

Before we Begin

  1. These instructions assume that you have installed Apache, PHP and IMAP support according to my instructions.

Installing IMP

  1. I created a new server name for my IMP installation:
        cd /www/servers

  2. I needed to set up a new virtual host for the new IMP server name. You can do the same by using and following these instructions.

  3. Now we have to get both HORDE and IMP.
        cd imp
        cd tarballs
        get horde-latest.tar.gz
        get imp-latest.tar.gz

  4. Installing HORDE
        tar xzvf horde-latest.tar.gz
        ln -s horde-1.0.10 horde

  5. Installing IMP
        mv imp-latest.tar.gz horde
        tar xzvf imp-latest.tar.gz
        ln -s imp-2.0.10 imp

Building IMP

  1. First we have to build HORDE. Ignore the warning about build.opts, the current HORDE distribution has no options.
        cd lib
        cd src

  2. Now we have to build IMP. I am using MySQL for the database.
        cd ../..
        cd imp/lib/src
        ./ --database=mysql

Configuring IMP

  1. We need to create a defaults file. I'm using MySQL so I'll use the include example default file as a starting point.
        cd ../../config
        cp examples/mysql.defaults.php3 defaults.php3

  2. Now we need to edit that defaults file to set the server names and so on. There are a number of changes to make, my changes are listed below. The first is on line 3, changing the email address that problem reports are sent to.
    $default->problem_email             = '';

    Next you need to specify the name of your local machine on line 16.

    $default->localhost                 = '';

    Then setup your IMAP server defaults on lines 19 and 20.

    $default->server                    = '';
    $default->from_server               = '';

    The security on my MySQL machine is a little messed up and I can't be bothered fixing it since I'm too busy writing code. As a result I needed to remove the default password that is given to the MySQL user impmgr before things would work. It's on line 93. You probably won't need to do this:

    $default->db_password               = '';

    One last change on line 104:

    $default->signup_email              = ''; 

  3. Finally we need to disable the PHP setup script (which we didn't use). This must be done for security reasons.
        cd ..
        chmod 000 setup.php3

Setting Up the IMP Database

I'm not sure if I should set up the database for Horde at this point as well. It seemed to work even though I didn't set it up. If I'm wrong let me know...
  1. We need to define a few tables in the database before IMP will work properly. This is really easy since we are given a script to do it. You need to run this script as the root MySQL user.
        cd imp/config/scripts
        mysql --user=rootuser --password=password <mysql_create.sql

  2. If you don't want to or can't create a new database on your system then you can just edit the script and change the defaults.php3 file (that we edited above) to use your prefered MySQL database and user names.

Using IMP

  1. Using IMP is now just a matter of restarting your Apache server.
        su root
        /www/bin/apachectl restart

  2. Now you can just open your browser to to start using it!

  3. In case you panic, notice the little IMP link in the top left hand corner.

  4. Also, be aware that some IMP operations can be very slow if you are talking to a mail server over a modem.