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 be not working as expected.

To install iRedMail, you need:

  • A FRESH, working Ubuntu Linux. Supported releases are listed on page Features of iRedMail.
  • At least 1GB of memory is required for production use. if you have less memory, you have to disable spam/virus scanning by following our wiki tutorial. WARNING: It's strongly recommended to enable spam/virus scanning for production use, so please go get at least 1GB memory for your mail server.

Notes:

  • All binary packages will be installed from Ubuntu official apt repositories.
  • It's recommended to use the latest Ubuntu LTS (Long Term Support) release for production use.

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

Enter command 'hostname -f' to view the current hostname:

$ hostname -f
mx.example.com

On Ubuntu, hostname is set in two files:

  • /etc/hostname: hostname setting
# File: /etc/hostname
demo
  • /etc/hosts: hostname <=> IP address mapping. Warning: List the FQDN hostname as first item.
# Part of file: /etc/hosts
127.0.0.1   mx.example.com demo localhost localhost.localdomain

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

$ hostname -f
mx.example.com

Update apt repositories and install required packages

Run 'apt-get update' to update your apt repository info:

# sudo apt-get update

Install package 'bzip2' so that you can uncompress iRedMail installer.

# sudo apt-get install bzip2

Download the latest release of iRedMail

  • 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 "iredmail.org" is blocked in China mainland since Jun 04, 2011, please replace all 'iredmail.org' by its IP address "106.187.51.47" (without quotes) in /root/iRedMail-x.y.z/pkgs/get_all.sh BEFORE executing "iRedMail.sh". This is a Linode VPS hosted on Tokyo, Japan.
# cd /root/iRedMail-x.y.z/
# bash iRedMail.sh

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/iRedMail.tips 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
Webmail https://your_server/mail/
iRedAdmin (admin panel) httpS://your_server/iredadmin/
phpMyAdmin httpS://your_server/phpmyadmin/
phpLDAPadmin httpS://your_server/phpldapadmin/
Awstats httpS://your_server/awstats/awstats.pl?config=web (or ?config=smtp)

Please post all issues, feedbacks, feature requests, suggestions in our online support forum, it's more responsible than you expected: http://www.iredmail.org/forum/.