Radu Cotescu's professional blog

g33k w17h pa45510n

How to Make Thunderbird Connect With Microsoft Exchange

After enrolling to the University of Southampton Software Engineering MSc programme the iSolutions department (responsible with the IT infrastructure) provided me with an user account to be able to access all the facilities. The account also has an email address attached, which happens to be hosted by a Microsoft Exchange Server. And here the “conflict” begins. The University advises all its undergraduates or taught postgraduates to use the OWA web application or the University’s portalĀ (which actually uses an iFrame to display the contents of OWA) to access their email accounts while the other students (research ones) and staff are allowed (and by this you must understand that iSolutions offers support for this) to use an email client.

I have never been a fan of using webmail. One of the reasons for this is the inability of such clients to provide all the features a desktop client. Since I use Ubuntu, I also couldn’t have accessed the full OWA application because I do not use IE (it’s against my beliefs to use such a lousy piece of software), leaving me with a limited webapp. Fortunately, I am a geek. My favourite email client is Thunderbird, which unfortunately cannot connect directly to Microsoft Exchange like Evolution (this is explicable through the partnership between Novell and Microsoft; in this particular case not even Evolution was able to connect to the server - the server version is unsupported). The only protocols available in Thunderbird are POP3 (old, blunt and poor as a solution regarding the number of mail capable devices I own), IMAP and SMTP. Even though I could have checked my University email using IMAP (they have enabled IMAP access on the Exchange Server), I couldn’t have accessed the Contacts or the Calendar features. The solution?! DavMail.


DavMail is a gateway between the OWA and whatever email client one uses. Written in Java, the application maps several ports on the localhost to the services offered by the Exchange Server. Since ports lower than 1024 need root access on UNIX and UNIX-like machines in order to be able to bind applications to them, DavMail usually uses the original protocol’s port numbers plus 1000 (e.g. 1110 for POP, 1143 for IMAP, 1025 for SMTP, 1080 for Caldav and 1389 for LDAP) but these settings are fully customizable.

Other nice features of DavMail include the ability to use the IDLE feature of the IMAP protocol to let the server push the messages to the client (this improves speed and network efficiency by reducing the number of queries made by the client to poll for new messages), the option to bind DavMail to an IP address for remote access for other “Exchange-impaired” clients, the auto-expunge IMAP feature (allowing for faster message deletions), logging and many more… The only Exchange feature that cannot be made available to Thunderbird 3 users is accessing the Contacts saved for one account (the personal address book created on the server). Still, this can be easily overcome by using the local address book from Thunderbird or using the information provided by a LDAP, since in most corporate environments all the needed contacts are stored this way.

What’s interesting about DavMail is that being only a layer, all the security is handled by the email client. Therefore you can’t compromise your accounts because of it. The setup is pretty straightforward and all of the Exchange features work as if using a dedicated client. I expected LDAP searching to be slow since we have a gateway between the client and the server, but it wasn’t the case. All the queries were fast and keep in mind that my University’s LDAP database is large (approximately 24000 students plus staff).


I wish Thunderbird could have offered Exchange support out of the box. Yes, it’s a Microsoft technology, but there seems that there are many adopters. Would I have liked it more if the University of Southampton used Google Apps? You bet! But since the only solution to access my account via a desktop client is using DavMail I actually have no complaints. I am happy that the program works okay, fast and that it is extremely easy to set up. Of course, if the server which holds your account doesn’t have the OWA service active you are toasted. Otherwise DavMail is just one cool little Java program.

.com, How To, Linux, Ubuntu

« Oracle vs. Google and Java Patents The art of web feeds »