Jump to content

Zimbra for DR-Ahmedabad Punjab's IFMS-IWDMS Project

From TetraWiki
Revision as of 01:29, 22 January 2013 by Biswajit (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Zimbra for DR-Ahmedabad Punjab's IFMS-IWDMS Project[edit]

Navdeep Mathur
Tetra Information Services


Table of Contents[edit]

Introduction[edit]

The client wanted a Mirror copy of Mail server setup of Chandigarh DC with cluster setup. To ensure this, here only one relay server with one mailbox server without cluster.


Prerequisites[edit]

1) Local DNS for DR environment must be setup. All Hostnames of mail servers are same as DC Chandigarh like (pbifmsemail1.pbifmsiwdms.pjb)

2) Setup ssh logins via auth-keys between DC and DR this is must.

3) Knowledge of installing Zimbra.

Servers[edit]

Two servers have been set up as follows:


Relay:

pbifmsemailrly1.pbifmsiwdms.pjb – 172.22.30.54


Mailbox:

pbifmsemail1.pbifmsiwdms.pjb – 172.22.30.54


Mailbox server is connected to a SAN, and mailboxes are stored here. SAN to SAN syncing is done by Symantec Veritas Cluster.


Architecture Diagram[edit]

Mbox (pbifmsemail1)
Relay (pbifmsemailrly1)
SAN (/dev/mapper/zimvol-zimlog)

Installation of the Zimbra[edit]

We first set up the mailbox server, and then the relay server, because the relay needs the address of the mailbox server.

We specify the external LDAP server only after the entire setup is finished.


MailBox Server Hostname: pbifmsemail1.pbifmsiwdms.pjb

Relay Server Hostname: pbifmsemailrly1.pbifmsiwdms.pjb

Hostname of mail server: mail.punjabgovt.gov.in

Mounted HDD: /dev/mapper/zimvol-zimlog


We also need the license. Ensure the license is available prior to installation. In our case, it was stored in "/root".


Preparing the SAN:[edit]

A logical volume was created, "/dev/mapper/zimvol-zimlog". This volume would contain all Zimbra sub-directories.


Installing and Configuring Zimbra Services[edit]

Log in as root to the Zimbra mailbox server and cd to the directory where the

ZCS software file is saved and unpack the ZCS tar file.


1. Unpack the ZCS .tgz file

tar xzvf <zcsname.tgz>


3. Change directories to the unpacked file and type the following command to

begin the installation of zimbra


./install.sh 


4. The node requires Zimbra and Postfix users and groups. Type the Zimbra group ID and Zimbra user ID to be used. The same user and group IDs must be used on both DC Chandigarh and DR Ahmedabad, So need to correct uid and gid of zimbra


5. Mount the SAN volume.

mount /dev/mapper/zimvol-zimlog \
/opt/zimbra-cluster/mountpoints/mail.punjabgovt.gov.in


As per DC Setup “We cant change setup because of mirror copy”

Now you rerun install.sh cluster active to install the ZCS software.


DO NOT INSTALL THE 'zimbra-mta' PACKAGE. We are creating another MTA server.

Installing the ZCS[edit]

1. Type:

./install.sh -l /root/ZCSLicense.xml


Note: Adding -l /root/ZCSLicense.xml to the command line, installs the

Zimbra License.


2. Select the Zimbra packages, DO NOT INSTALL 'zimbra-mta'. Install 'zimbra-ldap' as expected. Make no changes to the LDAP server settings for now.


3. When the DNS error to resolve MX displays, enter Yes to change the domain name. In our case, it is "punjabgovt.gov.in".

Choose the hostname as "mail.punjabgovt.gov.in". Ensure that the node's hostnames are not visible anywhere.


4. Review the Common Configuration menu to verify that the host name and LDAP master host name have been changed to the “mail.punjabgovt.gov.in”.

When Configuration Complete - press return to exit displays, the zcs installation is completed


5. Now rsync the DC Zimbra mailbox server /opt/zimbra-cluster/mountpoints/mail.punjabgovt.gov.in to DR mailbox /opt/zimbra-cluster/mountpoints/mail.punjabgovt.gov.in.


Note : Before start the syncing of zimbra need to stop all the services of zimbra at DC and DR site.


MTA installation[edit]

Extract and start installation with './install'. Install only the 'zimbra-mta' packages (zimbra-snmp if necessary). DO NOT INSTALL ANYTHING ELSE.

Proceed with installation as usual, ensuring the following settings:


MTA Auth host - mail.punjabgovt.gov.in

Ldap server - mail.punjabgovt.gov.in

Ldap server's root password, bind password for postfix LDAP user, and bind passwor for amavis LDAP user - to be obtained from the mailbox server.

Run the following commands as the zimbra user on the mailbox server (the active node) to get these passwords (They are usually identical):

$ zmlocalconfig -s ldap_root_password
$ zmlocalconfig -s ldap_amavis_password
$ zmlocalconfig -s ldap_postfix_password


Run this as the zimbra user on all servers after installation:

$ zmupdateauthkeys

Now rsync the DC Zimbrarelay server /opt/zimbra to DR relay /opt/zimbra


Note : Before start the syncing of zimbra need to stop all the services of zimbra at DC and DR site.


Adding Users[edit]

Because we are using external authentication, users need to be first added to the LDAP server master at DC, and then to the Zimbra server.

In the ldap server, we specify the 'mail' attribute, as this is the attribute that Zimbra looks up for authentication. The password is from the user-password attribute itself.

After that, we add the user to the Zimbra server.


Troubleshooting[edit]

Checking Zimbra status:

# su – zimbra

$ zmcontrol status


Restarting Zimbra:

# zmcontrol restart