User Tools

Site Tools


roundcube

Introduction

RoundCube is an easy to use lightweight web mail client. It is a great alternative for checking your email when you don't have your own computer available.

Installing RoundCube on Debian

Install RoundCube and its MySQL connector.

apt-get install roundcube roundcube-mysql

If it is not already on the machine this will also install PHP and some PHP add-ons, the spelling package aspell and some JavaScript support.

Next step will be the package configuration which is done via Debian's configuration dialogs.

Variant 1: Configuring the database automatically

First thing the dialogs will ask you is if you want

dbconfig-common

to create the database for you. If you aswer “yes” then the database will created. If you answer “no” then you will have to do it by hand. Unless you already have a RoundCube database I suggest you answer “yes” here.

Next you will be asked which database you want to use. Since I already have MySQL running I chose MySQL. SQLite is an embedded database and a good choice for a small self-contained installation.

Next you have to enter the password for the database administrator. The configuration dialogs need this in order to be able to create the new database.

After creating the database the configuration dialogs create the application user account on the new database and add the necessary permission. You can either choose a password or leave it blank if you want to automatically create a random password. Since I like to be able to debug database problems with the applicaton user, I provided a password. You will have to re-enter the password for saftey.

Pitfall backup user

The configuration dialog tries to create a backup user also. Unfortunately like many systems mine already had one so there was a conflict that I had to resolve by hand later.

Variant 2: Configuring the database manually

If the database configuration did not execute properly or you planned to do it by hand for some reason here is how to.

The database access details can be found under

/etc/roundcube/debian-db.php

See the instructions in that file for reference on how to make changes here. Remeber that the configuration options here must match your database setup.

Creating the database:

  1. Open the
    mysql

    client as root user.

  2. Create the database.
  3. Grant the permissions to the
    roundcube

    user.

  4. Switch to the
    roundcube

    database.

  5. Run the installation script for the database tables.
CREATE DATABASE roundcube;
GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES ON roundcube.* TO roundcube@localhost IDENTIFIED BY '<roundcube user password>';
FLUSH privileges;
USE roundcube;
SOURCE SOURCE /usr/share/dbconfig-common/DATA/roundcube/install/mysql;

</code>

Next you need to run the SQL scripts that create the database layout.

Configuring email server connection

I'll asume here that the email server and roundcube run on the same server. You need to make minor adaptions if they don't.

The Debian configuration dialogs will ask you where your IMAP server resides. If the mail server is on the same machine then

ssl://localhost:993

is the right answer.

Next you choose the default locale (i.e. setup the language).

Web server configuration

The dialogs can auto-configure apache and lighttpd. I only describe the Apache installation.

Configuring the web client

If you don't have the very basic vanilly Debian setup you are not quite done yet.

Find the RoundCube apache configuration file under

/etc/apache2/conf.d/roundcube

Uncomment the following two lines:

Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
Alias /roundcube /var/lib/roundcube

No you should be able to see RoundCube under

http://<your server hostname>/roundcube

Creating a user account by hand

INSERT INTO users (username, mail_host, created) VALUES ('<username>', 'localhost', now());
roundcube.txt · Last modified: 2015/05/17 17:44 (external edit)