Sunday, September 9, 2012

Install iRedMail on Red Hat Enterprise Linux, CentOS, Scientific Linux

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. Otherwise it may override your existing files/configurations althought it will backup files before modifing, and it may be not working as expected.
To install iRedMail, you need:
  • A FRESH, working RHEL, CentOS, Scientific Linux system. Supported releases are listed on page Features of iRedMail.
  • At least 512MB of memory is required for production use.
Note: All third-party binary packages will be installed from below yum repositories, packages with '-ired' flag were packed by iRedMail project:
  • Dag Wieers:
  • EPEL (Extra Packages for Enterprise Linux):
  • ATrpms:
Enter command 'hostname -f' to view the current hostname:
$ hostname -f

On RHEL/CentOS/Scientific Linux, hostname is set in two files:
  • /etc/sysconfig/network: hostname setting
# Part of file: /etc/sysconfig/network
  • /etc/hosts: hostname <=> IP address mapping. Warning: List the FQDN hostname as first item.
# Part of file: /etc/hosts demo localhost localhost.localdomain

Verify the FQDN hostname. If it wasn't changed, please reboot server to make it work.
$ hostname -f
  • For CentOS or Scientific Linux, please enable CentOS/Scientific official yum repositories, and DISABLE all third-party yum repositories to avoid package conflict.
  • For Red Hat Enterprise Linux, please enable Red Hat Network to install packages, or create a local yum repository with DVD/CD ISO images.
  • Visit Download page to get the latest 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. We assume you uploaded it to directory /root/iRedMail-x.y.z.tar.bz2 (replace x.y.z by the actual version number).
  • Uncompress iRedMail tarball:
# cd /root/
# tar xjf iRedMail-x.y.z.tar.bz2
It's now ready to start iRedMail installer, it will ask you some simple questions, that's all steps to setup a full-featured mail server.
For Chinese users: Our domain name "" is blocked in China mainland since Jun 04, 2011, please replace all '' by its IP address "" (without quotes) in /root/iRedMail-x.y.z/pkgs/ BEFORE executing "".
# cd /root/iRedMail-x.y.z/
# bash

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. Please choose the one which you're familiar with. You can manage mail accounts with iRedAdmin, our web-based iRedMail admin panel.

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

4.2) Password of LDAP root dn.

5) Set password of MySQL root user. MySQL is used to store data of other applications, e.g. Roundcube webmail, Policyd, Amavisd-new. If you choose to store mail accounts in MySQL, you will see this dialog too.

6) Add your first mail domain name

 7) Set password of admin account of your first mail domain. Note:
  • This account is used only for system administration, not a mail user. That means you CANNOT login to webmail with this account.
  • You can login to iRedAdmin (web-based iRedMail admin panel) with this account for mail accont management, login name is full email address.
  • Admin username is hard-coded, you can create new admins with iRedAdmin after installation completed.

8) Set password of first mail user of your first mail domain. Note:
  • This account is a normal mail user, that means you can login to webmail with this account, login name is full email address.
  • Username is hard-coded, you can create new mail users with iRedAdmin after installation completed.

9) Choose optional components

After answered these questions, iRedMail installer will ask your confirm to start installation. It will install and configure required packages automatically. Type 'y' or 'Y' (without quotes) and press 'Enter' to confirm.

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
  • Read file /root/iRedMail-x.y.z/ first, it contains:
    • URLs, usernames and passwords of web-based applications
    • Location of mail serve related software configuration files
    • Some other important and/or sensitive information

  • Setup DNS record for SPF
  • Setup DNS record for DKIM

After installation successfully completed, you can access web-based programs if you choose to install them. Replace 'your_server' below by your actual server name or IP address.
Component URL Accessible via HTTP Accessible via HTTPS
Webmail http://your_server/mail/ (or /webmail, /roundcube)
iRedAdmin (admin panel) httpS://your_server/iredadmin/
phpMyAdmin httpS://your_server/phpmyadmin/
phpLDAPadmin httpS://your_server/phpldapadmin/
Awstats httpS://your_server/awstats/ (or ?config=smtp)


  1. Incredible! This blog looks just like my old one!

    It's on a totally different subject but it has pretty much the same page layout and design. Excellent choice of colors!

    Review my page :: sky tv half price Nz

  2. Hello everyone, it's my first pay a quick visit at this web page, and post is truly fruitful designed for me, keep up posting such content.

    My page - daily offers

  3. I'm really impressed with your writing skills as well
    as with the layout on your weblog. Is this a paid theme or did you modify it yourself?
    Anyway keep up the nice quality writing, it is rare to see a nice blog like this one today.

    My weblog: army enterprise email ()

  4. Wow that was odd. I just wrote an very long comment
    but after I clicked submit my comment didn't appear. Grrrr...
    well I'm not writing all that over again. Anyhow, just wanted to say great blog!

    Also visit my web page :: enterprise email ()

  5. Hi, I do believe this is a great web site. I stumbledupon
    it ;) I may come back once again since I saved as a
    favorite it. Money and freedom is the greatest way to change, may you be rich and continue to help

    Also visit my blog - enterprise email []