iRedMail 0.7.0: Full-Featured Mail Server With OpenLDAP/Postfix/Dovecot/Amavisd/ClamAV/SpamAssassin/iRedAdmin On FreeBSD 7.x 8.x
Submitted by eddiechen (Contact Author) (Forums) on Wed, 2010-02-17 16:56. :: Anti-Spam/Virus | Email | Postfix | FreeBSD
iRedMail 0.7.0: Full-Featured Mail Server With OpenLDAP/Postfix/Dovecot/Amavisd/ClamAV/SpamAssassin/RoundCube/iRedAdmin On FreeBSD 7.x 8.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. Since version 0.6, it supports FreeBSD 7.2 and 8.0 (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; it uses FreeBSD 8.2, but the steps for 7.x are the same.
iRedmail provides RoundCube as a webmail program, which supports the MySQL and OpenLDAP backends and can change the passwords and vacation settings.
The iRedMail project was published two years ago (2007-11-01).
All the packages come from ports except iRedAdmin.
It is strongly recommended to install a minimal FreeBSD system (no additional packages are required), and then deploy mail service via iRedMail solution.
To install such a system you will need the following:
2 Preliminary NoteIn this tutorial we use:
3 Setting hostname
No matter if your server is external or internal, it is strongly recommended that you set up a fully qualified domain name (FQDN) hostname.
In FreeBSD, hostname is set in /etc/rc.conf:
Map this hostname to 127.0.0.1 in /etc/hosts:
127.0.0.1 mail.example.com mail localhost localhost.localdomain
Verify the FQDN hostname:
# hostname -f
4 Update ports tree via portsnap
# portsnap fetch
5 Install packages required by iRedMail
# pkg_add -r bash-static
# pkg_add -r wget
6 Start to install iRedMailDownload the new version of iredmail:
# wget http://iredmail.googlecode.com/files/iRedMail-0.7.0.tar.bz2
Start the iRedMail installer:
# cd iRedMail-0.7.0
Choose the directory that will be used to store users' mailboxes.
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:
Set password for LDAP server admin: cn=Manager,dc=example,dc=com
Set the MySQL root password:
Add your first virtual domain, e.g.:
Set password for the virtual domain admin: firstname.lastname@example.org, you can log into iRedadmin and Awstats with this account.
Set password for the first normal user email@example.com for the first virtual domain:
Select optional components:
Select the default language for your webmail application:
The configuration is now finished, we can now start the installation:
During the download of the software, you might see an error like this:
=> rarbsd-3.9.0.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
# wget http://ftp2.br.freebsd.org/distfiles/rarbsd-3.9.0.tar.gz
Then run the iRedMail installer again.
# bash iRedMail.sh
< INFO > Checking necessary command/package: dialog/dialog ...
Finish the installation:
< INFO > Installing php Net_LDAP2 ...
Start services manually without reboot: