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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Submitted by eddiechen (Contact Author) (Forums) on Wed, 2009-06-03 17:12. :: Anti-Spam/Virus | Debian | Email

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

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

 

3 Install The Latest Lenny Updates

Update /etc/apt/sources.list, use default stable version. e.g.

# vi /etc/apt/sources.list

deb http://mirrors.163.com/debian lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free

# apt-get update

 

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.5.1.tar.bz2
# tar jxvf iRedMail-0.5.1.tar.bz2

Get the necessary packages. It will create a local apt repository in the current directory.

# cd iRedMail-0.5.1/pkgs/
# bash get_all.sh

Make sure dovecot-common-1.1.x is listed in the below command:

# apt-get update
# apt-cache show dovecot-common

Start the iRedMail installer:

# cd ..
# 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.


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Happy Bruno (not registered) on Thu, 2009-10-29 10:07.

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 

Submitted by szabi (not registered) on Sun, 2009-06-07 12:20.

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

Submitted by Zhang Huangbin (not registered) on Mon, 2009-06-08 05:32.
You can access: https://your_server/awstats/awstats.pl and https://your_server/awstats/awstats.pl?config=mail
Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions
Join the discussion.
www.seamlessenterprise.com

IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com

Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com

Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com