iRedMail: Full-Featured Mail Server With LDAP, Postfix, RoundCube, Dovecot, ClamAV, DKIM, SPF On CentOS 5.x

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 on CentOS 5.x and Debian (Lenny) 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 the OpenLDAP as the backend.

The mail server components: http://code.google.com/p/iredmail/wiki/Main_Components

The discussion forum: http://www.iredmail.org/forum/

Now the newest version of iredmail start to support Debian (Lenny) 5.0.1,you can check the  install guide http://code.google.com/p/iredmail/wiki/Installation_on_Debian


.

 

Preliminary Note

In this tutorial I use:

Hostname server1.example.com
LDAP suffix: dc=example,dc=com
OpenLDAP admin account: cn=manager,dc=exmple,dc=com
Mail domain: example.com
Mail delivery (mailboxes) path: /home/vmail/domains

These settings might differ for you, so you have to replace them where appropriate.

 

Requirements

Install CentOS 5.x, I suggest to use the minimum install, make sure you don't install Apache, PHP and MySQL. You can remove them with yum if they are installed.

Yum is working, because the installation needs to use CentOS source packages.

DNS MX record setting is no problem.

 

Installation

Download the iRedMail script:

wget http://iredmail.googlecode.com/files/iRedMail-0.7.1.tar.bz2
tar xjf iRedMail-0.7.1.tar.bz2


Run the script to install:

cd iRedMail-0.7.1
sh iRedMail.sh

Welcome page:

Mail delivery (mailboxes) path, all emails should be stored in this directory.

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

LDAP suffix, normally it's your domain name:

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

Set a password for the LDAP virtual domain admin's password. cn=vmailadmin,dc=example,dc=com is used to manage all virtual domains/users.

Add your first virtual domain:

Virtual domain administrator account for the first virtual domain. Default is 'postmaster'.

Share this page:

14 Comment(s)

Add comment

Comments

From: Anonymous at: 2009-04-17 05:47:44

you are right, by default,

https://ip/ldap

https://ip/phpmyadmin

you can check the detail

/etc/httpd/conf.d/ssl.conf

 

From: Scrummie01 at: 2009-04-15 14:50:00

This is fantastic.  I set it up on a CentOS VM with no problem.

I usually don't use CentOS though, I'm a Debian/Ubuntu guy.  This has inspired me into possible making something similiar for Ubuntu/Debian server.  I could use this as a guide to get started

http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.04

 This walkthrough by Falko gives you all the packages you need.  Since I'm not much of a programmer this is going to take some time, but if anyone is willing to help let me know. 

From: Scrummie02 at: 2009-04-15 14:53:01

This is fantastic, the setup went without a hitch on my vm installation of CentOS

 I'm going to use this a guide ans start something similiar for Ubuntu/Debian using this as a guide:

http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.04

Anyone want to help?  Let me know. 

 

From: Zhang Huangbin at: 2009-04-16 05:23:00

Hi, Scrummie02. I'm a member of iRedMail project, why not join us and make it work on Debian/Ubuntu? :) Yes, it's open source.

From: Zhang Huangbin at: 2009-04-16 08:29:53

No. do *NOT* change apache configuration files. Just use httpS:// to access them.

New forum is here: http://www.iredmail.org/forum/

From: Anonymous at: 2009-04-16 05:23:14

if you use mysql as backend. you can select the postfixadmin

use ldap as backend, use the phpldapadmin

for security reason, the iredmail by default setting, you can not access the tools.

cd /etc/httpd/conf.d/

you would find the  phpldapadmin.conf  or postfixadmin.conf

you can edit

#Alias /ldap "/var/www/phpldapadmin-1.1.0.5/"

remove the #

you can restart httpd

then you can use http://ip/ldap manage the user

 hope you enjoy it.

 

From: Anonymous at: 2009-04-16 05:34:07

yes it support smtp auth

check the feature list

http://code.google.com/p/iredmail/wiki/Feature

the manage tools ,

mysql backend is postfixadmin

ldap backend is phpldapadmin

for security resaon, you can not acccess by default

 cd /etc/httpd/conf.d/

 #Alias /ldap "/var/www/phpldapadmin-1.1.0.5/"

remove #

restart the httpd service

now you can use http://ip/ldap access

 

 

 

From: Zhang Huangbin at: 2009-04-16 05:41:58

Hi, Arie. iRedMail doesn't have its own admin tool yet (web-based admin console or command line), but it ships several programs you may need, take a look: http://code.google.com/p/iredmail/wiki/Main_Components


The python-powered admin console is under development, but i'm not familiar with web programming: http://code.google.com/p/iredmail/source/browse/trunk/iRedAdmin


And of course it support SMTP AUTH (via dovecot sasl). :)

From: Arie at: 2009-04-15 11:41:10

How to manage iredmail ? Is there any mail manager for this ? And does it support for SMTP-AUTH ? 

 regards,

 -ARZ-

 

 

 

From: Anonymous at: 2009-04-15 02:08:04

you want to receive email,you need to check you dns mx record and you must have static ip address.

you can try to send the email to gmail . I believe you would receive .


 


 

 

From: Anonymous at: 2009-04-14 13:49:31

The homepage is hosted on google code: http://code.google.com/p/iredmail/ And its another website is wrotten in Chinese, it will be re-write in English later. >> "it makes you worry about the safety of your data." What do you mean "the safety of your data"? It is open source, you can read the scripts yourself, why did you worry about this?

From: Anonymous at: 2009-04-13 13:01:56

This guide is good.
I cannot recieve mail though, but this is likely my fault... I have tried to set up an email server a few times and they never seem to be able to recieve mail.
I went to the iRedMail website and saw that there was no English there. This is a bit concerning to people who do not know the language and it makes you worry about the safety of your data.

I set this up in a virtual machine.

From: axolotl7 at: 2009-08-26 08:16:32

What a great project... I haven't had an "all-in-one" like this succeed so completely in ages.  Just a quick note, just in case people run into the same minor issue as I did.  CentOS 5.3, MySQL, SPF, DKIM...

When restarting, everything appeared to come up clean, but the server wouldn't send mail.  I was getting errors in /var/log/maillog like this...

 Aug 25 22:50:49 mail postfix/smtp[14558]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

Issue was that amavisd hadn't started up... it couldn't open the DKIM cert due to a permissions issue.  Changed /var/lib/dkim/[domain].pem permissions so user:group amavis:amavis could read, and everything's been going swimmingly.

Thanks, all!

From: Abhishek at: 2012-08-16 23:14:04

Do I need to buy an active and paid SSL certificate to make httpS work for me??