Search The Hostwinds Guides Knowledge Base

How to Install iRedMail on a VPS (CentOS 7)

Share This Article [TheChamp-Sharing]

iRedMail offers a secure, total solution for a standalone mail server. You can create unlimited email domains, users, and admins in the iRedMail web admin panel. The installation is recommended on a clean server installation, and can be completed with a script, followed by some configurations after installation. If you decide to install iRedMail on an existing VPS, please be sure to take a snapshot backup before proceeding with this guide.

The following components will be installed during the installation of iRedMail: 

  • Postfix
  • Dovecot
  • Nginx
  • OpenLDAP or ldapd(8) (optional)
  • MySQL, MariaDB, or PostgreSQL
  • mlmmj
  • Amavisd-new
  • SpamAssassin
  • ClamAV
  • Roundcube webmail
  • SOGo Groupware
  • Fail2ban
  • iRedAPD

Be sure to update your VPS before you begin.
You will need to connect to your Hostwinds server through SSH

Step 1: Set Hostname to Your Fully Qualified Domain Name

$ hostnamectl set-hostname

Next, verify in your hosts file that your IP is associated with your hostname:

$ sudo vi /etc/hosts

Add the following line to the bottom of the file using your information:


Then reboot the server. Verify this change following the reboot:

$ hostname -f

Step 2: Disable SELinux (Required to use iRedMail)

$ vi /etc/selinux/config

Edit this file so that SELINUX is set to SELINUX=disabled or SELINUX=permissive. Setting SELinux to permissive means SELinux policy will not be enforced, but AVC messages will be logged for further troubleshooting. 

Immediately enforce the policy to avoid a reboot:

$ setenforce 0

Step 3: Install iRedMail

$ cd /root

Download the latest stable release of iRedMail. At this time, the latest stable release is version 1.1. Verify version 1.1 is the latest version here. If version 1.1 is the latest version, run:

$ wget

If there is a later stable release, right-click and copy the link address of the latest stable release, then download using wget as seen above.  

Next, uncompress the TAR file. x.y.z should be replaced by the version number. In the case above, it would be iRedMail-1.1.tar.gz:

tar zxf iRedMail-x.y.z.tar.gz

Next, start the installer inside of the uncompressed directory:

$ cd /root/iRedMail-x.y.z

$ bash

You will then be asked a series of questions to configure iRedMail on your server and set up your mail domain. You will be able to review and confirm all selected options before the installation begins.

Related Articles