*** In addition an instructional video on Installing iRedMail 0.9.7 on YouTube  https://youtu.be/CTvohpEoyX0 ***

Preparing CentOS

First install nano and bzip2.

yum install nano bzip2

Then disable selinux.

nano /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are pr$
# mls - Multi Level Security protection.

Remove Postfix.

yum remove postfix

Make sure your hostname is a FQDN.

nano /etc/hostname


Lastly make the FQDN for line in the hosts file.

nano /etc/hosts mail.bales.lan mail
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

Then reboot.

Download the latest release of iRedMail

  • Visit Download page to get the latest stable release of iRedMail.
  • Upload iRedMail to your mail server via ftp or scp or whatever method you can use, login to the server to install iRedMail.
  • I download it to my Mint to the Desktop and I uploaded it to /root/iRedMail-0.9.7.tar.bz2  by using scp.
    scp jeff@ /root/iRedMail-0.9.7.tar.bz2
  • Uncompress iRedMail tarball:
# cd /root/
# tar xjf iRedMail-0.9.7.tar.bz2

Installing iRedMail

Go to the iRedMail-0.9.6 folder and do a bash for iRedMail.sh.  It will ask you several question in process.

# cd /root/iRedMail-0.9.7/
# bash iRedMail.sh

Note to Chinese Users: The domain name iredmail.org has been blocked in mainland China for years (since Jun 04, 2011), please run command below to finish the installation:

IREDMAIL_MIRROR='' bash iRedMail.sh

Additional variables are:

EPEL repo: IREDMAIL_EPEL_MIRROR='http://mirrors.aliyun.com/epel'

A welcome message.  Click on Yes.

Welcome Message
Welcome Message

A directory to store users mail.  Take the default.

Directory for user mail
Directory for users mail


Preferred web server.  It’s default to Nginx but I changed mine to Apache.

Web server
Web server


Preferred backend to store mail accounts.  It defaulted to OpenLDAP but I changed mine to MariaDB.

Backend database to store email
Backend database to store email

Specify a password for MariaDB.

Setting a password for MariaDB
Setting a password for MariaDB

Specify it’s your mail domain. I made mine ‘bales.lan’.

Entering bales.lan for my first email domain
Entering bales.lan for my first email domain

Specify the mail domain administrator password.

Mail domain administrator password
Mail domain administrator password

Installing option modules.  Be default included Roundcubemail, Awstats, iRedAdmin and Fail2ban.  I also including SOGo.

Installing option modules
Installing option modules


Then ask you reviews your setting and to Continue.  By default it says N; click on Y if you are ready.

Are you ready?
Are you ready?

It takes about 10 minutes to install on my computer and then ask you several question and I accepting the default.

Accepting the default on several questions.
Accepting the default on several questions.

The last screen; it tells you main email of the postmaster@bales.lan, it’s password and to reboot.  Make sure the password is correct or write it down, and then reboot.

The final screen and then reboot
The final screen and then reboot

Configuring the emails and using iRedMail

Go to either the https://ip-of-the-mail-server/iredadmin or https://mailservername/iredadmin, and place the main domain username and the password.

The iredadmin website
The iredadmin website

Add a new email by clicking on the Add button on the right and selecting on User.  Put minimal a new mail address and the password, and then click on Add on the bottom.  And then a little confusing after you click on Add.  The username is created even though it says “Save Changes” at the bottom.  You can also additional options and you can “Save Changes” those options.

Adding a user
Adding a user.


Checking the new email password by going the https://ip-address-of-the-server/mail for RoundCubeMail.

Checking my new email.
Checking my new email.

Backup and Restore

Backup and Restore are extremely important.  Check out this page for more information http://www.iredmail.org/docs/backup.restore.html