Sunday, January 30, 2011

Setup Up a Full-Featured Mail Server

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 also 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 the MySQL backend.
Now iRedmail provides two webmail programs, RoundCube and SquirrelMail, and both support the MySQL and OpenLDAP backends and can change the password.
iRedOS is a customized CentOS 5.3 distribution, where e unnecessary packages were removed. It ships with the lastest version of iRedMail (iredmail0.50); it lets you install iredmail more quickly and smooth.

1 Requirements

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
  • The first virtual domain: example.com

3 Install The Base System

Boot from iredos. Press at the boot prompt:

Choose your language: 

 Select your keyboard layout:
I'm installing CentOS 5.3 on a fresh system, so I answer Yes to the question Would you like to initialize this drive, erasing ALL DATA?

Now we must select a partitioning scheme for our installation. For simplicity's sake I select Remove all partitions on selected drives and create default layout

Answer the following question (Are you sure you want to do this?) with Yes
 On to the network settings. The default setting here is to configure the network interfaces with DHCP, but we are installing a server, so static IP addresses are not a bad idea... Click on the Edit button at the top right.


 In the window that pops up uncheck Use dynamic IP configuration (DHCP) and Enable IPv6 support and give your network card a static IP address (in this tutorial I'm using the IP address 192.168.1.10 for demonstration purposes) and a suitable netmask (e.g. 255.255.255.0; )


 Set the hostname manually, e.g. mail.example.com, and enter a gateway (e.g. 192.168.1.1) and a DNS server (e.g. 4.2.2.1 ): 

 Choose your time zone, don't select System clock uses UTC:


Give root a password: 

The installation begins. This will take a few minutes: 

Now the CentOS installation has finished, start to install iredmail; if you selected No, the system would reboot and would not install iredmail. 

 Choose the directory that will be used to store users' mailboxes. 
 Choose the backend to store virtual domains and virtual users. Here we use MySQL. 
 Set the MySQL root password: 
 Set the password for the MySQL account vmailadmin:
 Set first virtual domain: example.com
 Set the admin user for the first virtual domain you set above. e.g. postmaster
 Set a password for the admin user you set above.
 Create the first normal user. e.g. www
 Create a password for the normal user you set above.
 Now you have the choice whether you want to enable SPF validation and DKIM signing/verification or not. 
 Select optional components, you can choose between RoundCube or SquirrelMail as webmail programs.
Awstat user account: postmaster@example.com, for more details read the file /root/iRedMail/iRedMail.tips.
  Select the default language for your webmail application: 
 Set a global admin user. It can manage all virtual domains and users in postfixadmin:
 Set a mail alias address for the root user:
 The installation is now finished, please reboot the machine:

4 Important Things You Should Know After Installation


5 Access Webmail And Other Web-Based Programs

After the 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
Note: Replace your_server with your server hostname or IP address.

No comments:

Post a Comment