iRedMail:Full-Featured Mail Server With LDAP, Postfix, RoundCube, Dovecot, ClamAV, SpamAssassin, Amavisd, DKIM SPF On Ubuntu 8.04

Last edited 03/31/2011 

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, 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.

Now iRedmail provides two webmail programs, RoundCube and SquirrelMail, and both support MySQL and OpenLDAP and can change the password.

The installation steps on Ubuntu 9.04 are the same as on Ubuntu 8.04. The only difference is the sources list setting. Ubuntu 8.04 needs an extra sources list. For Ubuntu 9.04 (Jaunty), all binary packages we need can be installed from the official apt repository.


1 Requirements

It is strongly recommended to install a minimal Ubuntu system, and then deploy the mail service via the iRedMail solution. e.g.:

To install such a system you will need the following:


2 Preliminary Note

In this tutorial we use:

  • Hostname
  • IP address
  • LDAP suffix (root dn) dc=example,dc=com
  • The first virtual domain:


4 Setting hostname

In Ubuntu (Hardy, 8.04 LTS), 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 The iRedMail Installation

Switch to root user, we must execute the further commands 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:

Specify in which directory all emails should be stored.

iRedMail supports both OpenLDAP and MySQL as backends to store virtual domains and users. OpenLDAP is recommended.

LDAP suffix, normally it's your domain name, such as: dc=example,dc=com
iRedMail will put all virtual domains/users in 'o=domains,dc=example,dc=com', it's called 'LDAP base dn': o=domains,dc=example,dc=com

Set a password for the LDAP server admin. Admin account is defined in /etc/ldap/slapd.conf, normaily it's: cn=Manager,dc=example,dc=com

Share this page:

0 Comment(s)

Add comment


From: eddiechen