Setup Full Featured Mail Server with iRedMail on CentOS 8

iRedMail is a free, open source and fully functional mail server solution for the Linux operating system. It allows you to host your own mail server for free. It has a user-friendly web interface that allows you to create an unlimited number of mailboxes and mail domains.

iRedmail uses secure connection protocols by default, POP3/IMAP/SMTP over TLS, webmail with HTTPS. It uses Postfix as MTA, Dovecot as MDA, SpamAssassin for spam checking and Amavis & Clamav for mail virus checking.

In this tutorial we explain how to install a fully functional mail server with iRedMail on CentOS 8.

Prerequisites

  • A server running CentOS 8.
  • A valid domain is pointed with your server.
  • A root password is configured on your server.

Getting Started

Before starting, it is recommended to disable the SELinux in your system. You can disable it by editing the file /etc/sysconfig/selinux.

nano /etc/sysconfig/selinux

Change the following line:

SELINUX=disabled

Save and close the file when you are finished.

Next, you will need to setup a fully qualified domain name for iRedMail. You can set up it by editing /etc/hosts file:

nano /etc/hosts

Add the following line:

your-server-ip ired.linuxbuz.com ired

Save and close the file when you are finished.

Next, install the EPEL repository and enable the PowerTools repo with the following command:

dnf install epel-release -y
dnf config-manager --set-enabled PowerTools

Next, update the system packages with the following command:

dnf update -y

Once all the packages are updated, restart your system to apply the changes.

Download iRedMail Installation Script

First, download the latest version of iRedMail installation script from its official download page:

wget https://github.com/iredmail/iRedMail/releases/download/1.2.1/iRedMail-1.2.1.tar.gz

Once the download is completed, extract the downloaded file with the following command:

tar -xvzf iRedMail-1.2.1.tar.gz

Next, change the directory to the extracted directory and give execution permission with the following command:

cd iRedMail-1.2.1
chmod +x iRedMail.sh

Install iRedMail

Now, run the following script to install the iRedMail:

./iRedMail.sh

This script will install all required dependencies in your system. Once all the dependencies are installed, you should see the iRedMail setup wizard in the following screen:

Select yes and hit Enter to continue. You will be asked to specify the directory to store user mailboxes as shown below:

Specify your desired directory and hit Enter to continue. You will be asked to choose a web server as shown below:

Select Nginx and hit Enter to continue. You will be asked to select the database backend used to store mail accounts as shown below:

Select MariaDB and hit Enter to continue. You will be asked to specify a password for MySQL root user as shown below:

Type your secure password and hit Enter to continue. You will be asked to specify your mail domain as shown below:

Type your domain name and hit Enter to continue. You will be asked to specify a password for the mail domain administrator as shown below:

Type your secure password and hit Enter to continue. You will be asked to select more application you want to install with iRedMail as shown below:

Select your desired application and hit Enter to continue. You should see all setting in the following output:

*************************************************************************
***************************** WARNING ***********************************
*************************************************************************
*                                                                       *
* Below file contains sensitive infomation (username/password), please  *
* do remember to *MOVE* it to a safe place after installation.          *
*                                                                       *
*   * /root/iRedMail-1.2.1/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:               linuxbuz.com
* Mail domain admin:                    [email protected]
* Additional components:                Roundcubemail netdata iRedAdmin Fail2ban

< Question > Continue? [y|N]y

Type y and hit Enter to start the installation. Once the iRedMail installed successfully, you should see the following output:

* URLs of installed web applications:
*
* - Roundcube webmail: https://ired.linuxbuz.com/mail/
* - netdata (monitor): https://ired.linuxbuz.com/netdata/
*
* - Web admin panel (iRedAdmin): https://ired.linuxbuz.com/iredadmin/
*
* You can login to above links with below credential:
*
* - Username: [email protected]
* - Password: admin
*
*
********************************************************************
* Congratulations, mail server setup completed successfully. Please
* read below file for more information:
*
*   - /root/iRedMail-1.2.1/iRedMail.tips
*
* And it's sent to your mail account [email protected].
*
********************* WARNING **************************************
*
* Please reboot your system to enable all mail services.
*
********************************************************************

At this point, your iRedMail server is installed in your system. Now, restart your system to enable all mail services.

Access IRedMail

To access the iRedMail administrative panel, type the URL https://ired.linuxbuz.com/iredadmin/ in your web browser. You should see the login page as shown below:

Provide your administrative username, password and click on the Login button. You should see the iRedMail admin dashboard in the following screen:

To access the iRedMail webmail, type the URL https://ired.linuxbuz.com/mail/ in your web browser. You should see the Roundcube webmail login page:

Provide your username, password and click on the LOGIN button. You should see the Roundcube dashboard in the following page:

To access the iRedMail netdata monitoring application, type the URL https://ired.linuxbuz.com/netdata/ in your web browser. You should see the Netdata login page:

Provide your username, password and click on the Sign in button. You should see the Netdata dashboard in the following page:

Conclusion

Congratulations! you have successfully installed and configure iRedMail server on CentOS 8. You can explore the iRedMail and start creating new user accounts and manage them. Feel free to ask me if you have any questions.

Share this page:

0 Comment(s)