How to make Thunderbird connect with Microsoft Exchange

Monday, August 16th 2010, 22:47

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

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).

Conclusions

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.

You might also like:

11 Comments

  • I have not been able to determine how to get the IDLE feature pushing to the client running via Davmail interface:

    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)

    Any suggestions?

    thanks!
    jf
    John Friedson

  • The ‘IDLE folder monitor delay (IMAP)’ ?
    thanks!
    jf

  • Working on getting Davmail setup with Exchange 2003, clients are getting a refused connection the log file on the DavMail gateway side says “Connection from external client refused” any ideas what need to change on either client or sever side settings?

    • Unfortunately I don’t know what’s wrong with your setup. Did you install Davmail as a gateway for multiple clients in the same network? If so, have you ticked the “Allow Remote Connections” check-box from the “Advanced” tab?

  • I wonder if we need to take advantage of “the option to bind DavMail to an IP address for remote access for other “Exchange-impaired” clients” ?

    • I have this setup with Thunderbird and works really well. Can anyone walk me through a simple way of getting remote access via iPhone or other mobile client?

  • Connected and finally sync’d T-Bird to OWA account. Can now drop Outlook. DavMail wasn’t needed. (Also switched to a gmail calendar instead of keeping Outlook Cal.)
    Using T-Bird 3.1.9 and Win 7 Ultimate.
    IT Services helped with Server Settings (name, port, security) and Outgoing Server (SMTP) name.
    Finishing touches (resolving synchronization delay) came from this blogspot post.
    http://fourforces.blogspot.com/2010/11/setup-mozilla-thunderbird-to-work-with.html
    “4. Go to Tools/Options/Advanced/Config Editor:
    Set boolean mail.check_all_imap_folders_for_new to true.
    Set boolean mail.imap.expunge_after_delete to true.”
    Move down the list each item, right click, select Toggle. It’ll switch the item from false to true.
    JJ

  • Hi there,

    googling I found this link to DavMail, works fine, although I have two problems.

    1. Unlike when accessing my Exchange Server via IMAPs, I cannot unsubscribe folders using DavMail. Is that a DavMail or a Thunderbird problem?

    2. DavMail appears to struggle with my (fairly) large trash folder. It constantly tries to download something and even sometimes produces hundreds of seemingly empty emails.These are then also found on the Exchange server containing calendar information … awkward, isn’t it? I unchecked indexing and downloading messages for offline use.

    Any ideas how to get rid of these problems?

    Thanks in advance,
    David

    • I haven’t experienced the problems you are talking about but you might try to contact the developers on their SourceForge forums.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


CODE EXAMPLES: When you want to include source code or terminal output, please use the the following tags like in the next example:

    [language]
    code lines
    [/language]
	

where you substitute language with the programming laguage used throught the code example (for terminal output that would be bash), e.g:

    [bash]
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    [/bash]
	

To see a list of all the supported languages, please check this page.

If you want to include code bits inline, please use the code tags like in the following example:

    The <code>$USER</code> variable holds the current logged in username.
	

Projects that I support

Recent Comments

  • nope said:
    yeah that was my first thought too, but: mount: warning: seems to be mounted read-write. too bad, would have been just perfect. more»
  • Klaus Deiss said:
    Dear Radu, I tried it on Ubuntu 10.0.4.2 and 10.0.4.3 with different kernel versions (amd64 server 2.6.32 kernel). No... more»
  • scompo said:
    Nope.. Now it’s not working again.. This printer it’s a real pain in the butt.. The other hp printer I had... more»
  • Dmitrij said:
    Thank you Peter and Patrice. Could you please post the updated script? more»
  • hd_flash_pains said:
    didn’t work for me more»

Recent Tweets

Bear