Saturday, March 8, 2014

Linux Full Fledged Email Server (Ultimatum!)

This article has been written to outline the advantages and to be used as a step by step guide to install and use the Kolab mail server on Ubuntu.

Platform
  • Ubuntu 12.04 (LTS)
  • Kolab
  • OpenLDAP
  • Web Front-ends
The Advantages (Yep right at the start...!)

Admin Interface 

Well the admin interface is a rich, feature-packed and user friendly interface.The following can be managed in this interface.

  • Users & Groups (obviously!)
  • Roles (Well  this slightly different than groups)
  • Domains (Yes, you can have a multiple domains!)

User Interface Features

  • Webmail (runs on RoundCube)
  • Tasks/Notes and Calendar
  • Shared Folders

Installation Instructions

Install the base Ubuntu server (12.04 as of this writing)

This includes the usual Base installation steps along with configuring the network settings etc. Also make sure that the hosts file has the correct configuration. The host file should like the below.


127.0.0.1 localhost
127.0.1.1 <Hostname.domain.local> <Hostname>
www.xxx.yyy.zzz <Hostname.domain.local> <Hostname> 

www.xxx.yyy.zzz been the IP of the Kolab server. You can edit this file by typing the below.

sudo pico /etc/hosts 

Prepare the server for the Kolab installation.


sudo pico /etc/apt/sources.list.d/kolab.list

Once the file opens enter the following lines.


deb http://obs.kolabsys.com:82/Kolab:/3.2/Ubuntu_12.04/ ./
deb http://obs.kolabsys.com:82/Kolab:/3.2:/Updates/Ubuntu_12.04/ ./

Now we will obtain the necessary keys for these repositories. Execute the below in order to complete this.

sudo su
wget -qO - http://obs.kolabsys.com:82/Kolab:/3.2/Ubuntu_12.04/Release.key | apt-key add -
wget -qO - http://obs.kolabsys.com:82/Kolab:/3.2:/Updates/Ubuntu_12.04/Release.key | apt-key add -
exit
 

We need to ensure that the Kolab packages get preference over other repositories. 
Hence we need to do the following.
 

sudo pico /etc/apt/preferences.d/kolab
 
Once the file opens enter the below.
 
Package: *
Pin: origin obs.kolabsys.com
Pin-Priority: 501
 
Once the file is saved and closed run the below.
 

sudo apt-get update

This will sync the new Kolab repositories. 

This is when we can go for the kill....!

sudo apt-get install kolab

you will be prompted for the below credentials

New MySQL Root Password
Postfix Configuration (select "Internet Site" for the time been)
Postfix Configuration (enter the FQDN of your domain)

Once the lengthy installation is complete run the below command.

sudo setup-kolab

This process will prompt you for the below.

Administrator Password
Directory Manager Password
User and Group accounts under which the services should run under (select the default value)
Domain name space (select the default if it the correct FQDN of your domain)
Cyrus Administrator Password
Kolab Service Password
MySQL Server Setup (select Existing MySQL Server)
MySQL Root Password (this is the password which was supplied during the Kolab installation)
MySQL Kolab Password
MySQL Roundcube Password


Once this completes do the following.

cd to the home directory
touch setup_roundcube.patch
pico setup_roundcube.patch
 
Navigate to https://issues.kolab.org/attachment.cgi?id=626 and paste the contents to the file you just created.
 
Save and close the file.

sudo service kolab-server stop
sudo service kolab-saslauthd stop
mysql -uroot -p -e "DROP DATABASE roundcube"
cd /usr/share/pyshared/pykolab/setup 
sudo patch < ~/setup_roundcube.patch
sudo setup-kolab roundcube
sudo reboot 

Let's do our initial setup before we can start using the services on the server.

Navigate to http://<IP_of_the_server>/kolab-webadmin/
 
User Name - cn=Directory Manager
Password - Same password provided for Directory Manager Password

This is what you should see.


Voila! This is the admin panel! Finally....yes!!!

Click on Users

Fill in the Account Type (Kolab User)
Given Name
Surname
 

Click on the System tab
Give the new user a password
 

Click on the Configuration tab
Assign a quota if required 
 

Click on Submit

Our first user is born!

Let's take a look at the webmail interface now!

Navigate to http://<IP_of_the_server>/roundcubemail/ 
 
Log in with the newly created account from the previous step.
 
The user name would be the surname
 
 
 
Here is another useful link to manage the file sharing feature on the server
 
http://<IP_of_the_server>/chwala/ (log in as any of the created users)


No comments:

Post a Comment