RainLoop is a free, open-source web-mail client for the desktop that integrates a talk-to-text service. It is designed to work as an interface to regular IM programs like AOL and Windows Live Messenger. RainLoop is a web-based application that can be run with most browsers and it takes only a few seconds to start up.

Features:

  • Email – Rainloop comes preconfigured with all the major POP3/IMAP servers you might want to use. You don’t need to configure them separately; they’re ready when you start using Rainloop.
  • Calendar – Add multiple calendars from popular calendaring software (iCal, Google Calendar, etc) into Rainloop.
  • Contacts – See who’s on your contacts list, view their contact information, add new people, search for people by name or location, add notes about each person, etc.
  • Tasks – Manage tasks easily in Rainloop. Add tasks quickly from Outlook Express, Microsoft Outlook, Apple Mail, Mozilla Sunbird, Firefox, Eudora Pro, Netscape Communicator, Opera Mail, or any other application that supports the standard GTD task model.
  • Notes – Share ideas, thoughts, links, and more. Create and edit text files, HTML documents, formatted RTF documents, images, PDFs, MP3s, and much more.
  • News – Read news feeds from RSS 2.0 compliant websites such as Bloglines, Digg, Reddit, Slashdot, Yahoo! Buzz, etc.
  • Search – Quickly find emails based on keywords, labels, subjects, sender, receiver, date range, and many other criteria.
  • Web browsing – Browse through pages of your choice using built-in proxy support.
  • Chatting – Use Rainloop as a chat client for AIM, MSN Messenger, Jabber, ICQ, IRC, and more.
  • Screen sharing – Remotely share your screen, webcam, or microphone with friends and family.
  • Importing – Rainloop provides a simple way to import PST files and mbox format archives created by another program like Thunderbird, Evolution, Entourage, Kontact, etc.
  • Automatic updates – When a new version becomes available, Rainloop will automatically download the update without requiring user intervention.

In this step-by-step guide, you’ll learn how to configure, install, and use Rainloop as a webmail client.

Prerequisites

To install Rainloop properly, you should have:

  • A fully qualified domain name (FQDN) pointing to your server and a dedicated SSL certificate for that FQDN.
  • A fresh installation of Debian 10 or Debian 11 on your server with root access.
  • A properly configured Apache2 web server with SSL enabled by default.
  • A minimum of 2 GB of RAM, 20 GB of hard disk, and 2 GHz processor or higher.

Updating your system.

You need to update your system to support all the new TLS 1.2 and SSL protocols for your Rainloop webmail client.

Run the following command to update your system package index.

sudo apt update && apt upgrade -y

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-1.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="169" src="data:image/svg xml,” width=”1042″>

Installing Nginx

Nginx is in the LEMP stack, which means that it uses Linux, Nginx, MariaDB, and PHP. Linux is used to handle the back-end server operations. Nginx is the load balancer, load-balancer and front-end proxy. MariaDB is the database engine. PHP is used to run your Rainloop webmail application.

Nginx is one of the best web servers out there, and it is used by a large percentage of the top 10,000 most visited websites in the world. You will use Nginx as a reverse proxy server to forward all incoming HTTP requests to your Rainloop webmail client.

Run the sudo apt install nginx -y command to install Nginx on your server.

sudo apt install nginx -y

<img alt="Install Nginx" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-2.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="650" loading="lazy" src="data:image/svg xml,” width=”1122″>

Run the sudo service nginx status command to verify that Nginx is installed and running.

sudo service nginx status

You should get active (running) systax as the output from this command. If you don’t, go back and install Nginx again until you get the active output.

<img alt="Check Nginx status" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-3.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="417" loading="lazy" src="data:image/svg xml,” width=”1110″>

For double-checking, open your favorite web browser and go to http://your-ip-address. You should get the default Nginx page with the latest version of the Nginx software, which will be displayed on the screen. This means that your Nginx installation was successful and is working properly.

<img alt="Nginx page" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-4.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="416" loading="lazy" src="data:image/svg xml,” width=”1150″>

Installing MariaDB

For your Rainloop webmail application, you need a database engine that can handle the large amounts of data you will send back and forth to it. MariaDB is a very popular open-source alternative to MySQL, which is often used because it is more lightweight, faster, and easier to use than MySQL

Run the sudo apt install mariadb-server -y command to install MariaDB on your server.

sudo apt install mariadb-server -y

<img alt="Install MariaDB" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-5.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="650" loading="lazy" src="data:image/svg xml,” width=”1122″>

Once the installation is complete, run the sudo mysql_secure_installation command to secure your MySQL instance. The “mysql_secure_installation” script is a security feature that will perform certain actions to secure your MariaDB server.

mysql_secure_installation

You will be asked to enter the root password for your MariaDB database instance. This is your first time setting a password for your MySQL root user, so hit Enter to continue.

You will be asked if you want to set a root password. Enter Y to continue. Provide a strong password that only you can remember. Hit Enter.

<img alt="Secure MySQL installation" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-6.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="650" loading="lazy" src="data:image/svg xml,” width=”1122″>

For the remaining questions, type Y and hit Enter to confirm each of the questions.

<img alt="Securing MariaDB" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-7.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="650" loading="lazy" src="data:image/svg xml,” width=”1122″>

Type the command below to restart MariaDB. This will make sure that all the changes have taken effect.

sudo service mariadb restart

Run the sudo systemctl status mariadb command to check whether MariaDB is running or not.

sudo systemctl status mariadb

You will get the output “Active: active (running) since … in state” as the output from this command. This means that your MariaDB database instance is running and listening for requests.

<img alt="MariaDB status" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-8.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="650" loading="lazy" src="data:image/svg xml,” width=”1122″>

Installing PHP

PHP is short for PHP: Hypertext Preprocessor. A PHP-based service can be easily embedded into HTML pages, thus enabling you to interact with your MySQL database from a website. It is one of the most popular web development languages out there.

RainLoop requires PHP 5.5 and many of the PHP extensions to work properly. This demo uses PHP 7.3 .

Run the commands below to install PHP 7.3 and its modules on your server.

sudo apt install php -y
sudo apt install php-cli php-fpm php-curl php-json php-mbstring -y
sudo apt install php-common php-xml unzip -y

Once the installation is complete, open the /etc/php/7.3/fpm/php.ini file in your favorite editor.

sudo nano /etc/php/7.3/fpm/php.ini

On Debian 11, use this command:

sudo nano /etc/php/7.4/fpm/php.ini

Edit the following lines in the /etc/php/7.3/fpm/php.ini file as follows:

Before:

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-9.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="113" loading="lazy" src="data:image/svg xml,” width=”703″>

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-10.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="175" loading="lazy" src="data:image/svg xml,” width=”1112″>

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-11.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="135" loading="lazy" src="data:image/svg xml,” width=”985″>

After:

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-12.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="121" loading="lazy" src="data:image/svg xml,” width=”936″>

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-13.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="159" loading="lazy" src="data:image/svg xml,” width=”1121″>

<img data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-14.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="130" loading="lazy" src="data:image/svg xml,” width=”1026″>

Save and close the php.ini file when you are done and restart PHP on your server to make sure all the changes take effect.

sudo service php7.3-fpm restart

On Debian 11, use:

sudo service php7.4-fpm restart

Creating a Database for RainLoop

RainLoop uses databases to store your user’s data and logins. You will need a database for RainLoop to work properly.

Run the command below to log into your server’s MariaDB shell with the root user. Enter your root password and hit Enter to continue.

sudo mysql -u root -p

Run the CREATE DATABASE rainloopdb; command to create a new MariaDB database named rainloopdb. This database will store all the user data, logs, and login information. Remember to put the ; semicolon at the end of every SQL query.

CREATE DATABASE rainloopdb;

Run the commands below to create a new user in your database, with a username of rainloopuser and a password of password123. Replace password123 with any password that you want. Be sure to use a strong password that is used only once on your server.

CREATE USER 'rainloopuser'@'localhost' IDENTIFIED BY 'password123';

Run the GRANT ALL ON rainloopdb.* TO ‘rainloopuser’@‘localhost’; command to grant all privileges on the database to your newly created user.

GRANT ALL ON rainloopdb.* TO 'rainloopuser'@'localhost';

Run the FLUSH PRIVILEGES; command to reload the privileges that you have just granted. This ensures that your user has full access to the database.

FLUSH PRIVILEGES;

Finally, run the exit; command to log out of your MariaDB shell.

exit;

<img alt="Create database for RainLoop" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-15.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="650" loading="lazy" src="data:image/svg xml,” width=”1122″>

We have successfully created a new database named rainloopdb, and a user named rainloopuser with password “password123” who has full access to all the data and tables in our new database. Now we can move on to installing RainLoop.

Installing RainLoop

For this demo, we will download and install RainLoop for the community from its official website. You can get the latest build of RainLoop this way.

Run the command below to download RainLoop to your web root directory.

mkdir /var/www/rainloop && wget http://www.rainloop.net/repository/webmail/rainloop-community-latest.zip

Next, we will extract the contents of the rainloop-community-latest.zip file to our web root directory. This will create a new directory named rainloop-community-x.x.x

unzip rainloop-community-latest.zip -d /var/www/rainloop

<img alt="Unpack rainLoop source" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-16.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="650" loading="lazy" src="data:image/svg xml,” width=”1122″>

Finally, we need to set the proper permissions to the newly-created directory. The easiest way to do this is by using the chown and chmod commands.

sudo chown -R www-data:www-data /var/www/rainloop && sudo chmod -R 775 /var/www/rainloop

Creating Virtual Host for RainLoop

A Virtual Host is a setting in Nginx, the web server used in this tutorial, allowing multiple domains to run on the same server. This way we can save money and resources by hosting multiple websites on a single server.

Hosts allow you to specify which domain names point to which directory on your computer and how you want to process them – for example, whether you want all requests for a domain name sent to a specific PHP script (e.g. “index.php”) or you want them forwarded to a different script (e.g., “default.php”). There are two types of hosts: “global” and “location.” Global hosts are the standard type that is recognized by Apache, whereas Nginx uses location-based hosts.

Open an etc/nginx/sites-available/rainloop.conf file in your favorite text editor. a

sudo nano /etc/nginx/sites-available/rainloop.conf

Add the following lines of code to the /etc/nginx/sites-available/rainloop.conf file. replace your-domain.com with your actual domain.

server {
listen 80;
server_name rainloop.your-domain.com;
root /var/www/rainloop;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}

location ~ .php$ {
fastcgi_index index.php;
fastcgi_split_path_info ^(. .php)(.*)$;
fastcgi_keep_conn on;
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location ~ /.ht {
deny all;
}

location ^~ /data {
deny all;
}
}

Save and close the file when you are done editing it.

On Debian 11, replace php7.3-fpm with php7.4-fpm in the above file.

Run the ln -s /etc/nginx/sites-available/rainloop.conf /etc/nginx/sites-enabled command to create a symlink and enable the virtual host. This will configure port 80 on your server to serve all URLs from the “rainloop” domain root with HTTP protocol.

sudo ln -s /etc/nginx/sites-available/rainloop.conf /etc/nginx/sites-enabled/

Run the nginx -t command to test that everything is configured properly.

nginx -t

You will get the following output.

<img alt="Test nginx config" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-17.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="87" loading="lazy" src="data:image/svg xml,” width=”946″>

Finally, run the systemctl restart nginx command to restart the Nginx web server to ensure your changes take effect.

sudo systemctl restart nginx

Accessing the Administration Control Panel Web UI

Now that we have finished installing RainLoop, we can access the built-in PHP control panel by visiting the URL http://rainloop.your-domain.com in your browser.

You will get a login screen that looks like the one below. Enter the default username and password: admin/12345. Click on the > icon to log in.

<img alt="RainLoop Login" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-18.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="715" loading="lazy" src="data:image/svg xml,” width=”1430″>

Once logged in, you will see the administration control panel, where you can manage your user accounts and modify your settings.

<img alt="RaunLoop Dashboard" data-ezsrc="https://kirelos.com/wp-content/uploads/2023/04/echo/word-image-19816-19.png" data-ez decoding="async" ezimgfmt="rs rscb10 src ng ngcb10 srcset" height="646" loading="lazy" src="data:image/svg xml,” width=”1115″>

Conclusion

In this tutorial, we have installed a secure, robust, and reliable security-centered webmail service using PHP and MySQL. We have correctly selected the right web server to meet our specific needs and ensure that we have a stable and manageable setup going forward.

You should now have a fully functional installation of RainLoop. For further information on the RainLoop software, you can visit its official website.