Eu recomendo este excelente tutorial para a configuração de uma solução completa de email / groupware baseada no Horde Webmail. Ele é escrito para o Ubuntu 12.04, mas também funciona no 14.04:
Veja 19) para a instalação do Horde Webmail.
Author: Reason
Horde 5 is a groupware framework that includes applications focused on webmail. Putting it in place is a mix of apt-get and PECL / Pear package installations, much of which I lifted from the Ubuntu guide for Horde 4 and then adapted to this server setup. The first step is to install as many of the needed packages as possible through apt-get:
apt-get install php5-dev php5-sasl php-pear php5-tidy php5-imagick apt-get install php5-geoip libgeoip1 geoip-bin geoip-database apt-get install php-xml-serializer php5-memcache php-soap php5-intl apt-get install libidn11-dev libmagickwand-dev libmagick++4 imagemagick apt-get install libsasl2-dev libssh2-php libphp-jpgraph php-http-webdav-server
Next update the PECL and Pear package managers and install the remaining required packages:
pecl channel-update pear.php.net pear channel-update pear.php.net pecl install lzf pear install --alldeps channel://pear.php.net/Date_Holidays-0.21.5 pear install --alldeps channel://pear.php.net/Date_Holidays_UNO-0.1.3 pear install --alldeps channel://pear.php.net/Date_Holidays_USA-0.1.1 pear install --alldeps channel://pear.php.net/Numbers_Words-0.16.2 pear install --alldeps channel://pear.php.net/Text_CAPTCHA-0.4.3
Next up is installing the Horde components. Start with these commands:
pear channel-discover pear.horde.org pear install horde/Horde_role pear run-scripts horde/Horde_role
At this point, you will be prompted to enter the "Filesystem location for the base Horde application" - so enter the full path to your webroot without a trailing slash, i.e. /var/www. Next, start the installation process with the command below. This will take a while to run to completion:
pear install -a -B horde/webmail
At this point it is a good idea to make sure that all of your PHP extensions are in fact enabled. Some may not be; the following commands ensure that the configuration files that were missing in my installation trial run are created, and then restart Apache to pick them up:
echo "extension=memcache.so" > /etc/php5/conf.d/memcache.ini echo "extension=lzf.so" > /etc/php5/conf.d/lzf.ini service apache2 restart
The Horde application will now be sitting in your webroot, but owned by root. So change the ownership to the Apache user:
chown -R www-data:www-data /var/www The installation will have overwritten /var/www/.htaccess, so edit that file to reinstate your
mod_rewrite rule that redirects all traffic to HTTPS. It will look much like this:
allow from all <ifmodule mod_rewrite.c=""> RewriteEngine On # Add the redirect to HTTPS rule. RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*) https://mail.example.com/$1 [L] # This is the default Horde rule. RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ rampage.php [QSA,L] </ifmodule>
Once Horde is running it is completely open to the world in order to allow initial configuration. So first lock it down to be accessible from your IP address only - at least until you have an administrator and authentication set up. Do that by making this change to the /var/www/.htaccess file - in the example below replace 10.10.10.10 with the IP address you are using:
#allow from all # Remove this block when done Order deny,allow deny from all allow from 10.10.10.10 allow from 127.0.0.1
You can check to see that all of the required and/or desired PHP extensions are installed and working by visiting http://mail.example.com/test.php in your browser. It will provide a list of what is and is not presently installed. This guide leaves out LDAP and PAM support in PHP, for example, as they are not needed here.
Now log in to MySQL as root:
mysql -uroot -p You will need to create a MySQL database for Horde: create database horde; grant all on horde.* to 'horde'@'localhost' identified by 'hordepassword';