Archive for October, 2009

Binding Zimbra to an IP

Monday, October 19th, 2009

Zimbra is a fantastic collaboration suite, but it suffers from one major flaw; it really likes to take over your entire server!
If you want to run Zimbra and your web site on the same server without moving Zimbra’s web UI to another port then you’ll have to convince it to bind to one IP address you can use the other one(s) as you please.
This is possible and actually quite easy but completely undocumented.

Before we begin, you will need a working Zimbra install. I’m not aware of a way to pre-configure this process, so you may have to stop your web server etc. whilst running as the installer will likely bail with port conflict errors.

First off, SSH in to your server and find out what Zimbra server(s) you have defined:

su – zimbra
zmprov gas

The su is important as it sets the various environment variables Zimbra needs to point at it’s home in /opt
Now take the server from this and modify the following commands with <server> and <ip> substituted appropriately.

zmprov ms <server> zimbraImapBindAddress <ip>
zmprov ms <server> zimbraImapSSLBindAddress <ip>
zmprov ms <server> zimbraPop3SSLBindAddress <ip>
zmprov ms <server> zimbraPop3BindAddress <ip>

This will bind the POP3 and IMAP Java process appropriately but we need to edit the Jetty config to do the same for the web and admin interfaces.
Throughout this guide I’m assuming that you are running a single server setup with everything on one machine, but it should be quite easy to tweak the IP addresses appropriately in a multi-server environment.

Zimbra uses the Jetty Java application server, so we need to tell Jetty to only bind to one specific IP. Open up /opt/zimbra/mailboxd/etc/ in your favourite text editor and look for lines starting

You need to add a “<Set name=”Host”><IP></Set> line to the <Arg> list for each of the HTTP and HTTPS connectors as well as the Admin connector. If you want, you can also edit the “Extension Port” connector which is only used for mail routing in multi-server environments.
For example:

<Call name=”addConnector”>
<New id=”ssl” class=””>
<Set name=”Port”>%%zimbraMailSSLPort%%</Set>
<Set name=”Host”></Set>

Now open up /opt/zimbra/mailboxd/etc/ and you should see a “param” named “zimbra.soap.url” with the value set to “http://localhost:7070/service/soap”. you need to change this to “http://<IP>/service/soap”. Notice that the :7070 port declaration is removed.
For example:


Now you need to do the same for /opt/zimbra/mailboxd/etc/

Finally, if you want to bind the Zimbra Postfix SMTP service to a particular IP then edit the first few lines of /opt/zimbra/postfix/conf/ that start with smtp, 465 and submission to have : prepended. For example: inet n – n – – smtpd inet n – n – – smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes inet n – n – – smtpd

Once all this is done, restart Zimbra using zmcontrol and use netstat to check that everything is bound to the right IP.
The only thing to remember with this is that you will have to edit each of these files every time you do an upgrade.

Windows Server 2008 and Adaptec 1430SA

Thursday, October 15th, 2009

Drivers for Adaptec’s 1430SA controller aren’t included with Windows Server 2008 for some reason best known to Microsoft. Although you can download the drivers from the Adaptec site, this doesn’t really help you if you are trying to install Windows onto the RAID controller itself…

After a bit of fiddling, I managed to get the drivers onto an ISO that I could feed to the virtual media on a KVM and connect to the server using my Windows XP in parallels on my Macbook Pro.

Step 1: Find yourself a Windows machine. For some reason, Adaptec provide the drivers in a self extracting WinZIP EXE.

Step 2: After extracting the EXE, copy the resulting files back to your Mac

Step 3: Launch the Disk Utility and then select File -> New -> Disk Image From folder, point it at the folder containing the newly extracted Adaptec driver files and click “Image”. Change the Image Format to “DVD/CD master” and make sure that Encryption is set to “none” then click save.

Step 4: Fire up the terminal and go to wherever you saved the .cdr image that the Disk Utility created

Step 5: Run “hdiutil makehybrid -iso -joliet -o adaptec.iso adaptec.cdr” substituting adaptec.cdr for whatever you called the .cdr image that the Disk Utility created

Now you have an ISO file containing the Adaptec drivers that you can burn to a CD or attach to your KVM when prompted by the Windows installer.