I have a domain e.g. www.mydomain.com 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.
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 http://whatismyip.com/ 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 yourdomain.webhop.net 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 (www.mydomain.com) . Go to your domain's DNS settings and change your Mail server (MX record) to Other mail server option and set
MX 1 / Prio -> yourdomain.webhop.net 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 127.0.0.1) , ignore the message installation script message about not finding MX record mapped to localhost.
That should do it. Now you can go to any of your email clients and send an email to firstname.lastname@example.org and you will see email coming right to your zimbra server. To check email click on email@example.com in accounts option and click on "View Mail" option on right hand top pane.