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.
So here is how to install RainLoop on your server. Having a LAMP server will be all it takes to install it.
1) Create a folder in your /var/www dedicated for RainLoop Webmail:
2) Download the latest RainLoop Webmail version using their PHP script
cd /var/www/rainloop wget -qO- http://repository.rainloop.net/installer.php | php
3) Change the owner of the folder by Apache user (www-data)
chown www-data:www-data -R /var/www/rainloop
4) Access the admin panel:
Simply go to: http://yourIP/rainloop/?admin
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 firstname.lastname@example.org 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).
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):
and paste the following content:
Redirect / https://rl.domain.tld
php_value memory_limit 10M
php_value post_max_size 10M
php_value upload_max_filesize 10M
Options Indexes FollowSymLinks MultiViews
allow from all
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)
You should now be able to access to your Webmail through rl.domain.tld that will automatically redirect you to https://rl.domain.tld.