Setup and Configure iRedMail Server on Ubuntu 18.04 | 16.04 LTS

iRedMail is a free, open source mail server software that allows you to build and host your own mail server in your environment.. Right out of the box, iRedMail will install all necessary components and configure a full-fledge mail server for you…

With it intuitive web portal, you can create as many inboxes as you’d like on your own server..

iRedMail focuses on privacy, to make sure all your data are protected on your own servers, and the best security practices are enabled by default forcing all users to use mail services through secure connections (POP3/IMAP/SMTP over TLS, webmail with HTTPS)…

If you’re looking for a free, open source mail server for your environment, you may want to take a look at iRedMail…

This brief tutorial shows students and new users how to install and configure iRedMail on Ubuntu 18.04 | 16.04 LTS servers…

For more about iRedMail, please check its homepage

To get started installing iRedMail, follow the steps below:

Step 0: Configure Ubuntu Hostname

Before installing iRedMail, make sure to configure the hostname of the mail server… For this tutorial, we’re going to be using the hostname and IP address below:

webmail.example.com                    =========== >              192.168.20.2

You can run the commands below to set the server hostname…

sudo hostnamectl set-hostname webmail.example.com

Also, run the commands below to open Ubuntu hosts file…

sudo nano /etc/hosts

Then enter the line as shown below:

192.168.20.1    webmail.example.com webmail localhost
127.0.0.1       localhost
127.0.1.1       ubuntu1804

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
.......

Save the file and exit…

Step 1: Download and Install iRedMail

Now that the mail server hostname is configured… run the commands below to download and install iRedMail… First, update Ubuntu server by running the commands below:

sudo apt update && sudo apt dist-upgrade && sudo apt autoremove

When you’re done updating, run the commands below to download iRedMail archived package and extract it…

cd /tmp
wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.9.tar.bz2
tar xjf iRedMail-0.9.9.tar.bz2

After that, change into the extracted folder and run the commands below to initial the installation…

cd iRedMail-0.9.9
sudo bash iRedMail.sh

That should start the installation and prompt you with series of questions on setting up iRedMail… Use the guide below to answer as much as possible…

iRedMail Setup

Next, accept the default storage location for mail boxes.. If you have another location, you can specify it at the line…

iRedMail

Next, choose to install Nginx HTTP server for iRedMail…

iRedMail Ubuntu configure

Also choose to install a database server… For this tutorial, we’re going with MariaDB database server… You’ll be prompted to create and confirm a root user for MariaDB database server…

iRedMail Ubuntu install

After that, you’ll be prompted to create your first domain name.. It won’t be the server domain name you specified above… This should can be a test domain just to make sure things are configured correctly…

For our first domain, we’ll be using example.net

After that, you’ll be prompted to enter the admin password for the domain above…

Next, choose a web interface to use with  your server… and complete the wizard…

Finally, type y to complete…

*************************************************************************
***************************** WARNING ***********************************
*************************************************************************
*                                                                       *
* Below file contains sensitive infomation (username/password), please  *
* do remember to *MOVE* it to a safe place after installation.          *
*                                                                       *
*   * /tmp/iRedMail-0.9.9/config
*                                                                       *
*************************************************************************
********************** Review your settings *****************************
*************************************************************************

* Storage base directory:               /var/vmail
* Mailboxes:                            
* Daily backup of SQL/LDAP databases:   
* Store mail accounts in:               MariaDB
* Web server:                           Nginx
* First mail domain name:               example.net           
* Mail domain admin:                    postmaster@example.net           
* Additional components:                Roundcubemail SOGo netdata iRedAdmin Fail2ban

< Question > Continue? [y|N] y

That should install and configure your mail server environment.. After a brief moment, the server should be ready to use…

Take note of the username and password to access the web portal…

********************************************************************
* URLs of installed web applications:
*
* - Roundcube webmail: https://webmail.example.com/mail/
* - SOGo groupware: https://webmail.example.com/SOGo/
* - netdata (monitor): https://webmail.example.com/netdata/
*
* - Web admin panel (iRedAdmin): https://webmail.example.com/iredadmin/
*
* You can login to above links with below credential:
*
* - Username: postmaster@example.net           
* - Password: secret_password
********************************************************************
* Congratulations, mail server setup completed successfully. Please
* read below file for more information:
*
*   - /tmp/iRedMail-0.9.9/iRedMail.tips
*
* And it's sent to your mail account postmaster@example.net           .
*
********************* WARNING **************************************
*
* Please reboot your system to enable all mail services.
*
********************************************************************

To complete, you’ll want to reboot the server… run the commands below to do that..

sudo reboot

After rebooting, logon to the admin portal using the URL below:

http://webmail.example.com/iredadmin

Login and enjoy!

That it!

Don’t forget to delete the config file…

sudo rm -rf /root/iRedMail-0.9.9/config

Congratulations! You have learned how to installed and configured iRedMail on Ubuntu 18.04 | 16.04 LTS server

You may also like the post below:

Install Open Drive (Google Drive Linux Client) on Ubuntu 18.04 | 16.04

One Reply to “Setup and Configure iRedMail Server on Ubuntu 18.04 | 16.04 LTS”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.