July 26, 2017

How to Install Roundcube Webmail on CentOS

Roundcube Logo

With Roundcube webmail you will get a full browser-based webmail IMAP client with an application-like user interface. Roundcube webmail runs on a standard PHP/MySQL configuration and provides full functionality you expect from an e-mail client, including MIME support, address book, folder manipulation, message searching and spell checking.

Root access is required to edit the following files and to execute commands. Log in as root (su) or simply prepend sudo to all commands that require root privileges.

Install Roundcube webmail

Install Roundcube webmail via yum.

yum install roundcubemail

Create a new roundcube MySQL database and import the table structure.
Please change the mysql.initial.sql path according to your Roundcube webmail version.

mysql -uroot -p
GRANT USAGE ON *.* TO 'roundcube'@'localhost' IDENTIFIED BY 'password';
create database roundcube;
GRANT SELECT, INSERT, UPDATE, DELETE ON `roundcube`.* TO 'roundcube'@'localhost';
use roundcube;
source /usr/share/doc/roundcubemail-0.1.1/SQL/mysql.initial.sql;

Modify the db.inc.php to suit your current MySQL setup.

vi /etc/roundcubemail/db.inc.php
$rcmail_config['db_dsnw'] = ‘mysql://roundcube:password@localhost/roundcube’;

Set the default host and enable auto_create_user to automatically create a Roundcube webmail account whenever a new mail user has been created.

vi /etc/roundcubemail/main.inc.php
$rcmail_config['default_host'] = 'localhost';
$rcmail_config['auto_create_user'] = TRUE;

Open the roundcubemail.conf and modify the Allow line. By default, access to the Roundcube webmail URL is only allowed from localhost.

vi /etc/httpd/conf.d/roundcubemail.conf
Allow from ::1

Now you can restart your webserver.

/etc/init.d/httpd restart

By default, Roundcube webmail can be accessed at the following locations:

  • http://localhost/roundcubemail/
  • http://you-IP-address/roundcubemail/

Speak Your Mind