Skip to main content

Modern OpenSource Webmail for your server – RainLoop

logo rainloop

When I decided to restart my mail server and install a nice webmail, I’ve immediately thought about Roundcube, then came to my mind Zimbra, Horde, AfterLogic, etc…but to be frank some of them have a very old style design (Horde for example) and frankly speaking, nothing very new for the others in term of design. This was before I discover RainLoop.

 

RainLoop is a free and Open Source webmail application under Creative Content licence and based on PHP. It has a modern interface, with drag’n’drop, fancy upload progress bar, while being easily customizable, with integration to social media (Facebook, Twitter, etc…) while still being simple to install and use and yet with good performance.

Rainloop screenshot

So here is how to install RainLoop on your server. Having a LAMP server will be all it takes to install it.

 

Installation

1) Create a folder in your /var/www dedicated for RainLoop Webmail:

2) Download the latest RainLoop Webmail version using their PHP script

3) Change the owner of the folder by Apache user (www-data)

4) Access the admin panel:

Simply go to: http://yourIP/rainloop/?admin

Rainloop Admin loginThe default login is: admin and password: 12345

5) Configure your domain:

To allow connection, you will need to add your domain, very simple to configure if RainLoop is installed on the same machine than your mail server. Simply put the address for both IMAP and SMTP as localhost.

If you want to be able to login using only the username instead of user@domain.tld when you log in, you need to tick “use short login form” (To remove domain.tld when connecting) and configure the login page with a “Default Domain” (freedif.org in my case)

You should now be able to connect to your new Webmail !!

If you want to enable the contact feature (Create, use and share your contact through CardDAV) you will need to use a SQL database (Either SQLite or MySQL).

 

Virtualhost configuration

Final step, although optional, if you want to access to your RainLoop Webmail through a dedicated sub domain or domain name, like rl.freedif.org instead of using the IP/rainloop link, you will need to set up a virtualhost. And obviously you want to force HTTPS connection.

You will need to:

1) Create a A redirection in your DNS server/registrar

2) Have SSL certificate ready. If not you can read this tutorial.

3) Create your virtualhost as following:

In /etc/apache2/sites-enabled/, create a file called rainloop (In root):

nano /etc/apache2/sites-enabled/rainloop

and paste the following content:

<VirtualHost *:80>
ServerAdmin webmaster@domain.tld
ServerName rl.domain.tld
Redirect / https://rl.domain.tld
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/freedif.pem
SSLCertificateKeyFile /etc/ssl/private/freedif.key

ServerAdmin webmaster@domain.tld
ServerName rl.domain.tld

DocumentRoot /var/www/rainloop
<Directory />
Options FollowSymLinks
AllowOverride All

php_value memory_limit 10M
php_value post_max_size 10M
php_value upload_max_filesize 10M

</Directory>
<Directory /var/www/rainloop>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
</IfModule>

Adapt the content (Servername, webmaster, SSL certificate and directory, …).

Note that I’ve added 3 lines for PHP configuration to allow to send large attachment (10Mb)

When done, save the file (CTRL+X then Yes) and reload apache: (In root)

/etc/init.d/apache2 reload

You should now be able to access to your Webmail through rl.domain.tld that will automatically redirect you to https://rl.domain.tld.

OpenSource Webmail for your mail server (in Ajax) – AfterLogic Webmail

https://mail3.kconlineinc.com/al_logo.pngIf you are looking for an alternative to Roundcube, AfterLogic certainly worth a try.

AfterLogic WebMail Lite, is a free and opensource community edition, its Ajax web interface is clean, easy to use and reactive. Multidomains, with address book, mail filters (Sieve), Auto-complete of e-mail addresses, spell check, delivery confirmation, etc…

It has all it takes to be a simple webmail with essential features.

 

If you are looking on top of it for a calendar (Events and reminder), multiple mail account per user, sub-admin feature, you will need to go pro. (Which I don’t need)

Here is how to install it on your own server. I assume you already have a LAMP server working. If it’s not the case, you can check my previous tutorial on how to install a Apache, MySQL and PHP.

Installation

Although a deb is available in Debian/Ubuntu repository, I prefer to install it with their latest archive.

1) Create a folder in your /var/www dedicated for AfterLogic Webmail:

As root user, type:

2) Download and unzip latest AfterLogic Webmail Lite archive

3) Change the owner of the folder by Apache user (www-data)

4) Run the installer:

Navigate to http://IP/afterlogic/install/ with your favourite web browser and check/correct any unmet requirement.

For example, in my case I didn’t have cURL Extension. I simply add to install it in root:

At the 3rd Step, you will need to set up the SQL database. I suggest you to use MySQL with PHPMyAdmin to create the database and user. If you don’t know how to do that, you can check my previous PHPMyAdmin tutorial.

You will be able to check the connection with AfterLogic Webmail and the MySQL Database.

 

As this is a new install, it needs to create the tables (Leave the last box ticked)

You will then need set up a strong password on the Webmail admin (mailadm). Through the Webmail admin interface, you will be able to set up/modify the IMAP/SMTP connection, database info, manage users if you want to restrict it, etc…(But it’s a very simple and light administration panel).

While the next step will help you check if the SMTP/IMAP server is working.

5) Delete the installer:

In root (sudo/su) type:

If you want to configure additional option like the maximum attachment size, you can directly edit the data/settings/settings.xml file.

You should now be able to access your mail by using directly your username (If installed in localhost with real user, you don’t need to add @mydomain.com)

Virtualhost configuration

Now you got your webmail working and you want to access it from al.domain.tld or directly from mywebmail.tld, instead of using the IP/afterlogic link, you will need to set up a virtualhost. And obviously you want to force HTTPS connection.

You will need to:

1) Create a A redirection in your DNS server/registrar

2) Have SSL certificate ready. If not you can read this tutorial.

3) Create your virtualhost as following:

In /etc/apache2/sites-enabled/, create a file called roundcube (In root):

and paste the following content:

Adapt the content (Servername, webmaster, SSL certificate and directory, …).

Note that I’ve added 3 lines for PHP configuration to allow to send large attachment (10Mb)

When done, save the file (CTRL+X then Yes) and reload apache: (In root)

Open Source Webmail for your mail server (in PHP) – Roundcube

https://kolabsys.com/sites/kolabsys.com/files/styles/large/public/field/image/roundcube_logo.png?itok=1gMPA7kzWhat is very good about free software (Free as free speech), is the large choice of alternatives. But when several of them are mature enough to be used everyday, especially such as a Webmail….the choice is tough! Roundcube? Xuhek? Horde? SquirrelMail? hastymail? Mailr? AfterLogic? RainLoop? Atmail? or the promissing MailPile (Currently in Alpha) and so many others….

Each of them with their strengths and weaknesses…I do have some preferences like recent design style (Exit Xuhek, Horde, SquirrelMail, hastymail, Mailr,…), without taking too much resources or overkill features (exit Zimbra,…) and of course with recent updates (Exit Atmail, Claros, …) but stable (Exit Mailpile for now)….well still a lot of choice to choose from (Roundcube? AfterLogic Lite? RainLoop? and most probably others good alternatives I’m missing)

But most probably Roundcube is the most popular one of this Webmail set and shouldn’t go wrong about it. But the best will be to test at least the last 3 mentioned (Which I will in different article, but won’t go into the details of the features and comparison as I will need weeks to try them)

Roundcube is a browser based IMAP client (Webmail). It has all of what we will expect from a mail client, such as MIME support, address book, folder manipulation, message searching, spell checking and much more

Screenshow #01

As you may know, few days ago, Roundcube announced finally after 8 years their stableversion 1!!

So it’s time to test it out and write this tutorial!

Installation

Obviously you need to have your mail server working on top of your web server (Apache, Nginx, …). If it’s not the case, I suggest you to have a look to my previous tutorial on setting up a mail server.

You can download the latest version from sourceforge here or directly install it from the repo (Might not be the latest).

If you are installing the latest version from Sourceforge, you will need to:

1) Create a dedicated folder.

In root, type:

2) Download the latest version, extract the content inside the folder and change few permissions

3) Create a SQL database

The most common database is MySQL but others such as PostgreSQL and SQLite are also supported.

In my case, I’ll use MySQL with PhpMyAdmin to do so.

I’ll create a database called roundcube and a dedicated user call roundcube with all privileges on this database (And only this). If you don’t know how to do it, I suggest you to install phpmyadmin if not done yet. You will only need few clicks to do that.

4) Point with your Web Browser to the installer and follow the easy steps

http://url-to-roundcube/installer/

Most probably you will want to modify only the Database configuration and the IMAP settings like the username domain (freedif.org in my case) and the SMTP settings (smtp_server with smtp_user/smtp_pass or simply tick the option “Use the current IMAP username and password for SMTP authentication”).

It will generate a config file

5) Copy/paste or download/upload the config file

If you have installed the Webmail on the same machine than IMAP server, you don’t need to indicate the username_domain

When done, click on Continue

You will probably have to initialize the database and you could test SMTP and IMAP config.

6) Disable and Remove installer

You should now have a working Roundcube and should be able to login using your username directly. (If installed in localhost with real user, you don’t need to add @mydomain.com)

Virtualhost configuration

Now you got your webmail working and you want to access it from rc.domain.tld or directly from mywebmail.tld, instead of using the IP/roundcube link, you will need to set up a virtualhost. And obviously you want to force HTTPS connection.

You will need to:

1) Create a A redirection in your DNS server/registrar

2) Have SSL certificate ready. If not you can read this tutorial.

3) Create your virtualhost as following:

In /etc/apache2/sites-enabled/, create a file called roundcube (In root):

and paste the following content:

Adapt the content (Servername, webmaster, SSL certificate and directory, …). Note that I’ve added 3 lines for PHP configuration to allow to send large attachment (10Mb)

When done, save the file (CTRL+X then Yes) and reload apache: (In root)