Installing Roundcube on Ubuntu

Roundcube is a very popular free web-based interface open source to view and send mail using the mail server Postfix, Exim, and others written in PHP. The program includes IMAP client, so you can get use it to access their mailboxes on the Internet.

Now you do not need to install additional email client on a computer, everything can be done via the web interface. In this article we will discuss how to install Roundcube on Ubuntu 18.04 with the Apache web server and Mariadb.

Install Roundcube Ubuntu 18.04

I assume that Apache, PHP and MySQL already installed on your computer or server. If not, you can use this instruction to install.

1. Preparing Apache

Then we need to create virtual host Apache, which will be available to our mail client. To do this, create the file /etc/apache2/sites-available/roundcube.conf with the following content:

sudo vi /etc/apache2/sites-available/roundcube.conf

<VirtualHost *:80>
ServerName roundcube.local
ServerAdmin [email protected]
DocumentRoot /var/www/sites/roundcube/public_html/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

In string ServerName , you need to specify a subdomain, which will be available Roundcube, and in the line DocumentRoot we specify the path to the folder of the program.

Then activate the newly created virtual host, the rewrite module and restart the web server:

sudo a2ensite roundcube

sudo a2enmod rewrite

sudo systemctl restart apache2

Next we need to create this folder:

sudo mkdir -p /var/www/sites/roundcube/public_html/

If you install a program on your local computer, you need to add an entry to /etc/hosts file to the selected domain name to point to the local computer:

sudo vi /etc/hosts

127.0.0.1 roundcube.local

You must also install these packages php to work program:

sudo apt install php7.2 php7.2-gd php-mysql php7.2-curl php7.2-zip php7.2-ldap php7.2-mbstring php-imagick php7.2-intl php7.2-xml

You then need to set the timezone in php to do this, open the file /etc/php/7.2/apache2/php.ini, find this line and insert in it your time zone:

date.timezone = Europe/Kiev

2. The source code download

Next, navigate to the future folder with the command:

cd /var/www/sites/roundcube/public_html/

The program can be downloaded from its github page. At the moment, the latest version is 1.3.9. You can download it using the browser, and then copy the program folder or copy the link and download the file using wget:

wget https://github.com/roundcube/roundcubemail/releases/download/1.3.9/roundcubemail-1.3.9-complete.tar.gz

Then unzip the downloaded archive:

sudo tar xvzf roundcubemail-1.3.9-complete.tar.gz 

You then need to move all the files from the resulting folder in the current:

sudo cp-R roundcubemail-1.3.9/* ./

Next you need to give the web server rights to this folder and all files:

sudo chown-R www-data:www-data /var/www/sites/roundcube/public_html/
sudo chmod-R 775 /var/www/sites/roundcube/public_html/

3. Preparing your database

All the information store in MySQL, so you need to create a database and a user. To do this, run the MySQL console client:

mysql-u root-p

And run:

CREATE DATABASE roundcube_database;
CREATE USER 'roundcube'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON roundcube_database.* to 'roundcube'@'localhost';

To exit the program, type:

extit;

Then, you deploy the database Roundcube:

mysql-u roundcube -p roundcube_database < SQL/mysql.initial.sql

Install roundcube webmail is almost complete.

4. The roundcube installer

Now let’s see how to configure roundcube. Start the installer by opening your browser address http://roundcube.local/installer:

Here all items except Checking available databases should be set to OK. If not, it is necessary to perform the actions that define the program that the value has changed to OK. Only then proceed to the next step:

Here all settings can be left default, it is only necessary to change the parameters of the database access section Database setup. Specify the database name, user name and password:

You can then configure the IMAP and SMTP access to the mail server. The first one is used for viewing mail and one for sending. For example, I use IMAP from my gmail mailbox. If the mail server is on the local machine, nothing should be changed:

Then the program will report that the configuration file is saved successfully.

If the program prompts you to save the file manually, then it has no write access to the configuration folder. After the file is saved, click Continue:

Here, the tool will check the configuration file and will report that everything is fine with him. The configuration of Roundcube completed.

Now you can log in to Roundcube mail webmail. Open the address http://roundcube.local and enter the username and password of your account:

You can then read the letter:

Insights

Today we discussed how to install Roundcube Ubuntu 18.04. The program may not only process email from the local mail server, but to download letters from mail.ru or gmail.com.

Source: losst.ru

(Visited 75 times, 1 visits today)