I’ve finally got round to installing a decent email server to manage my ever expanding archive of mail. I came across Zimbra a fair few months ago, but haven’t had the time/hardware to have a solid go at it.
As my rusty windows box kindly started up the other day with a clean registry, I decided to get going with Zimbra anyway.

I’m glad I did, because it seems to Rock!

These are notes on the steps to get everything running smoothly for my setup.

  • I have a dynamic IP from NTL (albeit with a very long lease time)
  • A netgear router that assigns internal IPs via DHCP
  • The router syncs my chosen subdomain of dyndns.org with my NTL IP using dyndns.org’s generous free dynamic DNS services
  • Dyndns.org provide an A record and an MX record for <mysubdomain>.dyndns.org
  • My Zimbra box handles mail and some web services and I have other machines on the LAN offering other web services

I already had Fedora Core 5 on the chosen box, so I used the Zimbra binaries to install.

Before the install things of note that I remember having to do that were slightly different to the default…

  • I stopped sendmail which was running on the server from my install of Fedora and prevented it launching at startup
    # service sendmail stop
    # chkconfig sendmail off
  • I set the /etc/hosts file to contain …
    127.0.0.1 localhost.localdomain localhost
    192.168.xxx.xxx <mysubdomain>.dyndns.org <internal_machinename>

    Reading around, this seems a little screwy, but was the only way I could get everything working (I did do a fair amount of fiddling to get everything hunky dory)
  • As my Zimbra box was behind my router which was port forwarding mail services to Zimbra’s internal IP and also offering DNS services out into the world, I needed to set up a minimal DNS service on my Zimbra box so that internal mail would be routed internally rather than out into the world where it would get lost and confused. I needed <mysubdomain>.dyndns.org to resolve to 192.168.xxx.xxx inside the LAN without affecting how <mysubdomain>.dyndns.org would resolve outside the LAN. This takes a little more than just editing the /etc/hosts file as I had originally hoped.
    To get this minimal DNS service working, I used a combination of these documents to installed Bind as the primary DNS service only for the Zimbra box (unsatisfied DNS lookups then being asked of my router) http://wiki.zimbra.com/index.php?title=Split_dns
    http://www.howtoforge.com/linux_bind9_and_caching_nameserver
  • To get the local Bind service working out DNS queries before the DHCP assigned router DNS service, you need to have your /etc/resolv.conf looking like this…
    nameserver 127.0.0.1 (localhost IP)
    nameserver 192.168.xxx.xxx (IP of the router)

    The tricky part is that DHCP overwrites the resolv.conf file on startup… stripping the critical first line above.
    I got round this by creating an /etc/dhclient.conf file with help of this blog
    http://jbowes.dangerouslyinc.com/2006/12/09/using-opendns-with-fedora-core-6/

Steps that had to be taken during the install that weren’t the default answers.

  • I had apache running, offering some unrelated web services that I wanted to keep, so I changed the default port for the tomcat web server that Zimbra installs from 80 to another number I like
  • I had to set an admin password before the install could complete (nice and sensible)

I think those all are the steps I needed. A little complicated, but well worth the effort. No more agonising startup delays with Outlook and simply not finding emails even with Google’s desktop search. Zimbra seems like an extremely capable baton carrier for my mail needs at least.

The steps I had to take to get my 1GB of mail/appointments/addresses from Outlook 2002 format into Zimbra can wait for another day.

Categories: LAMP

Jonathan Adjei

Jon's expertise in web development is legendary and he oversees all technical aspects of our projects from development to hosting (all through the command line!) Jon is excited by the latest techniques and keeps the company on track by finding ways to adopt new practices into our workflow.