Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

iRedMail 0.7.0: Full-Featured Mail Server With LDAP Postfix RoundCube/SquirrelMail iRedAdmin On Ubuntu 9.04

  • iRedMail is a shell script that lets you quickly deploy a full-featured mail solution in less than 2 minutes. Since version 0.5, iRedMail supports Ubuntu 8.04 and 9.04 (it supports both i386 and x86_64). Its object is to make a Linux mail server installation and configuration simple and easy to use. iRedMail supports both OpenLDAP and MySQL as backends for storing virtual domains and users. This tutorial shows how to use the OpenLDAP backend.
  • iRedmail provides two webmail programs, RoundCube and SquirrelMail, and both support the MySQL and OpenLDAP backends and can change the password.
  • iRedMail-0.5.1 was published on 2009-11-01 and it is iRedMail’s birthday, it’s 2 years old.
  • You can use iRedAdmin to manage email accounts from a web browser.
  • Main components used in this solution:
  • Discussion forum:
  • iRedmail FAQ:
  • Project home page:
  • 1 Requirements
  • It is strongly recommended to install a minimal Ubuntu system, and then deploy mail service via iRedMail solution. E.g.:
  • To install such a system you will need the following:
  • the Ubuntu 9.04 server CD, available here: (i386) or (x86_64)
  • Internet connection.
  • 2 Preliminary Note
  • In this tutorial we use:
  • Hostname
  • IP address
  • LDAP suffix (root dn) dc=example,dc=com
  • The first virtual domain:
  • 3 Install The Latest Ubuntu Updates
  • Update /etc/apt/sources.list, use default stable version. Both main and universe repositories are required.
  • # vi /etc/apt/sources.list
deb jaunty main universe
deb jaunty-updates main universe

  • Run apt-get update to update apt repository info.
  • # apt-get update
  • 4 Setting hostname
  • In Ubuntu, the hostname is set in these two files:
  • * /etc/hostname: hostname setting
    * /etc/hosts: hostname <=> IP address mapping
  • Map this hostname to (Warning: List the FQDN hostname as the first item.)
  • # vi /etc/hosts
#       localhost
#        mail mail localhost localhost.localdomain

  • # vi /etc/hostname
  • Verify the FQDN hostname:
  • # hostname –fqdn
  • 5 Start iRedMail Installation
  • Switch to root user, we must execute all further command as the root user without sudo.
  • $ sudo su –
  • Download the new version of iredmail
  • # wget
    # tar jxvf iRedMail-0.7.0.tar.bz2
  • Start the iRedMail installer:
  • # cd iRedMail-0.7.0
    # bash
  • Welcome page:
  • iredmail_01
  • Choose the directory that will be used to store users’ mailboxes.
  • iredmail_02
  • iRedMail supports both OpenLDAP and MySQL as backends to store virtual domains and users. OpenLDAP is recommended.
  • iredmail_03
  • LDAP suffix, normally it’s your domain name, such as: dc=example,dc=com:
  • iredmail_04
  • Set password for LDAP server admin: cn=Manager,dc=example,dc=com
  • iredmail_05
  • Set the MySQL root password:
  • iredmail_06
  • Add your first virtual domain, e.g.:
  • iredmail_07
  • Set password for the virtual domain admin:, you can log into iRedadmin and Awstats with this account.
  • iredmail_08
  • Set password for the first normal user for the first virtual domain:
  • iredmail_09
  • Enable the SPF verify and DKIM vertify/sign features:
  • iredmail_10
  • Select optional components, you can choose between RoundCube or SquirrelMail as the webmail program.
    Awstat user account is integrated in LDAP, so you need to use the login, for further details read the file iRedMail-x.y.z/
    iRedAdmin – the official web-based admin panel for the ldap backend.
  • iredmail_11
  • Select the default language for your webmail application:
  • iredmail_12
  • Set a mail alias address for the root user:
  • iredmail_13
  • The configuration is now finished, we can now start the installation:
  • iredmail_14
  • When the installation is finished, reboot your system to enable mail services or start them manually without reboot.
  • iredmail_15
  • Start services manually without reboot:
  • # for i in sysklogd apache2 postfix mysql slapd postfix-policyd dovecot amavis clamav-daemon clamav-freshclam cron iptables; do /etc/init.d/${i} restart; done
  • 6 Test the mail system
  • 6.1 webmail RoundCube
  • Log into the RoundCube, use the first user
  • iredmail_16
  • The account has received two emails, read them carefully.
    Note: because is a root alias, it receives system emails.
  • iredmail_17
  • 6.2 iRedAdmin
  • Log into iRedAdmin:
  • iredmail_18
  • Dashboard:
  • iredmail_19
  • Mail Domains:
  • iredmail_24
  • Mail User:
  • iredmail_25
  • Mail Admin:
  • iredmail_26
  • Create new mail user:
  • iredmail_27
  • Select language:


  • 6.3 phpLDAPAdmin
  • Log into phpLDAPAdmin: cn=manager,dc=example,dc=com
  • iredmail_20
  • Manage the mail account:
  • iredmail_21
  • 6.4 Awstats
  • Log into Awstats:
  • iredmail_22
  • Check the statistics:
  • iredmail_23
  • 7 Important Things You Should Know After Installation
  • Read the file iRedMail-x.y.z/ first, example, it contains:
    • User password and related sensitive information.
    • Location of mail server related software configuration files and other important information.
  • Setup DNS record for SPF
  • Setup DNS record for DKIM
  • Enable signing disclaimer on outgoing mails
  • 8 Access webmail and other web-based programs
  • After the installation is complete, you can access web-based programs if you’ve chosen to install them:
Component URL Access via HTTP Access via HTTPS Comment
Roundcube 0.21 http://your_server/mail/ (or /webmail, /roundcube) YES YES Recommand webmail
SquirrelMail http://your_server/squirrelmail/ (or /squirrel) YES YES webmail
iRedAdmin https://your_server/iredadmin NO YES Only Ldap Backend
phpMyAdmin 2.11.9 https://your_server/phpmyadmin/ (or /mysql) NO YES
phpLDAPAdmin 1.17 https://your_server/ldap/ (or /phpldapadmin) NO YES Only LDAP Backend
Awstats https://your_server/awstats/ NO YES
  • Note: Replace your_server with your server hostname or IP address.
    iRedAdmin, phpMyAdmin, phpLDAPAdmin and Awstats use https by default.