iRedMail: Mail Server With LDAP, Postfix, RoundCube, Dovecot, ClamAV, SpamAssassin, Amavisd On Debian (Lenny) 5.0.1

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 iRedMail 0.5, it supports Debian 5.0.1 (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 OpenLDAP as the backend.

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

 

1 Requirements

It is strongly recommended that you use the 'netinst' version to install a minimal Debian system, and then deploy mail service via 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 Debian (Lenny), 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 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 iRedMail Installation

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

All emails should be stored in this directory:

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. The admin account is defined in /etc/ldap/slapd.conf, normaily it's: cn=Manager,dc=example,dc=com.

Share this page:

11 Comment(s)

Add comment

Comments

From: szabi at: 2009-06-07 11:20:33

hello

i create a server with this help: it's ok but the awtstats do not want to enter

the user is postmaster@...  no?

the error is:

Forbidden

You don't have permission to access /awstats/ on this server.

someone help?

tnx

bye

From: Zhang Huangbin at: 2009-06-08 04:32:45

You can access: https://your_server/awstats/awstats.pl and https://your_server/awstats/awstats.pl?config=mail

From: Happy Bruno at: 2009-10-29 09:07:44

Erstmal danke für die super Arbeit ;)

Mir ist allerdings noch aufgefallen das das Paket bzip2 benötigt wird:

# apt-get install bzip2

Warum?, siehe:
# wget http://iredmail.googlecode.com/files/iRedMail-0.5.0-rc1.tar.bz2
# tar jxvf iRedMail-0.5.0-rc1.tar.bz2

ps. bzip2 ist bei der minimal Installation von Debian nicht enthalten. 

Gruß

Happy Bruno 

From: Marcel at: 2011-01-28 08:22:34

Heho wollte nur noch schnell sagen wenn du die datei tar enpackst dann brauchst du kein bzip ;-)

das tar macht das automatisch mit!

 

lg marcel

From: at: 2009-12-17 15:32:47

I have installed IredMail but i am missing: qshape

Is it not a part of the iRedmail package?

thanks

From: dme77 at: 2009-06-09 14:31:40

Why not just install Citadel?  It does all of that stuff out-of-the-box, and it's pre-integrated for you so you don't have to go through all of those steps to put it together.

From: Anonymous at: 2009-06-25 05:46:21

I've just installed Citadel 1.5 however though it's a very good solution it's just not as good as postfix and clamav and spamassassin. Truth is people shouldn't be lazy instead they should design a system they want.

From: jjmoreno23 at: 2009-10-14 14:25:55

I'm consider myself newby, but with this guide i could make my server works very quickly.

Thanks

From: Besworks at: 2009-11-07 02:08:05

Installing iRedMail was a breeze compared to the last mail server I built using the QmailRocks guide. My only complaint with the guide is with the footnote regarding "Important things to know after installation". It should be more clear about the line "User password and related sensitive information". My first run through I wanted to try out LDAP but I was unable to log in to the php LDAP admin. I tried to figure it out but, being pressed for time, I ended up reinstalling using the MySQL back end that I am more familiar with so I could move forward with my task.

Overall I'm impressed though. iRedMail gets an A+ from me. Though I do suggest you upgrade to the latest release of RoundCube after installation. Just a minor tweak is needed to get it working fully. http://www.iredmail.org/forum/topic310-upgrade-to-roundcube-03-in-iredos-050.html

From: Anonymous at: 2010-10-22 09:25:50

Package mysql-server-5.0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  mysql-server-core-5.1 mysql-server-5.1 mysql-cluster-server-5.1
E: Package mysql-server-5.0 has no installation candidate
< ERROR > Installation failed, please check the terminal output.

From: Manuel Pina at: 2010-07-14 22:25:06

This was a complete failure for me, installation went great, yet i cant send mail neither recieve, postfix rejects everything and when i try to send with roundcup and can't send either aparently because postfix is rejecting unknown recipients maybe is something with local_recipient_maps parameter in postfix conf but i have no idea...