Setup and Configure iRedMail Server on Ubuntu 18.04 | 16.04 LTS

graphic designer 4562741 640

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:                    =========== >    

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

sudo hostnamectl set-hostname

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

sudo nano /etc/hosts

Then enter the line as shown below: webmail localhost       localhost       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
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

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.


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

iredmail ubuntu install 4

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.

iredmail ubuntu install 5

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:                
* Mail domain admin:                     
* 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:
* - SOGo groupware:
* - netdata (monitor):
* - Web admin panel (iRedAdmin):
* You can login to above links with below credential:
* - Username:           
* - Password: secret_password
* Congratulations, mail server setup completed successfully. Please
* read below file for more information:
*   - /tmp/iRedMail-0.9.9/
* And it's sent to your mail account           .
********************* 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:

Login and enjoy!

iredmail ubuntu install 6

That it!

Don’t forget to delete the config file.

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

iredmail ubuntu install 7

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:

Leave a Reply

Your email address will not be published.

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