Horde

Introduction
The Horde Project is a collection of open source software - web applications written in PHP for group-based communication and collaboration.

http://www.horde.org

Installation on Gentoo Linux
This guide will install the basic Horde framework, the IMP email application, the Turba Address Book application, the Kronolith Calendar application and the Vacation out-of-office reply software.

PHP
Check PHP requirements are met...

nano /etc/portage/package.use

...and add or edit the line making sure you add ftp, imap and ldap use flags...

dev-lang/php apache2 ctype curl ftp gd hash imap ldap mysql nls pcre pdo session simplexml unicode xml

...then reinstall PHP

emerge -1q php

Apache
Restart Apache web server

/etc/init.d/apache2 restart

Horde
Install the Horde software

emerge -q horde-imp

Enable the Horde test PHP page

chmod 0644 /var/www/localhost/htdocs/horde/test.php

Create the config files for both Horde and IMP

cd /var/www/localhost/htdocs/horde/config/ for f in *.dist; do cp $f `basename $f .dist`; done cd /var/www/localhost/htdocs/horde/imp/config/ for f in *.dist; do cp $f `basename $f .dist`; done

Fix the directory permissions

chown -R apache:apache /var/www/localhost/htdocs/horde/config/ chown -R apache:apache /var/www/localhost/htdocs/horde/imp/config/

Edit the email servers file

nano /var/www/localhost/htdocs/horde/imp/config/servers.php ... $servers['imap'] = array(   'name' => 'IMAP Server',    'server' => 'localhost',    'hordeauth' => false,    'protocol' => 'imap/notls',    'port' => 143,    'maildomain' => 'yourdomain.com',    'smtphost' => 'localhost',    'smtpport' => 25,    'realm' => ,    'preferred' => , );

Test the Horde framework by loading this web page

http://address.of.your.server/horde/test.php

Configure by loading this web page

http://address.of.your.server/horde/


 * 1) Administration --> Setup --> Application: Horde (horde)
 * 2) Authentication --> $conf[auth][admins] --> [Administrator, regularUserName]
 * 3) Authentication --> $conf[auth][driver] --> [Let a Horde application handle authentication]
 * 4) Mailer --> $conf[mailer][type] --> [Use a SMTP server]
 * 5) Mailer --> $conf[mailer][params][auth] --> [No authentication]
 * 6) Click [Generate Horde Configuration] button
 * 7) Administration --> Setup --> Application: Mail (imp)
 * 8) Click [Generate Mail Configuration] button

Vacation
Set up the sendmail smrsh facility for the vacation binary

cd /usr/adm/sm.bin/ ln -s /usr/bin/vacation

Install the FTP server needed

emerge -q proftpd

Configure and start the FTP server

cp -av /etc/proftpd/proftpd.conf.sample /etc/proftpd/proftpd.conf nano /etc/proftpd/proftpd.conf #UseIPv6 off DefaultRoot ~ rc-update add proftpd default /etc/init.d/proftpd start

Download the Horder Vacation application module

wget http://ftp.horde.org/pub/vacation/vacation-h3-3.2.tar.gz

Extract the tarball to the correct directory

tar -xzvf vacation-h3-3.2.tar.gz -C /var/www/localhost/htdocs/horde/

Change the directory name

cd /var/www/localhost/htdocs/horde/ mv vacation-h3-3.2/ vacation

Fix the permissions

chown -R apache:apache vacation/config/

Configure by loading this web page

http://address.of.your.server/horde/


 * 1) Administration --> Setup --> Application: Vacation (vacation)
 * 2) Vacation Settings --> $conf[vacation][from] --> Untick Allow users to change email sender
 * 3) Click [Generate Vacation Configuration] button

Turba Address Book
Install OpenLDAP

emerge -q openldap

Edit the configuration file.

nano /etc/openldap/slapd.conf ... include        /etc/openldap/schema/horde.schema ... access to dn.subtree="ou=addressbook,dc=domain,dc=uk,dc=com" by users write by * read access to * by * read

Populate the database. Create a text file with examples like the following:-

dn: dc=domain,dc=uk,dc=com dc: domain o: Domain objectclass: dcObject objectclass: organization dn: cn=root,dc=domain,dc=uk,dc=com cn: root objectclass: organizationalRole dn: ou=addressbook,dc=domain,dc=uk,dc=com objectclass: top objectclass: organizationalUnit ou: addressbook dn: cn=John Smith,ou=addressbook,dc=domain,dc=uk,dc=com cn: John Smith givenname: John homephone: 01234 567890 mail: john@smith.cc.com mobile: 07777 777777 objectclass: top objectclass: person objectclass: organizationalPerson objectclass: inetOrgPerson sn: Smith dn: cn=Paul Jones,ou=addressbook,dc=domain,dc=uk,dc=com cn: Paul Jones facsimiletelephonenumber: 08719 896021 givenname: Paul homephone: 03333 333333 l: Folkestone mail: paul@jones.me.com mobile: 07777 111222 objectclass: inetOrgPerson objectclass: top objectclass: person objectclass: organizationalPerson postalcode: ZZ20 1ZZ sn: Domain st: Kent street: 17 Fishing Market, The Street telephonenumber: 01234 567890 dn: ou=users,dc=domain,dc=uk,dc=com objectclass: top objectclass: organizationalUnit ou: users dn: cn=pjones,ou=users,dc=domain,dc=uk,dc=com cn: pjones cn: paulj displayname: Paul Jones gidnumber: 100 givenname: Paul homedirectory: /home/pjones loginshell: /bin/bash objectclass: inetOrgPerson objectclass: posixAccount objectclass: top sn: Domain uid: pjones uidnumber: 1000 userpassword: {CRYPT}nSLjvi76PydXQ
 * 1) Entry 1: dc=domain,dc=uk,dc=com
 * 1) Entry 2: cn=root,dc=domain,dc=uk,dc=com
 * 1) Entry 3: ou=addressbook,dc=domain,dc=uk,dc=com
 * 1) Entry 4: cn=John Smith,ou=addressbook,dc=domain,dc=uk,dc=com
 * 1) Entry 5: cn=Paul Jones,ou=addressbook,dc=domain,dc=uk,dc=com...
 * 1) Entry 6: ou=users,dc=domain,dc=uk,dc=com
 * 1) Entry 7: cn=pjones,ou=users,dc=domain,dc=uk,dc=com

Then add them to the database (more to come sorry)

Check / Add The PHP USE Flag

nano /etc/portage/package.use ... dev-lang/php ldap

Install Horde Turba

emerge -q www-apps/horde-turba

Create config files

cd /var/www/localhost/htdocs/horde/turba/config/ for f in *.dist; do cp $f `basename $f .dist`; done

Fix the directory permissions

chown -R apache:apache /var/www/localhost/htdocs/horde/turba/config/

Configure by loading this web page

http://address.of.your.server/horde/


 * 1) Administration --> Setup --> Application: Address Book (horde)

Configure the /var/www/localhost/htdocs/horde/turba/config/sources.php file

/** * A local address book in an LDAP directory. This implements a public * (shared) address book. * */ $cfgSources['localldap'] = array(   'title' => _("Shared LDAP Address Book"),    'type' => 'ldap',    'params' => array( 'server' => 'localhost', 'port' => 389, 'tls' => false, 'root' => 'ou=addressbook,dc=domain,dc=uk,dc=com', 'bind_dn' => 'cn=root,dc=domain,dc=uk,dc=com', 'bind_password' => 'mypassword', 'sizelimit' => 200, 'dn' => array('cn'), 'objectclass' => array('top',                              'person',                               'organizationalPerson',                               'inetOrgPerson'), 'scope' => 'one', 'charset' => 'utf-8', 'checkrequired' => false, 'checkrequired_string' => ' ', 'checksyntax' => false, 'version' => 3, ),   'map' => array( '__key' => 'dn', '__uid' => 'uid', 'firstname' => 'givenname', 'lastname' => 'sn', 'name' => 'cn', 'email' => 'mail', 'homePhone' => 'homephone', 'workPhone' => 'telephonenumber', 'cellPhone' => 'mobile', 'homeStreet' => 'street', 'homeCity' => 'l', 'homeProvince' => 'st', 'homePostalCode' => 'postalcode', ),   'search' => array( 'firstname', 'lastname', 'name', 'email', 'homePhone', 'workPhone', 'cellPhone', 'homeStreet', 'homeCity', 'homeProvince', 'homePostalCode', ),   'strict' => array( 'dn', ),   'approximate' => array( 'cn', ),   'export' => true,    'browse' => true, );

Kronolith Calendar
Install the software

emerge -q www-apps/horde-kronolith

Create working copies of the configuration files

cd /var/www/localhost/htdocs/horde/kronolith/config/ for foo in *.dist; do cp $foo `basename $foo .dist`; done

Fix the directory permissions

cd /var/www/localhost/htdocs/horde/kronolith/ chown -R apache:apache config/ chmod g+w config/

Create the MySQL database

mysql -u root -p create database horde; grant all privileges on horde.* to 'horde'@'localhost' identified by 'horde'; flush privileges; exit;

Create the MySQL database tables

cd /var/www/localhost/htdocs/horde/kronolith/scripts/sql/ mysql -u root -p horde < kronolith.mysql.sql

Configure by loading this web page

http://address.of.your.server/horde/


 * 1) Administration --> Setup --> Application: Calendar (kronolith)
 * 2) Reminder Settings --> $conf[reminder][server_name] --> 127.0.0.1
 * 3) Reminder Settings --> $conf[reminder][from_addr] --> server@127.0.0.1
 * 4) Click [Generate Calendar Configuration] button