IMP Webmail

IMP allows webusers to check their pop3/imap mailboxes through a web interface. IMP requires a few PHP libraries which I had not yet installed:

imap

gettext

libmcrypt

Equally important to know: IMP is a Horde application. The Horde application framework will be discussed separately, below.

Imap

To get imap running under php, I had to install:

imap-devel-2004-0.fdr.8.a.2.i386.rpm

imap-2004-0.fdr.8.a.2.i386.rpm (you probably don't need this one if you have installed the first one)

imap-libs-2004-0.fdr.8.a.2.i386.rpm

Gettext

Gettext is an API for internationalizing/localizing your applications.

Installing Gettext

checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
configure: error: /bin/sh './configure' failed for autoconf-lib-link

To compile Gettext you obviously need a c++ compiler.

I will do the following:
[install: gcc-c++ 3.3.3-7.i386]
I will install/upgrade these to satisfy the dependencies:
[deps: libstdc++-devel 3.3.3-7.i386]
Is this ok [y/N]: y
Downloading Packages
Getting libstdc++-devel-3.3.3-7.i386.rpm
libstdc++-devel-3.3.3-7.i 100% |=========================| 1.3 MB    00:00
Getting gcc-c++-3.3.3-7.i386.rpm
gcc-c++-3.3.3-7.i386.rpm  100% |=========================| 2.0 MB    00:00
Running test transaction:
Test transaction complete, Success!
libstdc++-devel 100 % done 1/2
gcc-c++ 100 % done 2/2
Installed:  gcc-c++ 3.3.3-7.i386
Dep Installed:  libstdc++-devel 3.3.3-7.i386
Transaction(s) Complete

From this point on, installing Gettext is easy, see INSTALL file in src directory for Gettext.

OpenSSL

IMP also (optionally) needs OpenSSL, which had already been installed, but the –with-openssl directive yielded some errors while running configure for PHP. So:

I will do the following:
[install: openssl-devel 0.9.7a-35.i386]
I will install/upgrade these to satisfy the dependencies:
[deps: e2fsprogs-devel 1.35-7.1.i386]
[deps: krb5-devel 1.3.6-1.i386]
[deps: krb5-libs 1.3.6-1.i386]
Is this ok [y/N]: y
Downloading Packages
Getting openssl-devel-0.9.7a-35.i386.rpm
openssl-devel-0.9.7a-35.i 100% |=========================| 1.6 MB    00:00
Getting e2fsprogs-devel-1.35-7.1.i386.rpm
e2fsprogs-devel-1.35-7.1. 100% |=========================| 1.2 MB    00:00
Getting krb5-devel-1.3.6-1.i386.rpm
krb5-devel-1.3.6-1.i386.r 100% |=========================| 834 kB    00:00
Getting krb5-libs-1.3.6-1.i386.rpm
krb5-libs-1.3.6-1.i386.rp 100% |=========================| 485 kB    00:00
Running test transaction:
Test transaction complete, Success!
krb5-libs 100 % done 1/5
e2fsprogs-devel 100 % done 2/5
krb5-devel 100 % done 3/5
openssl-devel 100 % done 4/5
Completing update for krb5-libs  - 5/5
Installed:  openssl-devel 0.9.7a-35.i386
Dep Installed:  e2fsprogs-devel 1.35-7.1.i386 krb5-devel 1.3.6-1.i386 krb5-libs 1.3.6-1.i386
Transaction(s) Complete

After that, –with-openssl=/usr/include/openssl still complained:

configure: error: Cannot find OpenSSL's <evp.h>

But simply deleting the DIR was enough to solve these problems (see section PHP for all used configuration directives).

Libmcrypt

I have installed libmcrypt-2.5.7 by compiling the source code. Unfortunately, this resulted in a php ./configure error. The solution was found in a posting on the web:

I started to study the config.log file more in deep.
The kick-out error was:
 
****
conftest.c -lmysqlclient -lmcrypt -lltdl -lresolv -lm -ldl -lnsl 1>&5
/usr/bin/ld: cannot find -lltdl
****
 
Then I visited
http://mcrypt.hellug.gr/mcrypt/index.html
an learned that I have to install not only libmcrypt but also
mcrypt and libmhash.
Afte installing libmcrypt it was essential to move into the "./libltdl"
folder
and type the following shell commands:
> ./configure --enable-ltdl-install
> make
> make install
 
After that configuring PHP with
../configure --with-apache=... --with-mysql=... --with-mcrypt=...
worked.

Also, the php documentation says this about libmcrypt: “Make sure you compile libmcrypt with the option –disable-posix-threads

Configuring IMP

Configuring IMP is not hard if you follow the standard procedures as described in the documentation. I needed something different for my system however:

Wishes

  1. a single installation for all my virtual domains;
  2. using a subdomain webmail for each of my domains, pointing directly to IMP (keep in mind that IMP runs within the Horde framework, also literally);
  3. users should not have to specify their mail server (as is default in IMP);
  4. users should be able to log on with their e-mail address (instead of their IMAP user name).
  5. when composing a new mail message in Imp, the “from” address should be set to the user's mail address

Starting point

I have come up with a configuration that is based on the following facts:

  • the IMAP server and the web server (hence Horde and IMP) are on one system;
  • a typical e-mail address for a virtual domain on my system can be mapped to an IMAP user (which is really a Unix user on my system)

Actions taken

This is what I did for each point on the wish list:

Ad 1.) I have installed the horde framework outside of any specific document root (or webroot), in /usr/var/shared/horde. Each virtual domain has in its document root a symbolic link, pointing to this directory.

I have also instructed Virtualmin to add an httpd.conf directive FollowSymLinks for each new virtual domain:

<Directory ${HOME}/public_html>
Options -Indexes IncludesNOEXEC FollowSymLinks
</Directory>

This could pose a security thread. I have not been able to figure out to what extend, and what I might do about it.

Ad 2.) For each virtual domain, I have added a subdomain webmail (using Virtualmin). Each subdomain (i.e. the document root, called public_html on my system) contains a symlink to the horde source directory:

horde -> /usr/var/shared/horde

Futhermore, I have added these httpd directives for each subdomain webmail, e.g.:

Alias /horde/ 
/home/campinglachassagne/domains/webmail.campinglachassagne.fr/public_html/horde/
 
Alias /imp/ 
/home/campinglachassagne/domains/webmail.campinglachassagne.fr/public_html/horde/imp/

The “real” webroot on Apache is path_to_public_html/horde/imp.

Using the Horde administration tools, I have specified that IMP is the authentication instrument (as it is the sole application running within Horde).

Finally, I had to make these changes to the Horde and IMP configuration files:

horde/config/registry.php:

In the array applications['imp']:

'webroot' ⇒ '/imp',

This sets the IMP application as the root of the Horde framework.

horde/config/conf.php: $conf['cookie']['path'] = '/';

Your session will NOT be saved, if you do not apply this setting, so you will have to log in for each page you request.

Ad 3.) To make life easier for our users, we specify the mail server as localhost (we can do this because IMP and the actual IMAP server are on one system):

/horde/imp/config/servers.php:

In the array $servers['imap']:

'server' ⇒ 'localhost',

Ad 4.) I haven't gotten around to doing this yet. I have figured out a way to correctly fill in the domain name in the from: field, using the maildomain setting:

/horde/imp/config/servers.php:

In the array $servers['imap']:

'maildomain' ⇒ strtolower(preg_replace('|^webmail\.|i', '', $_SERVER['HTTP_HOST'])),

This deletes the webmail part of the HTTP_HOST. For instance, webmail.campinglachassagne.fr is converted to campinglachassagne.fr. This value is inserted in the from: field when you compose a new e-mail message.

Ad 5.) To display the user's mail address in the “from” field, I've added a “_prefs_hook_from_addr” hook in horde/config/hooks.php. Here's the code:

// 20060918 -- Hook added by Onno Schuit (www.solin.eu). This hook depends on the _imp_hook_vinfo hook (defined
// elsewhere in this file), where  $_SESSION['solin_user_input'] must be set to whatever the user's input was 
// for the username (which is assumed to be either the local part of an email address or an entire email address).
// N.B.: $_prefs['from_addr'] must also be set to 'locked' => true in the file prefs.php.

if (!function_exists('_prefs_hook_from_addr')) {
  function _prefs_hook_from_addr($name = '') {
    
    $vdomain = getenv('HTTP_HOST');
    $vdomain = preg_replace('|^webmail\.|i', '', $vdomain);
    $vdomain = String::lower($vdomain);    
    
    //TEST
    //exit("TEST (from _prefs_hook_from_addr): \$_SESSION['solin_user_input'] =  ".$_SESSION['solin_user_input']);               
    
    if ($intPos = strrpos( $_SESSION['solin_user_input'], '@' ))  {
      # user has provided full email address, so return this at once
      return $_SESSION['solin_user_input'];
    } else {
      # user has provided local part of email address      
      return $_SESSION['solin_user_input'].'@'.$vdomain;
    }
    
    return '';
  }
}  

You also need to tell Imp to actually use this hook. You do this in horde/config/prefs.php:

// user preferred email address for From: line
// If you lock this preference, you must specify a value or a hook for it in
// horde/config/hooks.php.
// Onno Schuit (www.solin.nl): if you do NOT set locked to true, then the hook will NOT be used!
$_prefs['from_addr'] = array(
    'value' => '',
    'locked' => true,
    'shared' => true,
    'type' => 'text',
    'desc' =>  _("Your From: address:"),
    'hook' => true
);

20060501 – Update about configuration

I have installed a new version of the Horde, and Imp. I had to delete the aliases mentioned under point 2, and the real Apache webroot is now: path_to_public_html/horde.

(No longer path_to_public_html/horde/imp)

I have also reversed a setting in a Horde configuration file:

horde/config/registry.php:

In the array applications['imp']:

'webroot' ⇒ $this→applications['horde']['webroot'] . '/imp',

To secure the installation, I have also disabled horde/test.php and horde/imp/test.php.

And I have secured the config directory:

[root@1038 horde]# chown root.nobody config/*
[root@1038 horde]# chmod 0440 config/*

20060818 – Update about 4: logging in with your email address

I have programmed a “hook” in the file /usr/var/shared/horde/config/hooks.php (line 675), so users can now log in with their “email address”. The username form field in the login screen is now followed by ”@yourdomain.com”. This is the hook's code:

if (!function_exists('_imp_hook_vinfo')) {
  function _imp_hook_vinfo($type = 'username')
  {
    $vdomain = getenv('HTTP_HOST');
    $vdomain = preg_replace('|^webmail\.|i', '', $vdomain);
    $vdomain = String::lower($vdomain);
 
    if ($type == 'username') {
      $arr = explode('.',$vdomain); 
      if ($intPos = strrpos( $_SESSION['imp']['user'], '@' ))  {
        $strUsername = substr($_SESSION['imp']['user'],0,$intPos);                             
        return $arr[0].'_'.$strUsername;
      } else {
        return $arr[0].'_'.$_SESSION['imp']['user'];        
      }               
    } elseif ($type == 'vdomain') {     
      return $vdomain;      
    } else {      
      return PEAR::raiseError('invalid type: ' . $type);
    }
  }
}

Notice that you can also type in a complete email address. The code will simply strip away all unnecessary text.

You also have to tell Imp to use this hook. Go to “Setup” > “Mail (Imp)” > “Custom Hooks” and tick the box for “Should we use a custom virtual users hook?”.

Setting login tasks preferences such as maintenance

Go to horde/imp/config/prefs.php and find the $prefGroups['logintasks'] array. The element with the key members is another array, containing the preferences you are looking for.

For instance, if you don't want the sent mail to be deleted monthly, look for the string delete_sentmail_monthly in the remainder of the file (prefs.php), and you'll find:

// purge sent-mail folders every month?
$_prefs['delete_sentmail_monthly'] = array(
    'value' => 1,
    'locked' => false,
    'shared' => false,
    'type' => 'checkbox',
    'desc' => _("Delete old sent-mail folders at beginning of month?"),
    'help' => 'prefs-delete_sentmail_monthly');

Change value to 0 if you don't want this to happen, and change locked to true if you don't want the Imp users to enable this feature for themselves.

Forwarding email using the Forwards module

The Forwards module is really a Horde module, not an Imp module. But it seems more logical to discuss email forwarding within the context of Imp.

At first, I didn't get Forwards to work at all. First, I had to:

  • reinstall php with –enable-ftp as a ./configure parameter (see the php sections)
  • figure out how to use the .forward file in Postfix (see the Postfix section)

Then I found out that to “Keep a copy in your local mailbox?” really means that the local user gets mentioned in the .forward file. This has the effect of “forwarding” to original destination.

However, my particular Postfix setup does not seem to allow for local users. Each and every user must be specified using either a canonical domain (i.e. non virtual domain) or a virtual (i.e. hosted) domain.

So I hacked the /horde/forwards/lib/Driver/forwards.php file. I have included the entire file below.

Right now (20060918), I have one more thing to do: allow certain users to ftp to the server. This is because Forwards uses ftp to place, update and delete the .forward file in the user's home directory. Ftp access can be granted by setting the user's shell to /bin/false. But that does not seem to be enough…

Update: yes it is enough, if you configure your firewall for the use of ftp. You should also add the shell to /etc/shells (if not already present in that file):

# cat >> /etc/shells
/bin/false

(End line input with ctrl-d)

<?php
/**
 * Forwards_Driver_forwards:: implements the Forwards_Driver API for ftp
 * driven dot-forward compliant mail servers.
 *
 * $Horde: forwards/lib/Driver/forwards.php,v 1.36 2006/02/16 16:34:43 jan Exp $
 *
 * Copyright 2001-2006 Eric Rostetter <eric.rostetter@physics.utexas.edu>
 *
 * See the enclosed file LICENSE for license information (ASL). If you
 * did not receive this file, see http://www.horde.org/licenses/asl.php.
 *
 * @author  Eric Rostetter <eric.rostetter@physics.utexas.edu>
 * @since   Forwards 2.1
 * @package Forwards
 */
class Forwards_Driver_forwards extends Forwards_Driver {
 
    /**
     * The FTP stream we open via the VFS class.
     *
     * @var VFS_ftp
     */
    var $_vfs;
    var $strLocalHost = '@mydomain.com'; // 20060918 added by Onno Schuit (www.solin.nl) for client
 
    /**
     * Checks if the realm has a specific configuration.
     *
     * If not, try to fall back on the default configuration.  If
     * still not a valid configuration then exit with an error.
     *
     * @param string $realm  The realm of the user, or "default" if none.
     *                       Note: passed by reference so we can change
     *                       its value!
     *
     * @return boolean  True on success, false otherwise.
     */
    function checkConfiguration(&$realm)
    {
        // If no realm passed in, or no host config for the realm
        // passed in, then we fall back to the default realm.
        if (empty($realm) || empty($this->_params[$realm]['host'])) {
            $realm = 'default';
        }
 
        // If still no host/port, then we have a misconfigured module.
        if (empty($this->_params[$realm]['host']) ||
            empty($this->_params[$realm]['port']) ) {
            $this->_error = _("The module is not properly configured!");
            return false;
        }
 
        return true;
    }
 
    /**
     * Begins forwarding of mail for a user.
     *
     * @param string $user        The username of the user.
     * @param string $realm       The realm of the user.
     * @param string $password    The password of the user.
     * @param string $target      The email address that mail should be
     *                            forwarded to.
     * @param boolean $keeplocal  Keep a copy of forwarded mail in the local
     *                            mailbox.
     *
     * @return boolean  True on success, false otherwise.
     */
    function enableForwarding($user, $realm = 'default', $password, $target,
                              $keeplocal = false)
    {
        // Make sure the configuration file is correct
        if (!$this->checkConfiguration($realm)) {
            return false;
        }
 
        // Build the FTP array to pass to VFS.
        $_args = array('hostspec' => $this->_params[$realm]['host'],
                       'port' => $this->_params[$realm]['port'],
                       'pasv' => $this->_params[$realm]['pasv'],
                       'username' => $user,
                       'password' => $password );
 
        // Create the VFS ftp driver.
        require_once 'VFS.php';
        $_vfs = &VFS::singleton('ftp', $_args);
        if (is_a($_vfs, 'PEAR_Error')) {
            $this->_error = $_vfs->getMessage();
            return false;
        }
 
        // Try to login with the username/password, no realm
        // This isn't really needed, but allows for a better error message
        $status = $_vfs->checkCredentials();
        if (is_a($status, 'PEAR_Error')) {
            $this->_error = $status->getMessage();
            $this->_error .= '  ' .  _("Check your username and password");
            return false;
        }
 
        // Create the forwarding information
        $address = $this->_make_email_address($target, $realm);
        if ($address === false) {
            return false;
        }
 
        // Append the user if they want to save a copy to themselves...
        // 20060918: Changed by Onno Schuit (www.solin.nl) to allow local host to be specified 
        if ($keeplocal == "on") {
            $address = $address . ", \\$user" . $this->strLocalHost;
        }
 
        // Set the forward
        $status = $_vfs->writeData('', '.forward', $address);
        if (is_a($status, 'PEAR_Error')) {
            $this->_error = $status->getMessage();
            return false;
        }
 
        // Try to change the permissions, but ignore any errors
        $_vfs->changePermissions('', '.forward', '0600');
 
        return true;
    }
 
    /**
     * Stops forwarding of mail for a user.
     *
     * @param string $user      The username of the user.
     * @param string $realm     The realm of the user.
     * @param string $password  The password of the user.
     *
     * @return boolean  True on success, false otherwise.
     */
    function disableForwarding($user, $realm = 'default', $password)
    {
        if (!$this->checkConfiguration($realm)) {
            return false;
        }
 
        $_args = array('hostspec' => $this->_params[$realm]['host'],
                       'port' => $this->_params[$realm]['port'],
                       'pasv' => $this->_params[$realm]['pasv'],
                       'username' => $user,
                       'password' => $password);
 
        require_once 'VFS.php';
        $_vfs = &VFS::singleton('ftp', $_args);
 
        // Try to login with the username/password, no realm.
        $status = $_vfs->checkCredentials();
        if (is_a($status, 'PEAR_Error')) {
            $this->_error = $status->getMessage();
            $this->_error .= '  ' .  _("Check your username and password");
            return false;
        }
 
        $status = $_vfs->deleteFile('', '.forward');
        if (is_a($status, 'PEAR_Error')) {
            $this->_error = $status->getMessage();
            $this->_error .= '  ' .  _("Maybe you didn't have a forward enabled?");
            return false;
        }
 
        return true;
    }
 
    /**
     * Retrieves current target of mail redirection for a user.
     *
     * @param string $user      The username of the user.
     * @param string $realm     The realm of the user.
     * @param string $password  The password of the user.
     *
     * @return mixed  The current forwarding mail address, or false.
     */
    function currentTarget($user, $realm = 'default', $password)
    {
        // Make sure the configuration file is correct.
        if (!$this->checkConfiguration($realm)) {
            return false;
        }
 
        // Build the FTP array to pass to VFS.
        $_args = array('hostspec' => $this->_params[$realm]['host'],
                       'port' => $this->_params[$realm]['port'],
                       'pasv' => $this->_params[$realm]['pasv'],
                       'username' => $user,
                       'password' => $password);
 
        // Create the VFS ftp driver.
        require_once 'VFS.php';
        $_vfs = &VFS::singleton('ftp', $_args);
 
        // Try to login with the username/password, no realm.
        $status = $_vfs->checkCredentials();
        if (is_a($status, 'PEAR_Error')) {
            $this->_error = $status->getMessage();
            $this->_error .= '  ' .  _("Check your username and password");
            return false;
        }
 
        $status = $_vfs->read('', '.forward');
        if (is_a($status, 'PEAR_Error')) {
            $this->_error = $status->getMessage();
            return false;
        }
        // 20060918: Changed by Onno Schuit (www.solin.nl) to allow local host to be specified 
        return preg_replace('/ *(^|, *)\\\\' . $user . $this->strLocalHost . '( *, *|$)/', "", $status);
    }
 
    /**
     * Retrieves current state of mail redirection for a user.
     *
     * @TODO FIXME: This function is implemented poorly, and should be
     * rewritten.
     *
     * @param string $user      The username of the user.
     * @param string $realm     The realm of the user.
     * @param string $password  The password of the user.
     *
     * @return mixed  'Y' if forwarding is enabled, or false otherwise.
     */
    function isEnabledForwarding($user, $realm, $password)
    {
        $yn = $this->currentTarget($user, $realm, $password);
        if ($yn) {
            return 'Y';
        } else {
            return false;
        }
    }
 
    /**
     * Checks if user is keeping a local copy of forwarded mail.
     *
     * @param string $user      The username of the user.
     * @param string $realm     The realm of the user.
     * @param string $password  The password of the user.
     *
     * @return boolean  True if user is keeping a local copy of mail,
     *                  otherwise false.
     */
    function isKeepLocal($user, $realm, $password)
    {
        // Make sure the configuration file is correct.
        if (!$this->checkConfiguration($realm)) {
            return false;
        }
 
        // Build the FTP array to pass to VFS.
        $_args = array('hostspec' => $this->_params[$realm]['host'],
                       'port' => $this->_params[$realm]['port'],
                       'pasv' => $this->_params[$realm]['pasv'],
                       'username' => $user,
                       'password' => $password);
 
        // Create the VFS ftp driver.
        require_once 'VFS.php';
        $_vfs = &VFS::singleton('ftp', $_args);
 
        // Try to login with the username/password, no realm.
        $status = $_vfs->checkCredentials();
        if (is_a($status, 'PEAR_Error')) {
            $this->_error = $status->getMessage();
            $this->_error .= '  ' .  _("Check your username and password");
            return false;
        }
 
        $status = $_vfs->read('', '.forward');
        if (is_a($status, 'PEAR_Error')) {
            $this->_error = $status->getMessage();
            return false;
        }
 
        // 20060918: Changed by Onno Schuit (www.solin.nl) to allow local host to be specified
        return preg_match('/(^|, *)\\\\' . $user . $this->strLocalHost . '( *,|$)/', $status);
    }
 
}

Horde Application Framework

The Horde Application Framework relies upon

  • coding standards
  • some of the PEAR API and modules
  • some of the PECL API and modules

Pear modules

On some systems, it may be necessary to install Pear manually, even if you have the latest php version. Issue this command to do so:

/usr/src# lynx -source http://go-pear.org/ | php

The 'pear' command is now at your service at /usr/bin/pear.

Log

[root@1038 src]# pear install /usr/src/Log-1.8.7.tgz
Optional dependencies:
'sqlite' PHP extension is recommended to utilize some features
install ok: Log 1.8.7

Mailmime

[root@1038 src]# pear install /usr/src/Mail_Mime-1.2.1.tgz
install ok: Mail_Mime 1.2.1

File

[root@1038 src]# pear install /usr/src/File-1.0.3.tgz
install ok: File 1.0.3

Date

[root@1038 src]# pear install /usr/src/Date-1.4.3.tgz
install ok: Date 1.4.3

Pecl modules

Fileinfo

(Fileinfo cannot install due to a php bug)

Oops:

[root@1038 src]# pear install /usr/src/Fileinfo-0.2.tgz
3 source files, building
running: phpize
/usr/local/bin/phpize: line 57: aclocal: command not found
`phpize' failed

According to some sources on the web, aclocal requires automake to be installed, so:

I will do the following:
[install: automake 1.8.3-1.noarch]
I will install/upgrade these to satisfy the dependencies:
[deps: autoconf 2.59-3.noarch]
Is this ok [y/N]: y
Downloading Packages
Getting autoconf-2.59-3.noarch.rpm
autoconf-2.59-3.noarch.rp 100% |=========================| 630 kB    00:02
Getting automake-1.8.3-1.noarch.rpm
automake-1.8.3-1.noarch.r 100% |=========================| 480 kB    00:01
Running test transaction:
Test transaction complete, Success!
autoconf 100 % done 1/2
automake 100 % done 2/2
Installed:  automake 1.8.3-1.noarch
Dep Installed:  autoconf 2.59-3.noarch
Transaction(s) Complete

Unfortunately, we run into yet another problem:

[root@1038 src]# pear install /usr/src/Fileinfo-0.2.tgz
3 source files, building
running: phpize
configure.in:9: warning: underquoted definition of PHP_WITH_PHP_CONFIG
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal
configure.in:32: warning: underquoted definition of PHP_EXT_BUILDDIR
configure.in:33: warning: underquoted definition of PHP_EXT_DIR
configure.in:34: warning: underquoted definition of PHP_EXT_SRCDIR
configure.in:35: warning: underquoted definition of PHP_ALWAYS_SHARED
acinclude.m4:19: warning: underquoted definition of PHP_PROG_RE2C
configure.in:65: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
`phpize' failed

I have reinstalled Automake from source (i.e. compiling and building), but that does not work either. Some searching on the web (http://bugs.php.net/bug.php?id=29160&edit=2) reveals that it is really a php-bug.

Since this module is not actually required, I'll leave this issue aside for now (until a new release of php at least).

Installing the Horde

I have installed the Horde source in a separate directory, outside my webroot:

/usr/var/shared/horde-3.0.2. Each individual website which needs the framework, links to this directory (I should probably check the webserver documentation to see if this poses a security thread).

You do this by creating a symbolic link (first you rename horde-x.x.x to horde)

[root@1038 public_html]# ln -s /usr/var/shared/horde 
/home/campinglachassagne/domains/webmail.campinglachassagne.fr/public_html/horde

which results into something like this:

[root@1038 public_html]# pwd
/home/campinglachassagne/domains/webmail.campinglachassagne.fr/public_html
[root@1038 public_html]# ls -l *horde*
lrwxrwxrwx  1 root root 27 Jan 14 12:49 horde -> /usr/var/shared/horde

Configuring the Horde

The documentation is pretty straightforward, but fails to point out in any salient way that setting the preference driver is very important! Go to:

Administration > Setup > Horde > Preference System

The default preference driver is set to “none”, so you have to specify another setting. On my system, I have used MySQL. Remember to also specify your database settings under the “database” tab.

Installing the Horde from CVS for Whups

Some Horde applications rely on the latest version of the Horde, which you will only find in cvs. Whups, a trouble ticketing system (“helpdesk”) is one of them at the time of writing – 20061104.

The official Horde site tells you about installing from CVS here: Installing from CVS or Snaphots

But the documentation does not mention that you should use the HEAD tag while installing from cvs. Here's what I did:

export CVSROOT=:pserver:cvsread@anoncvs.horde.org:/repository
cvs login
cvs co -r HEAD horde
cd horde
cvs co -r HEAD framework

(Password for repository is “horde”)

To succesfully install the packages in the framework, I then had to do:

pear channel-discover pear.horde.org

- before I was able to:

cd framework
/usr/bin/php -q install-packages.php
cvs logout

Personal Tools