Sunday, September 30, 2007

Setup Zimbra on your home machine to receive emails from your domain

This was a fun exercise to get Zimbra setup on my laptop to receive emails for some domain that I have registered. Fun came in different shape and size (what I really mean is highs and lows of frustration point). So here it goes.
I have a domain e.g. and I wanted to route all the emails sent for this domain to my laptop where I have setup Zimbra. Before you do this few points to remember and work on
  • You need static IP address or publicly available domain so that MX server can point to your static IP or domain.
  • If you have firewall setup at your home, you will have to open couple of ports to make it work.
(You can skip this step if you have static IP address)

I have DSL at home, so the Dynamic IP address and I have to get a static IP so that mails can be routed consistently to the same IP or domain. So find your outside world IP address first , best way to get this go to and it will tell you your IP address seen by the world. Next thing to do is, map your dynamic IP to some static domain. DynDns provides this kind of support for free. Go ahead and signup and get the free service where you can pick DynDNS domain to map to your dynamic IP address. Let's say you picked from the list.

(Note: Make sure you choose "Specific mailserver will route all mail for my DynDNS host" option in mail routing section and specify your actual domain hosting providers mailserver hostname)

Next step is go your hosting provider where you have your domain hosted ( . Go to your domain's DNS settings and change your Mail server (MX record) to Other mail server option and set

MX 1 / Prio -> 1

Now to your home network firewall setting and open port 80 (http) and 25 ( SMTP) for incoming connections, so that outside world can access your machine on above ports (80 for http connection and 25 for SMTP mail relay). Some firewalls might have port forwarding option also.

Now lets start cranking with Zimbra. Download and install Zimbra as per your operating system specifications. Follow the Zimbra quick start guide for installation . In short
  • Stop anything running on port 80 before you start the install
  • When installation starts it will ask you for domain name and say localhost (do not say , ignore the message installation script message about not finding MX record mapped to localhost.
Once installation is complete , script will try to start the zimbra server. Hopefully server started properly go to https://localhost:7071/zimbraAdmin/ login with the admin username/password you created while installation. You will see localhost already under domains. Now you will have to go create new domain with (your actual domain name) and user for that domain. e.g by going to accounts option.

That should do it. Now you can go to any of your email clients and send an email to and you will see email coming right to your zimbra server. To check email click on in accounts option and click on "View Mail" option on right hand top pane.