Archive | January, 2005

Tags: ,

Installing Horde and IMP

Posted on 02 January 2005 by Demian Turner

The great advantage of installing a web-based imap client is you can
intercept the mail processing with your own mail filters, even PHP
ones, for example, if you wanted to experiment with some of the PHP Bayes filters recently making the rounds in the blogosphere.

The competition for PHP IMAP clients seems to be largely dominated by Horde‘s IMP, so I went straight for that, not to mention a working Horde installation also gives you access to exciting things like Chora, their CVS/SVN web client.

Now is a good a time as any to jump into Horde, especially as their
3.0 release is just out – from my initial experience things look very
good. On the bright side of things, Horde is a very mature project,
some 4-5 years in the works as I understand it, and the code and
documentation, not to mention the breadth of their libraries, all
reflect the fact. On the other side, although you could argue this
other side only exists for beginners, Horde does take a bit of
concentration to install, it does prefer a linux environment, and there
are PHP newbies who will struggle to get things working. Given the
‘instant gratification’ culture that’s grown up around PHP in general,
I think this could be a reason why the Horde project hasn’t basked in
the limelight perhaps as much as it should have.

With a view to easing the whole Horde installation process, I will
attempt to clarify a few points that I ran into while installing the

Installing Horde

  • you’ll need root on a modern Linux distro, I used Fedora Core 1 for this exercise
  • recompile PHP with dom and zlib support, not enabled by default
    • grab the required xml libs with
      • up2date libxml2-devel
    • grab and compile the required zlib stuff with
      • wget
    • ./configure [your usuall stuff] –with-dom –with-zlib
  • grab horde source
    • wget
  • unpack into your webroot
  • in horde/config rename *.dist to *.php
    • for foo in *.dist; do cp $foo `basename $foo .dist`; done
  • in horde/conf/registry.php I had to hack $webroot as I was using a virtual host
    • $this->applications[‘horde’] = array(‘fileroot’ => dirname(__FILE__) . ‘/..’, # ‘webroot’ => $webroot, ‘webroot’ => ”, // etc
  • access the application via web browser, you are automaticallly Administratror super-user
  • hit ‘Administration’, then ‘setup’ and create the default config settings
  • go to ‘Users’ then add the Adminstrator user with password (this was not intuitive)
  • add regular user with password
  • in horde/scripts/sql/create.mysql.sql comment out ‘create database’, manually create a database called ‘horde’, then import this file
  • I had to set my own DB user, the default ‘horde’ one suggested caused problems

Installing IMP

  • download and copy IMP files to horde/imp
  • grab IMAP libs and recompile PHP with –with-imap=/path/to/imap-libs
  • in horde/imp/config rename *.dist to *.php (see above)
  • setup your imap server details in horde/imp/config/servers.php


Overall I’ve been finding this a fantastic package, the web client offers that vast majority of what you can get through something like Thunderbird, with the obvious advantage that you can read your mail from any computer. Next step will be the Bayes filter implementation, then chora which I have currently half-working 😉

Comments (3)



Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists