How to configure postfix and dovecot with roundcube in centos 7 VPS?(Part 2)
Roundcube WebMail is a browser-based IMAP client with an application like user interface, It provides full functionality you expect from an email client, including MIME support, address book, folder manipulation, message searching and spell checking.
RoundCube is for users who need a user-friendly web interface with some additional features available.
Firstly you have to configure LAMP stack in your managed VPS server for that run the following command:
# yum install -y httpd php php-fpm php-mcrypt php-cli php-gd php-curl php-xml php-mysql php-mbstring php-pspell php-imagick mariadb-server
Configure PHP settings
Open /etc/php.ini file with the vi editor by using the following command:
# vi /etc/php.ini
Search for date.timezone and edit the line, also remove “;” comment from the below line:
→ date.timezone = “Asia/Kolkata”
Configure MariaDB server
Run mysql_secure_installation in terminal and configure the basics settings of MariaDB.
Now create database for roundcube by using the following command:
# mysql -u root -p
Enter your root password
MariaDB [(none)]> CREATE DATABASE roundcubemail
MariaDB [(none)]> CREATE USER ’roundcube’@’localhost’ IDENTIFIED BY ‘=213@!#webL’;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON roundcubemail.* TO ’roundcube’@’localhost’;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit
Next import the roundcube table layout to the newly created database.
# cd /var/www/html/roundcubemail/
Firstly, download the latest stable version (1.3.7 at the time of this writing) of Roundcube from thedownload page to get it, and upload the files into your web server document root.
# mysql -u root -p roundcubemail < SQL/mysql.initial.sql
# tar xzf roundcubemail-1.3.7-complete.tar.gz
# mv roundcubemail-1.3.7 /var/www/html/roundcubemail
Now set the appropriate permission on the roundcube web root files by using the following command:
# chown -R apache:apache /var/www/html/roundcubemail
Last step to restart the apache and mariaDB server by using the following command:
# systemctl restart httpd mariadb;
Now open browser and use the address
The configurations page allows you to setup your roundcube instance. We will only explain the important options for the scope of this guide.
Under the General Configuration, set a product_name for example Example.com Webmail.
Roundcube Product Name
Go to Database setup, enter the database host, name, user and password to connect to the MySQL server.
Roundcube Database Settings
Then scroll down to IMAP and SMTP settings and enter the IP address of your IMAP and SMTP server, if its same server on which you are running roundcube, leave it as “localhost” and also specify other necessary parameters.
You can specify other settings according to your needs, once you are done, click on Create Config.
- You should new see a message saying ”The config file was saved successfully into /var/www/html/roundcubemail/config directory of your Roundcube installation.” Click on Continue.
Roundcube Configuration File Created
You can review your configuration from the Test config page as shown in the following screenshot.
Test Roundcube Configuration
Next, remove the whole installer folder (which contains files that may expose sensitive configuration data like server passwords and encryption keys to the public) from the roundcube root directory (or make sure that enable_installer option in config.inc.php is disabled).
# rm -rf /var/www/html/roundcubemail/installer
Finally, use the URL http://mail.example.com to access the roundcube login page. Enter your user name and password to view your mails.
After the above installation, you will be able to use Postfix for SMTP, Dovecot for IMAP, Roundcube for IMAP web client.