- Advertisement -
Fastmail Ad

System Requirements

IMPORTANT WARNING: iRedMail is designed to be deployed on a FRESH server system, which means your server does NOT have mail related components installed, e.g. MySQL, OpenLDAP, Postfix, Dovecot, Amavisd, etc. iRedMail will install and configure them for you automatically. Otherwise it may override your existing files/configurations althought it will backup files before modifing, and it may not be working as expected.

To install iRedMail on RHEL or CentOS Linux, you need:

Download iRedMail:

[php]wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.4.tar.bz2[/php]

Set a fully qualified domain name (FQDN) hostname on your server

No matter your server is a testing machine or production server, it’s strongly recommended to set a fully qualified domain name (FQDN) hostname.

Enter command hostname -f to view the current hostname:

- Advertisement -
pCloud Ad

[php]$ hostname -f

On RHEL/CentOS/Scientific Linux, hostname is set in two files:

For RHEL/CentOS/Scientific Linux 6, hostname is defined in /etc/sysconfig/network:


For RHEL/CentOS/Scientific Linux 7, hostname is defined in /etc/hostname.


/etc/hosts: hostname <=> IP address mapping. Warning: List the FQDN hostname as first item.

[php] mx.example.com mx localhost localhost.localdomain[/php]

Verify the FQDN hostname. If it wasn’t changed, please reboot server to make it work.

[php]$ hostname -f

Disable SELinux

iRedMail doesn’t work with SELinux, so please disable it by setting below value in its config file /etc/selinux/config. After server reboot, SELinux will be completely disabled.

[php]# vim /etc/selinux/config


If you prefer to let SELinux prints warnings instead of enforcing, you can set below value instead:


Disable it immediately without rebooting your server.

[php]# setenforce 0[/php]

Install iRedMail

Upload iRedMail to your mail server via ftp or scp or whatever method you can use, login to the server to install iRedMail. We assume you uploaded it to /root/iRedMail-x.y.z.tar.bz2 (replace x.y.z by the real version number).

Uncompress iRedMail tarball:

[php]# cd /root/
# tar xjf iRedMail-x.y.z.tar.bz2[/php]

Start iRedMail installer

It’s now ready to start iRedMail installer, it will ask you several simple questions, that’s all required to setup a full-featured mail server.

[php]# cd /root/iRedMail-x.y.z/
# bash iRedMail.sh[/php]

Screenshots of installation:

1. Welcome and thanks for your use


2. Specify location to store all mailboxes. Default is /var/vmail/.


3. Choose backend used to store mail accounts. You can manage mail accounts with iRedAdmin, our web-based iRedMail admin panel.

IMPORTANT NOTE: There’s no big difference between available backends, so it’s strongly recommended to choose the one you’re familiar with for easier management and maintenance after installation.


4. If you choose to store mail accounts in OpenLDAP, iRedMail installer will ask you two questions about OpenLDAP.
LDAP suffix.


5. Password of LDAP root dn.


6. If you choose to store mail accounts in MySQL/MariaDB/PostgreSQL, iRedMail installer will generate a random, strong password for you. You can find it in file iRedMail.tips.

Add your first mail domain name


7. Set password of admin account of your first mail domain.

Note: This account is an admin account and a mail user. That means you can login to webmail and admin panel (iRedAdmin) with this account, login username is full email address.


8. Choose optional components.


After answered above questions, iRedMail installer will ask your confirm to start installation. It will install and configure required packages automatically. Type y or Y and press Enter to start.

[php]Configuration completed.

**************************** WARNING ***********************************
* *
* Please do remember to *REMOVE* configuration file after installation *
* completed successfully. *
* *
* * /root/iRedMail-x.y.z/config
* *
<<< iRedMail >>> Continue? [Y|n] # <- Type 'Y' or 'y' here, and press 'Enter' to continue[/php]

- Advertisement -
Odysee Ad