Iredmail: Mail Server With Ldap, Postfix, Roundcube/Squirrelmail, Dovecot, Clamav, Spamassassin, Amavisd, Dkim, SPF On Debian (Lenny) 5.0.1
Iredmail: Mail Server With Ldap, Postfix, Roundcube/Squirrelmail, Dovecot, Clamav, Spamassassin, Amavisd, Dkim, SPF On Debian (Lenny) 5.0.1
1)
By eddiechen
Published: 2009-06-03 18:12
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.:
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
# vi /etc/apt/sources.list
# apt-get update
3 Setting hostname
In Debian (Lenny), hostname is set in these two files:
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
# hostname --fqdn
mail.example.com
We need to use wget for the download and dialog for the user interface of installation wizard.
Add mount option 'acl' in /etc/fstab which contains the /etc/ directory if it isn't there yet. Copy it as a new line, and comment out the old one, add acl
like below.
# vi /etc/fstab
Remount the mount point which contains the /etc/ directory, e.g. /:
# mount -o remount,rw,acl /
$ sudo su -
# wget http://iredmail.googlecode.com/files/iRedMail-0.5.0-rc1.tar.bz2
Get the necessary packages. It will create a local apt repository in the current directory.
# cd iRedMail-0.5.0-rc1/pkgs/
# bash get_all.sh
# apt-get update
# cd ..
# bash iRedMail.sh
Welcome page:
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.
Virtual domain administrator account for the first virtual domain. Default is 'postmaster':
Add the first normal user for our virtual domain. e.g.: www. The full email address will be [email protected].
Select optional components, you can choose RoundCube or SquirrelMail as webmail programs.
An Awstat user account has been integrated in LDAP, so you need to use the username: [email protected]. For details, read the file
iRedMail-x.y.z/iRedMail.tips.
After installation is complete, you can access web-based programs if you've chosen to install them:
Component URL Access via HTTP Access via HTTPS Comment
RoundCubeMail-0.2.1 http://your_server/mail/ (or /webmail, /roundcube) YES YES Recommand webmail
SquirrelMail-1.4.19 http://your_server/squirrelmail/ (or /squirrel) YES YES webmail
PostfixAdmin-2.2.1.1 https://your_server/postfixadmin/ No YES Only Mysql Backend
phpMyAdmin-2.11.9.5 https://your_server/phpmyadmin/ (or /mysql) NO YES
phpLDAPadmin-1.1.0.7 https://your_server/ldap/ (or /phpldapadmin) NO YES Only LDAP Backend
Awstats-6.9 https://your_server/awstats/awstats.pl (or /awstats.pl?config=mail) NO YES