Thursday, July 8, 2010

DavMail gateway provides LDAP and WebDav interface to MS Exchange

Goal: Get calendar and ldap-lookup working in thunderbird to my corporate hosted exchange service.

Status: WORKING!


DavMail provides a gateway from open protocols to MS Exchange
Thunderbird plugin for calendaring, built on sunbird
Current version requires Thunderbird 3.1.
Email client.
Calendar Client (with Lightening installed)
Exchange Server
My office uses an exchange server hosted by AppRiver's Shoreline system.
  1. Install DavMail
    On my ubuntu system, I downloaded the deb from sourceforge and installed it manually with dpkg. I ran into a problem where I didn't have the proper swing libaries installed and the partially installed dpkg blocked the install of the swing libraries. In reality it was as simple as answering "Y" to "delete DavMail" and letting the swing install go through.
    1. #manually download deb from
    2. sudo aptitude install sun-java-6 libswt-gtk-3.5-java
    3. sudo dpkg -i davmail_3.6.6-1032-1_all.deb

    The install integrated into the menu system, providing a menu entry to launch the app: Applications->Internet->DavMail.
  2. Upgrade/Install Thunderbird 3.1
    3.1 is currently required for lightning. I installed via the ubuntuzilla repository. Caveat: only 32 bit builds are available. I installed via the ubuntu repository, as per the Instructions.
    1. Create a new sources file /etc/apt/sources.d/ubuntuzilla.list containing:
      deb all main
    2. Then add the key, update and install:
      1. sudo apt-key adv --recv-keys --keyserver C1289A29
      2. sudo apt-get update
      3. sudo apt-get install thunderbird-mozilla-build
  3. Install Lightning into Thunderbird.
    This is most easily done directly through Thunderbird:
    1. Tools->Add-ons menu item.
    2. [Get Add-ons] button
    3. Type Lightning in the search box and press enter to search.
    4. push [Add to Thunderbird] button on the Lightning item.
    5. confirm install
    6. Restart Thunderbird
Configuration The devil is in the details. Getting the correct configuration from our hosted exchange server took quite a bit of trial and error. The email system predates the current company, so I have at least three logins:
My primary email address
username @
This is the address used to send and receive mail.
Same account at a different domain (the founder's vanity domain).
username @
This is the address used to authenticate with the pop/imap servers and to access Outlook WebMail.
my username with internally assigned id number attached. No domain.
Used internally. Will be used in our ldap setup.
  1. Launch and Configure DavMail
    1. Launch from menus Applications->Internet->DavMail, which launches to a gnome icone in by the clock.
    2. Open settings right-click DavMail icon->Settings...
    3. Set the OWA (Exchange) URL :
    4. Make note of the ports for CalDav (1080) and LDAP (1389), change if desired.
  2. Configure calendar in Thunderbird-lightning
    1. File->New->Calendar...
    2. choose [*] On the Network and [Next]
      1. choose [*] CalDav
      2. Location: http://localhost:1080/users/
      3. [Next]
    3. Configure the name, color and alarm settings as desired. Email should by your work email, aka username@rubiconproject. [Next]
    4. Provide login credentials, the same as if you were using the webmail tool, for for me that is the account.
  3. Configure LDAP
    1. Thunderbird Edit->Preferences->Composition->Addressing
    2. [Edit Directories]
    3. [Add]
    4. Configuration settings. Base DN and Bind DN were tricky.
      • Name: proxy ldap
      • Hostname: localhost
      • BaseDN: ou=people
      • Port: 1389
      • Bind DN: username_12345
      • [OK]
    5. Test the connection:
      1. select proxy ldap and press Enter
      2. [Offline] tab
      3. [Download Now].
      4. enter as username and correct password in the authentication box.
      5. if the download completes and "Replication Succeeded" appears, all is working.

And there you have it, working exchange integration through open standards. Yay! It'll only take 15 minutes or so total to install now (after my hour putzing it around and 3 hours writing it up.)

I now have ldap lookup and caldav alerts functioning. I haven't delved that far into the system, but it's a big step up from my previous interaction lightning. I'll see what happens when I get my next meeting invite and attempt to reply via thunderbird.


yitznewton said...

You da man. Thank you so much for helping us be rid of the pox that is Outlook and come back into the loving arms of Thunderbird.

RRR said...

Do you know how to get LDAP to work in Evolution?

Andrew Grangaard said...

@ RRR: I have not used evolution recently, so I do not know how to get LDAP working there. In theory it is supported.

Anonymous said...

Sorry to bring up an old post but I was able to add my LDAP Address book with your blog post (thank you!) but now I'm getting a weird issue:

1. If I search for an address by going to "AddressBook->Edit->Search Addresses" it finds them perfectly

2. If I type the name into a "compose email" "to" field, it cannot find them! (This despite my setting the LDAP server to be searched in both global and account settings' "Composition & Addressing")

Do you know how to get this to work?

Andrew Grangaard said...

anonymous, I don't know what's up with your compose email to field not working.

I ran through these settings yesterday and I have LDAP working in my thunderbird instance. I had to set my directory server a couple of times in the Address AutoCompletion section before the change was saved.

Check in Edit->preferences->[Composition]

Address AutoCompletion:
[] Local Address Books
[X] Directory Server: [ ...dropdown....]