In this tutorial, we will show you how to install iRedmail on Ubuntu 20.04 LTS. For those of you who didn’t know, iRedMail is an open-source mail server solution. The right way to build your mail server is with open-source software. iRedMail allows you to create as many mailboxes as you want through their built-in web interface. It provides a web-based interface for managing mails, folders, sieve filters.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of the iRedmail free and open-source mail server solution on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.
Prerequisites
- A server running one of the following operating systems: Ubuntu 20.04, 18.04, and any other Debian-based distribution like Linux Mint or elementary OS.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install iRedmail on Ubuntu 20.04 LTS Focal Fossa
Step 1. First, make sure that all your system packages are up-to-date by running the following apt
commands in the terminal.
sudo apt update sudo apt upgrade
Step 2. Set-Up (FQDN) Hostname on Your Server.
Run the following command to set up your hostname:
hostnamectl set-hostname mail.idroot.us
You can invoke the following command to see your hostname:
hostnamectl status
Output:
root@idroot ~ # hostnamectl status Static hostname: mail.idroot.us Icon name: computer-vm Chassis: vm Machine ID: 13fced5cb081741002306f6010ac63a68 Boot ID: f75fc7bec4bf4dcb8718c8c550dd7e6f Virtualization: kvm Operating System: Ubuntu 20.04 LTS Kernel: Linux Linux 5.5.0-86-generic Architecture: x86-64
Step 3. Installing iRedmail on Ubuntu 20.04.
Now we run the following command to download the latest version iRedmail from the official page:
wget https://github.com/iredmail/iRedMail/archive/1.4.0.tar.gz tar -xf 1.4.0.tar.gz
Next, Next, change the directory and install it:
cd iRedMail-1.4.0/ chmod +x iRedmail.sh ./iRedmail.sh
During the installation, you will be asked to answer several questions to set up iRedMail mail server. You should see the following page:
************************************************************************* ***************************** WARNING *********************************** ************************************************************************* * * * Below file contains sensitive infomation (username/password), please * * do remember to *MOVE* it to a safe place after installation. * * * * * /root/iRedMail-1.4.0/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: idroot.us * Mail domain admin: mail@idroot.us * Additional components: Roundcubemail SOGo netdata iRedAdmin Fail2ban < Question > Continue? [y|N]y
Then, type y and press Enter to proceed with the installation. Once the installation has been completed successfully. You should see the following output:
************************************************************************* * iRedMail-1.4.0 installation and configuration complete. ************************************************************************* < Question > Would you like to use firewall rules provided by iRedMail? < Question > File: /etc/default/iptables, with SSHD ports: 22. [Y|n]n [ INFO ] Skip firewall rules. [ INFO ] Updating ClamAV database (freshclam), please wait ... ******************************************************************** * URLs of installed web applications: * * - Roundcube webmail: https://mail.idroot.us/mail/ * - SOGo groupware: https://mail.idroot.us/SOGo/ * - netdata (monitor): https://mail.idroot.us/netdata/ * * - Web admin panel (iRedAdmin): https://mail.idroot.us/iredadmin/ * * You can login to above links with below credential: * * - Username: mail.idroot.us * - Password: meilanamaria123 * ******************************************************************** * Congratulations, mail server setup completed successfully. Please * read below file for more information: * * - /root/iRedMail-1.4.0/iRedMail.tips * * And it's sent to your mail account postmaster@example.com. * ********************* WARNING ************************************** * * Please reboot your system to enable all mail services. * ********************************************************************
After all, the required packages are installed and configured, reboot your server:
reboot
Step 4. Accessing iRedmail Web Interface.
Once successfully installed, open your web browser and type the URL https://mail.idroot.us/iredadmin
to access iRedAdmin’s admin panel, where you can manage your domains and email accounts
Congratulations! You have successfully installed iRedmail. Thanks for using this tutorial for installing the iRedmail free and open-source mail server on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official iRedmail website.