Use Thunderbird/Evolution with Microsoft Exchange 2007/2010

Many organizations/companies use the “Microsoft Exchange Server”. This product is, as the name might indicate, a mail server. Microsoft Exchange Server integrates perfectly with Outlook. It also communicates with lots of other devices. For example, it can communicate with the ActiveSync from your Android, Windows or Apple smartphone, besides that it also has a very nice web interface.

note: I noticed that Windows 8 has a mail application like my smartphone. This mail application uses the Active Sync protocol. This is really awesome!

However, Outlook and the full blown web interface only work on Windows or Mac. So, what to do if you don’t run Windows or MAC but Linux…. You could use the web interface. The web interface gives you almost everything you need. Except that the Exchange 2007 web interface works under “fall back” mode. The full blown version only works with Internet Explorer, since we don’t run Windows, we can’t run Internet Explorer, without some tricks.

Don’t fear, this tutorial will show you a solution using your favorite mail client! I personally prefer to use Evolution or Thunderbird. Both of these mail programs are very popular. Right now I prefer Evolution, due the integration with Gnome3.

Davmail

is a POP/IMAP/SMTP/Caldav/Carddav/LDAP exchange gateway. This gateway allows users to use their favorite mail client. DavMail now includes an LDAP gateway to Exchange global address book and user personal contacts to allow recipient address completion in mail compose window and full calendar support with attendees free/busy display.

Install

Before we can configure our mail client, we have to download and configure Davmail. You can download the DavMail client from this . I’m installing it on a Fedora 17, 64 bit.

wget http://sourceforge.net/projects/davmail/files/davmail/3.9.8/davmail-linux-x86_64-3.9.8-1921.tgz/download

After you downloaded the package we have to unpack it:

tar -xvf download

When you unpacked the package you can remove the download:

rm download

Descending into the right directory:

cd davmail-linux-x86_64*

To start Davmail you can use on of these commands. The first command will start Davmail in the background. If you close the terminal, Davmail keeps running. However, you won’t immediately see debug output. That’s why I suggest that you start Davmail the first time the second way. Until you know that things work correctly.

Remember that Davmail requires Java, without Java Davmail won’t even start.

nohup  ./davmail.sh &

OR

./davmail.sh

Configure Davmail with the correct settings, in principal only one setting is really required. This is the correct OWA URL. For me this was https://webmail.mycompany.com/OWA

https:///OWA

Save the configuration and restart Davmail. Confirm that the settings are still correct.

If you didn’t change any other settings, the following settings will be applicable for you:

Open local Ports:

  • IMAP: 1143
  • SMTP: 1025
  • CALDAV: 1080
  • LDAP: 1389

We will need those ports to communicate with DavMail. Davmail will communicate with the OWA.

Thunderbird –> davmail –> Exchange Server

Start Evolution / Thunderbird and add a new account

If this is the first time that you start evolution it will automatically start the procedure to add an email account. Else, select

edit –> preferences –> mail accounts

Add an account and fill in the required information on the first page.

Configure your email account with the following settings:

Server type = imap
server = localhost
port = 1143
secure connection = No encryption
Authentication = password

Enter the following SMTP settings:

server = localhost
port = 1025
security = No encryption

No encryption! It’s very important not to use encryption right now. Don’t worry to much about not using encryption. This is only to communicate with Davmail. Once your “email” or “passwords” leave your computer they will be encrypted with SSL.

If you like you can add encryption to the Davmail. This however is beyond the scope of this tutorial. (if you run DavMail on a server, please use encryption)

Save your account and refresh. Your emails should be downloaded instantly. You should also be able to send emails as well.

If you have any problems, please tell me and I will try to help you. In one of my next blog posts I shall explain how to configure your address-book and calendar. However, the tutorial of today should give you a big hint on how to do it.

Kr.

 

 

13 comments

  1. Joe says:

    Hi there. I am still farily new to CentOS (6.1/6.2)/Fedora (16/17). I got to where I ran the “.davmail.sh” command and I got the following:
    “Gtk-Message: Failed to load module “pk-gtk-module”" followed with DavMail Gateway Settings window opening.

    Is it safe to ignore the “Gtk-Message…” message?

    Reply
  2. Hi,

    I’m assuming, since you’re saying “Is it safe to ignore the “Gtk-Message…” message?”, that the program is starting right? In that case, it’s safe to ignore the message.

    I’ve done some quick research on possible problems and I found a bug report on bugzilla (https://bugzilla.redhat.com/show_bug.cgi?id=747449).

    A possible fix is that you need to install an extra package
    – yum install PackageKit-gtk3-module

    However, if the program doesn’t start, we’ll need to search deeper.

    Kr

    Reply
    • Joe says:

      Thanks for the quick replay. I found that same bug report. At this time I am ignoring the message.

      I would like to say thanks for the write up. I have Davmail and Evolution working. I did have to set the Authentication for SMTP to the Login type

      Reply
      • Hi,

        Great to hear that everything is working.

        Yes, this could be, it might depend on the Exchange settings. Could you tell me, what kind of Exchange server you’re using? I’ve only tested and confirmed it with Exchange 2007. However, this is a corporate mail server, so I don’t really know it’s exact settings.

        kr.

        Reply
        • Joe says:

          We have Exchange 2010 and I am also not the Exchange administrator and I wasn’t part of the group that deployed it. Looking forward your guide on address book and calendar

          Reply
          • I expect to have this finished by Friday :-)
            I published the tutorial right now. It might be a little rough at the moment, but it should help you to configure everything.

            https://linux-answered.com/2012/06/21/use-microsoft-exchange-2007-2010-calendar-address-book-evolution/

  3. Microsoft Exchange 2007/2010 calendar/address book with Evolution says:

    [...] I’m assuming that you followed my previous tutorial “how to install DavMail“. [...]

    Reply
  4. Zeki Can says:

    Thanks a lot

    Reply
  5. Dunmarie says:

    Fantastic. I was getting grey hair with Evolution and Exchange 2003.
    This is working perfectly so far and a lot faster.
    Next step will be Calendar & Contacts. :)
    Thanks for the write up.

    Reply
  6. David Woodhouse says:

    You don’t need to use davmail. Evolution has direct support for both EWS and ActiveSync.

    Reply
    • This is absolutely correct. However, if you’de like to use an other mail client like thunderbird you will need to use this work around.

      Cheers

      Reply
  7. brian says:

    Hi! How does one reconfigure davmail after the first run? I need to change my OWA server and I can’t find a way to go into davmail’s configuration again. Thanks in advance!

    Reply

Leave a Reply