Setup the roundcube web mail for mails management.

Ubuntu has roundcube in it is official packages but here is how to install the roundcube from the it is source packages, because it is easy to backup for the next installation.
To resolve dependencies install these packages:

aptitude install php-imap php-mysql php php-mcrypt php-auth-sasl libmcrypt php-pear mysql-server mysql-client
Download the roundcube tar ball from the http://www.roundcube.net/ , to install the roundcube dependent packages run the aptitude to install the roundcubemail Or download this file for dependencies.
Unpack the roundcube tar ball in the web server root directory, in our example is /home/www/example.com and rename to roundcubemail.
Open the roundcubemail directory and change the ownership and permission of temp and logs directory:
chown -R www-data:www-data temp
chown -R www-data:www-data logs
chmod -R 0775 temp
chmod -R 0775 logs
We use mysql for roundcubemail database, create roundcubemail user for mysql:
mysql>CREATE USER 'roundcube'@'localhost';
Create the mysql database "roundcubemail":
mysql>CREATE DATABASE roundcubemail DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Give the user roundcubemail grant privilege to the database:
mysql>GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcubemail@localhost;
create the necessary tables run the script mysql.initial.sql from the SQL dir in the roundcube source dir:
# mysql roundcubemail < SQL/mysql.initial.sql
To configure the roundcubemail open the url http://example.net/roundcubemail/installer in the web browser.
Click on Start the installation.
In the step 1 the installwer will check the dependencies, when all are ok click on next and fill the informations for your mail server.
In the General configuration check the enable_caching and leave the rest.
In the Logging & Debugging leave as it is.
In the Database setup select the mysql and fill the infromations for the mysql server:
Database Name: roundcubemail
mysql User: roundcube
mysql password: msyql password leave empty for our case.
IMAP Settings
default_host "ssl://localhost" (your host name)
default_port "993"
Change the IMAP AUTH type from the null to the LOGIN.
SMTP Settings
smtp_server "localhost" (wrtie the stmp server)
smtp_port " " (can use smtp ports 25, 2525, 8025, 587 and 465 for ssl, check for your isp)
Leave the others entries as default.
Click on the CREATE CONFIG link to create configuration files.
Click on Download link to download the config file config.inc.php, and copy to the roundcubemail/config directory.
click on continue to go to the 3 Test Config, in this window can check the imap and smtp servers.
To open the roundcubemail open the url http://example.com/roundcubemail in a web browser.
Upgrade to new version
Download the new version tar ball of roundcubemail and unpack and set the ownership and permissions of the temp and logs directories, and copy the config file config.inc.php from the old version to the new version directory.
New installation from the backup
Copy the roundcubemail installation directory from the backup to the web server document root set the ownership and permission of the temp and logs and create the mysql user, database and tables as above.


<< Previous Next >>