sync your life: putting funambol to work.

update: cleaned up formatting and updated push sync information.

i recently acquired an htc touch through bell mobility. see, it's not enough for me to have a phone... i need to have all of my latest email (across three imap servers), appointments (sync'd with google calendar of course), contacts (also sync'd with google) and tasks accessible in my back pocket. with bell mobility's unlimited data plan, the potential was there, but as a linux user i am (as with the rest of us) left out in the cold when it comes to sync support.

so, i did things my way.

i deployed a funambol server in my basement and got the client installed on my phone. then i configured the server to pull my imap mail (two google accounts and one horde account at the university of new brunswick.) appointments get pulled from the calendar on both of my google accounts. so do contacts. there are a number of ways to do this. i obviously chose the best route: free, open-source, and as always, a little tricky to set up. the best part, though, is that once it's set up (if you do it the right way!) you never have to touch it again.

let's get started, shall we?

what the heck is funambol, anyway?

funambol is a java-based syncml server. basically, it's the middleman. we have four entities (email,cal,contacts,tasks) across three different mediums: a) google pim (gmail/gcal/etc), b) gnome evolution, and c) windows mobile device. funambol is going to make them all talk.

ingredients.

hardware i'm working with:

  • headless home server (hp compaq dc7100) running arch linux
  • laptop, also running arch linux
  • htc touch running windows mobile 6 professional

you can actually use linux or windows at this point, but i can't guarantee that windows won't make the process slightly more difficult. ;)

software (get downloading):

part 1: funambol server setup
(if you're using the myfunambol portal, skip this section)

linux is better suited for server deployments. windows is more common in the home. since you're reading this, i'll assume you're probably considering this for home use. anyway, you need a computer that is always on. in my case, it's an hp compaq dc7100 running headless (no peripherals) and connected directly to my router. i choose to do this because the linux installation consumed less than 1GB of space and performs spectacularly under huge loads. if you don't have this luxury (or if you aren't as much of a geek as i am) you can just run the funambol server software from your linux and/or windows desktop pc.

installation is relatively straightforward. if you run into any problems, feel free to comment. don't forget to open up port 8080 on the server and map that same port on the router to it. also, you'll probably want to use a free dynamic dns service if you don't have a static ip address from your internet service provider. i recommend and use no-ip.com.

a sure-fire way of determining whether your site is accessible from the outside world or not is by pointing your browser to http://your-external-ip:8080/funambol/ds

create a user with the funambol administration tool:

sudo sh /opt/Funambol/admin/bin/funamboladmin

while you're in the admin tool, you need to create your imap accounts. do this by navigating to modules -> email -> funambolemailconnector. under account, click add. note that there are preconfigured account types for you to make use of (i.e. gmail imap.) woot. assign them to your user and log out of the tool.

once you have this all figured out, head on to the next section.

part 2a: configuring evolution
if you're using outlook, skip to 2b

set up your imap accounts normally.

untar syncevolution (we're using 0.7; it's the current stable release as of this writing. if you dare using 0.8 or newer then be forewarned that the configuration hints i provide will not be valid as syncevolution underwent a config rewrite for the new version.) then do:

./configure --prefix=/usr

followed by

make && sudo make install

if you're on debian/ubuntu, syncevolution can be enabled as a repo in synaptic. google it.
if you're on arch, download these two files and do:

sudo makepkg -i PKGBUILD

so now you have syncevolution installed. it's a commandline tool. if you're looking for a good gui, use genesis. for initial setup though, you'll want to use the command line (for debugging purposes.)

now you need to configure syncevolution. this is all done through text files, which i have made for you. lucky you. get the zip file here and unzip it to your home folder, retaining directory structure.

then you'll need to edit ~/.sync4j/evolution/funambol/spds/syncml/config.txt and change the three values that i have cleverly defaulted to "fillmein." fill them in according to your funambol server info. done.

to test, run:

syncevolution funambol

on the commandline. if it works, go ahead and set up genesis to your liking and say goodbye to the commandline forever (at least for this project.)

part 2b: configuring outlook

first, set up your imap accounts normally.

install the plugin you downloaded above in the ingredients section, then point it to your server and you're good to go. everything is done through the gui.

part 3: configuring the windows mobile device

this one is also pretty easy. using the plugin you downloaded above, install via activesync or simply by running the cab file on the device. point it to your server and fill in the appropriate login information.

conclusion

your funambol server pulls all of your email and connects it to your pda via push or scheduled sync (depending on what your carrier supports and what you have set as the sync method in the windows mobile plugin. here in canada i'm operating on a cdma network, so push sync isn't well supported. i do scheduled syncs every 30 minutes. i get over it. push sync'ing is working for me now with bell mobility; ensure that your device has a static ip address that matches its device record in the funambol administration tool.) it also holds all of your contacts, calendar events, and tasks.

using genesis with evolution and/or the outlook plugin with outlook, your calendar/contacts/tasks are kept in two-way sync with the funambol server and, therefore, your pda. mail is pulled independantly from the funambol server (as it normally would.)

there are obviously a million more possibilities to this, and i wrote this entire article in roughly an hour, so i will be refining it as time goes on. you are encouraged to comment so you can point out my mistakes and ask questions. stay tuned for more articles on funambol from me, including the next one on how to incorporate google calendar and google contacts into this whole mess.