Funambol with Zimbra

June 10, 2009

OK. I need to get it so that I can get email/contacts/calendar on my WM6 device (an HTC jigger). I’ve got Zimbra setup, and from what I can see, Funambol is the way to go for a cross-platform mail gateway thingy.

This here looks like the go: http://zimbrafunambol.wiki.sourceforge.net/installation-guide. Funambol Zimbra Connector Installation Guide - how can I go wrong? ;)

I’m installing on 8.04LTS Desktop, as I think this needs some stuff that’s not available by the console.

Have downloaded the Server software v 7.1 from https://www.forge.funambol.org/download/

Download the latest Funambol Zimbra connector version from this link: https://sourceforge.net/project/platformdownload.php?group_id=219645. Download the .s4j version, not the .zip (not sure why, just following the instructions!)

One thing I’ve found is not quite correct -
cd /bin
./install-modules.sh

Should actually be
cd /bin
sh install-modules

Also, once you install Funambol you need to do the following to make it start automatically (from the installtion guide)
- Open a terminal
- copy the startup script into init.d
cp /opt/Funambol/bin/funambol /etc/init.d/funambol
- Open the script in a text editor
pico /etc/init.d/funambol
change this: FUNAMBOL_HOME=`(cd .. ; pwd)`
to this: FUNAMBOL_HOME=`(cd /opt/Funambol ; pwd)`
- enter this:
ln -s /etc/init.d/funambol /etc/rc3.d/s30funambol

Open the Admin console:
cd /opt/Funambol
admin/bin/funamboladmin

Now, I’ve followed through the other instructions setting it up.

One thing I’ve found is a bit sketchy is how to setup the user accounts. Apparently (and I’ve seen it work) you setup the Funambol client on your PPC, put in the server setting (forwarding the port to your Funambol box of course), and putting in your desired username/password. It this enrols you and the device, but from what I can see, it still doesn’t know which mail to pickup from Zimbra.

Also, one thing I found which might be useful for someone out there is when you hit http:///funambol/ds, you get this

Funambol Data Synchronization Server v.7.1.0

Man=Funambol
Mod=DS Server
SwV=7.1.0
HwV=-
FwV=-
OEM=-
DevID=funambol
DevTyp=server
VerDTD=1.2
UTC=true
SupportLargeObjs=true
SupportNumberOfChanges=true
Ext=X-funambol-smartslow

And that seems to work…

some information here too: http://www.zimbra.com/forums/administrators/20292-funambol-zimbra-connector-error.html

You apparently need to setup your Funambol account exactly the same as Zimbra, and enable plain text passwords for Zimbra. In Zimbra, you need to do this in the Global settings, not the server settings, and I had to uncheck “Use TLS Authentication Only”.

Also, Zimbra needs a restart for this to stick. To do this:
su - zimbra
cd /opt/bin/zimbra
./zmcontrol stop
./zmcontrol start

I’m getting very close now - it appears to be connecting but syncs aren’t completing.

I’ve had a look through the logs on the Funambol server, which are located in opt/Funambol/logs/ds-server. The error I’m getting is the first one on this page: http://zimbrafunambol.wiki.sourceforge.net/common_errors, which is to do with creating the XML file. The instructions aren’t really clear as to what has to go into that xml file… but here goes.

I checked in the correct path /opt/Funambol/config/connector, and there was nothing there (I’m sure I’d copied this in!). So I’ve put it in copied straight off the installation website to see how it goes. I’ve then started and stopped the Funambol service.

The log now looks better, but still no workie! In case it was something to do with the existing mail on my device (which is quite old), I’ve run “Cleanup” in the Funambol client and erased all my old email from my phone, but it’s still not working.

That said, it didn’t get rid of my email. So I’ve gone into ActiveSync on my phone, and unchecked “Email” in the sync settings. Did that work? No… grrr.

I’ve now added my Name and email address into the Funambol client on my phone. We’ll see if that works (dunno why it should, but I’m trying everything here). Nope.

I’ve now deleted the ActiveSync Exchange server settings completely from my phone. And, BOO-YA! It worked! Well, everything but my email did - all the Contacts and Calendar synced up OK. And the only issue with my contacts is it looks like it’s synced up my contacts in Zimbra, and a backup copy of my contacts I had in a different folder, so I now have 2 of everything…

OK, now I need to get mail setup. I’ve decided to RTFM, and I’ve got the Administration Guide handy. From page 37, I need to setup the “Officer” as my mail server. So:
1. open the Administration Tool
2. Double click Server Settings
3. in the Officer field, change from UserProvisioningOfficer.xml to EmailOfficer.xml and save
4. Double-click Funambol Email Connector
5. Click “Add” next to the list of existing server types
6. Name it, and add the host name for your local mail server (eg “Mail”) for inbound and outbound mail. Fill out the other details, and hit OK
7. Click Add next to the list of usernames
8. Double-click the account you want to add
9. Fill out the username/password etc, and save

And it LIVES!!!!

Sorry, this is a bit disjointed, but I hope that if someone is trying to do a similar setup you can follow it.