=====================
 Installing MIMP 1.0
=====================

:Last update:   $Date: 2006/06/07 23:14:54 $
:Revision:      $Revision: 1.7.2.1 $
:Contact:       mimp@lists.horde.org

.. contents:: Contents
.. section-numbering::

This document contains instructions for installing the MIMP web-based mail
client on your system.

For information on the capabilities and features of MIMP, see the file
README_ in the top-level directory of the MIMP distribution.


Obtaining Horde
===============

MIMP can be obtained from the Horde website and FTP server, at

   http://www.horde.org/mimp/

   ftp://ftp.horde.org/pub/mimp/

Or use the mirror closest to you:

   http://www.horde.org/mirrors.php

Bleeding-edge development versions of MIMP are available via CVS; see the
file `docs/HACKING`_ in the Horde distribution, or the website
http://www.horde.org/source/, for information on accessing the Horde CVS
repository.


Prerequisites
=============

To function properly, MIMP **REQUIRES** the following:

1. A working Horde installation.

   MIMP runs within the `Horde Application Framework`_, a set of common tools
   for Web applications written in PHP.  You must install Horde before
   before installing MIMP.

   .. Important:: MIMP 1.0 requires version 3.0+ of the Horde Framework -
                  earlier versions of Horde will **not** work.

   The Horde Framework can be obtained from the Horde website and FTP server,
   at

      http://www.horde.org/horde/

      ftp://ftp.horde.org/pub/horde/

   Many of MIMP's prerequisites are also Horde prerequisites.

   .. Important:: Be sure to have completed all of the steps in the
                  `horde/docs/INSTALL`_ file for the Horde Framework before
                  installing MIMP.

   .. _`Horde Application Framework`: http://www.horde.org/horde/

2. The following PHP capabilities:

   a. IMAP and POP3 support ``--with-imap``

      MIMP **requires** the UW-IMAP c-client library to provide IMAP and/or
      POP3 support.  The c-client library is available from

         ftp://ftp.cac.washington.edu/imap/

      MIMP **requires** IMAP and POP3 support in PHP, and can use IMAP-SSL and
      POP3-SSL if available (see the ``--with-imap-ssl`` configure option).

      .. Tip: If you notice strange behavior when running MIMP (e.g. blank
              screens when accessing certain messages, blank message bodies)
              you should always try recompiling PHP with a different version
              of c-client.  The different versions of the c-client library and
              PHP do not always work well together, and often all it takes is
              to recompile with a different c-client version and the problems
              will go away.

3. At least one IMAP or POP3 server.

   While MIMP is an application that is installed on a Web server and is run
   from a Web browser, it is only an IMAP and POP3 *client*, like Eudora or
   Outlook Express.  You must have access to an IMAP or POP3 server (or
   multiple servers) on which your users' mail is stored in order to use MIMP.

   IMAP is recommended over POP3 in order to let users maintain mail folders
   other than INBOX.  IMAP is also *much* faster than POP3 in displaying a
   mailbox of messages.  In short, do not use POP3 unless IMAP is not
   available.

   Freely available IMAP servers (for \*nix systems) that have been verified
   to work with MIMP include:

   - UW-IMAP (ftp://ftp.cac.washington.edu/imap/)
   - Courier-IMAP (http://www.inter7.com/courierimap.html)
   - Cyrus (http://asg.web.cmu.edu/cyrus/)
   - Dovecot (http://dovecot.procontrol.fi/)

The following items are not required, but are strongly **RECOMMENDED**:

1. Sendmail or equivalent.

   While Horde can inject mail via either a local sendmail or a remote SMTP
   server, sendmail is recommended for use with MIMP for improved performance
   and error handling/reporting, as well as a more accurate mail envelope.

   The mail transport settings are set in the Horde configuration, so further
   documentation can be found there.


Installing MIMP
===============

MIMP is written in PHP, and must be installed in a web-accessible directory.
The precise location of this directory will differ from system to system.
Conventionally, MIMP is installed directly underneath Horde in the web
server's document tree.

Since MIMP is written in PHP, there is no compilation necessary;
simply expand the distribution where you want it to reside and rename
the root directory of the distribution to whatever you wish to appear
in the URL.  For example, with the Apache web server's default document
root of ``/usr/local/apache/htdocs``, you would type::

   cd /usr/local/apache/htdocs/horde
   tar zxvf /path/to/mimp-1.0.tar.gz
   mv mimp-1.0 mimp

and would then find MIMP at the URL::

   http://your-server/horde/mimp/


Configuring MIMP
================

1. Configuring Horde for MIMP

   a. Register the application

      In ``horde/config/registry.php``, find the ``applications['mimp']``
      stanza.  The default settings here should be okay, but you can change
      them if desired.  If you have changed the location of MIMP relative to
      Horde, either in the URL, in the filesystem or both, you must update the
      ``fileroot`` and ``webroot`` settings to their correct values.

   b. Enable MIMP authentication [OPTIONAL]

      If you would prefer that your users authenticate directly with MIMP,
      without having to authenticate through Horde first, configure the
      "Application" authentication with MIMP as the application in Horde's
      configuration interface.

      .. Note:: **You will have to log in twice if you don't do this** -- Once
                to Horde and a second time to MIMP.

      .. Note:: If this is a new install, you will not be able to configure
                MIMP using the Horde Administration/Configuration tool if you
                first enabled MIMP authentication for Horde.  You must set
                Horde to use another authentication method, configure MIMP,
                then reset Horde to use MIMP authentication.

      .. Note:: If you would like mobile browsers to be automatically
                redirected and authenticated to MIMP when accessing the Horde
                site, see the following link for details on how to do this:
                http://wiki.horde.org/MIMPHowTo

2. Configuring MIMP.

   To configure MIMP, change to the ``config/`` directory of the installed
   distribution, and make copies of all of the configuration ``dist`` files
   without the ``dist`` suffix::

      cd config/
      for foo in *.dist; do cp $foo `basename $foo .dist`; done

   Or on Windows::

      copy *.dist *.

   Documentation on the format and purpose of those files can be found in each
   file.  You may edit these files if you wish to customize MIMP's appearance
   and behavior.  With two exceptions (``conf.php`` and ``servers.php``) the
   defaults will be correct for most sites.

   You must be sure to list your IMAP/POP3 server names and configuration
   information in ``servers.php`` (unless you demand that the user specify his
   own at login).

   You must login to Horde as a Horde Administrator to finish the
   configuration of MIMP.  Use the Horde ``Administration`` menu item to get to
   the administration page, and then click on the ``Configuration`` icon to
   get the configuration page.  Select ``Mobile Mail`` from the selection list
   of applications.  Fill in or change any configuration values as needed.
   When done click on ``Generate Mobile Mail Configuration`` to generate the
   ``conf.php`` file.  If your web server doesn't have write permissions to
   the MIMP configuration directory or file, it will not be able to write the
   file.  In this case, go back to ``Configuration`` and choose one of the
   other methods to create the configuration file ``mimp/config/conf.php``.

   Note for international users: MIMP uses GNU gettext to provide local
   translations of text displayed by applications; the translations are found
   in the po/ directory.  If a translation is not yet available for your
   locale (and you wish to create one), see the ``horde/po/README`` file, or
   if you're having trouble using a provided translation, please see the
   `horde/docs/TRANSLATIONS`_ file for instructions.

3. Securing MIMP

   Before you can secure MIMP, you need a secure Horde installation.  Please
   read the file in `horde/docs/SECURITY`_ for Horde security information
   before proceeding.

   There are two channels by which, unless steps are taken to avoid it, MIMP
   encourages users to pass their IMAP and POP3 passwords around the Internet
   unencrypted.

   The first channel is between their browser and the Web server.  We strongly
   recommend using an SSL-capable Web server to give users the option of
   encrypting communications between their browser and the Web server on which
   MIMP is running; some sites may wish to disable non-SSL access entirely.

   The second channel is between the Web server and their IMAP or POP3 server.
   The simplest way to avoid this is to have the mail server running on the
   same system as the Web server, and configuring MIMP to connect to the IMAP
   or POP3 server on ``localhost`` instead of on the Internet hostname.  In
   cases where that is not possible, we recommend using IMAP-SSL or POP3-SSL
   to ensure that users' passwords remain safe after they have entrusted them
   to MIMP.

   Other security steps you can take to increase security include:

   * Use session cookies instead or URL based sessions.
   * Set your php ``session.entropy_length`` to a larger value (e.g. 16) and
     ``session.entropy_file`` to a random source (e.g. ``/dev/urandom``)
   * Enable and use the php mycrypt extension.
   * If your database, mail server, and web server are on the same host
     machine, then:

     * use unix socket database access and disable tcp database access.
     * use ``localhost`` for all TCP/IP connections to avoid the network.
     * use the command-line sendmail for sending mail if possible.

4. Testing MIMP

   Use MIMP to login to a known working IMAP or POP3 server.  Test at least
   the following:

   - Sending mail (via the ``Compose`` item in the menu bar).
   - Reading mail.
   - Changing folders.

5. Tuning MIMP (Performance)

   See `horde/docs/PERFORMANCE`_.


Obtaining Support
=================

If you encounter problems with MIMP, help is available!

The Horde Frequently Asked Questions List (FAQ), available on the Web at

  http://www.horde.org/faq/

The Horde Project runs a number of mailing lists, for individual applications
and for issues relating to the project as a whole.  Information, archives, and
subscription information can be found at

  http://www.horde.org/mail/

Lastly, Horde developers, contributors and users also make appearances on IRC,
on the channel #horde on the Freenode Network (irc.freenode.net).

Please keep in mind that MIMP is free software written by volunteers.  For
information on reasonable support expectations, please read

  http://www.horde.org/support.php

Thanks for using MIMP!

The MIMP team


.. _README: ?f=README.html
.. _`horde/docs/INSTALL`: ../../horde/docs/?f=INSTALL.html
.. _`docs/HACKING`: ../../horde/docs/?f=HACKING.html
.. _`horde/docs/PERFORMANCE`: ../../horde/docs/?f=PERFORMANCE.html
.. _`horde/docs/SECURITY`: ../../horde/docs/?f=SECURITY.html
.. _`horde/docs/TRANSLATIONS`: ../../horde/docs/?f=TRANSLATIONS.html
