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 mail.example.com
  • IP address 192.168.1.10
  • LDAP suffix (root dn) dc=example,dc=com
  • The first virtual domain: example.com

 


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 '127.0.0.1' (Warning: List the FQDN hostname as the first item.)

# vi /etc/hosts

#127.0.0.1       localhost
#127.0.1.1      mail.example.com        mail
127.0.0.1   mail.example.com mail localhost localhost.localdomain

# vi /etc/hostname

mail

Verify the FQDN hostname:

# hostname --fqdn

mail.example.com

 


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 http://iredmail.googlecode.com/files/iRedMail-0.7.0.tar.bz2
# tar jxvf iRedMail-0.7.0.tar.bz2


Start the iRedMail installer:

# cd iRedMail-0.7.0
# bash iRedMail.sh

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:

4 Comment(s)

Add comment

Comments

From: allan at: 2009-11-19 16:43:06

Hi,

 Just want to say first that this instructions are very detailed and very useful. I followed every step and was able to make my server up and running in no time. thanks for the contributors and administrators of this site.

 My mail server is already up and running but just want to know how I could forward an email to another outside email address. Say, I have a local email address of allan@test.com and I wan't to forward it to allan@gmail.com

Could anyone help me on this small issue.

 Thanks in advance.

Allan

From: zygert at: 2010-09-02 09:14:49

You have to in phpLDAP manager add attr. called "mailForwardingAddress" in allan@test.com configuration and set there allan@gmail.com

Save and test ;)

From: Bogdan at: 2009-10-12 11:42:49

before downloading the iredmail archive, you should install bzip2.

A clean debian installation does not include this package.

apt-get install bzip2

From: Rashid Iqbal at: 2010-07-08 18:01:00

Hi all,

I have win2k3 and centos installed in vmware. I joined the centos to win2k3 successfully and after that I install the iRedMail through root logon. ok successfully install the iRedmail.

I have on live static IP and the ptr entry named webmail.xyz.com.

After installing the iRedMail. I create on mail box named abc@xyz.com and successfully configure the mail box in outlook express[through IMPAP and POP3] in my win2k3 virtual machine. succesfully sending/receiving emails internally now I want to send the email to my hotmail account.

Secondly I want to update the antivirus database.

Kindly help me to solve this issue.

 

Regards,

 

Rashid Iqbal