Mail from Exchange Server on Ubuntu 12.04 With Evolution
If you are a daring corporate rebel, then it's not beyond the bounds of possibility that you will one day find yourself running an Ubuntu 12.04 LTS desktop in a Microsoft workplace. If you company uses Exchange Server then mail access via IMAP or POP may be unavailable, which eliminates the use of most mail clients. There's always the webmail front end, but that's not the greatest thing in the world.
The Thunderbird mail client should work with the MAPI protocol used by Exchange Server, is straightforward to install, and largely gets the job done. Here, however, I'll look at using the Evolution mail application to access an Exchange Server mail account. Getting that to work is more challenging and hence requires the notes outlined below.
MAPI and Exchange Service Support in Evolution Packages
If you look over the evolution packages available to apt-get, you might notice that there are evolution-mapi and evolution-exchange packages. Don't install those, as they don't work with modern versions of Exchange Server: evolution-mapi has blocking bugs in the package version available to Ubuntu 12.04 and evolution-exchange is just woefully out of date. More recent versions of Evolution and Evolution MAPI support can be built from source, and may work, but that's a pretty onerous task on Ubuntu 12.04 - you'd have to work your way through upgrading a lot of packages past the point at which they are available via apt-get.
So we'll take a different route here and install the evolution-ews package, which uses Exchange Web Services as an API to access mail. This code is fully functional but still a work in progress and so doesn't have a package available to apt-get for Ubuntu 12.04. That means either (a) locating a home-rolled .deb file that works, or (b) downloading source code from the evolution-ews repository and building your own package.
Locating an Existing Package (Evolution 3.2)
First install Evolution via apt-get:
apt-get install evolution
For evolution-ews you will find a 64 bit package referenced in the comments to a 2012 post on Evolution in Ubuntu 12.04, which can be downloaded from Google Docs. If you're running Ubuntu as a desktop, double-clicking a .deb file will bring up the software center with an install option. Or you can run dkpg from the command line. Hopefully I shouldn't have to remind you to inspect the contents of random packages from the internet before installing them.
Building Your Own Package (Evolution 3.4)
The recipe to build your own package for evolution-ews on Ubuntu 12.04 is a moving target, and you can't use the vanilla apt-get version of the evolution package at this point. Following the instructions in a forum post on the subject, we must add a repository to obtain Evolution 3.4 and various supporting packages rather than the earlier version in the main apt-get repositories for Ubuntu 12.04. So with that in mind, you'll find the following packaging script in a forum discussion, which I've altered for legibility and to update to the 3.4 version. Note that the script both builds a .deb file for evolution-ews and installs evolution and evolution-ews. You can comment out the packaging function if you don't want it:
#!/bin/bash # # Installing evolution v3.4 and dependencies from a ppa apt-get repository # and building evolution-ews v3.4 from source. # # Add a suitable repo. sudo apt-get install python-software-properties sudo apt-add-repository ppa:janvitus/gnomestracciatella sudo apt-get update # Obtain evolution. sudo apt-get install evolution evolution-dev sudo apt-get install evolution-data-server evolution-data-server-dev # Install other requirements, some of which require the ppa repo. sudo apt-get install git gnome-common checkinstall gtk-doc-tools \ libgtk-3-dev libgconf2-dev libsoup-gnome2.4-dev \ libedataserver1.2-dev libedataserverui-3.0-dev libebackend1.2-dev \ libecal1.2-dev libedata-cal1.2-dev libedata-book1.2-dev \ build-essential # Get rid of the repo to avoid future complaints during updates. sudo add-apt-repository --remove ppa:janvitus/gnomestracciatella # Get rid of any earlier attempts. sudo rm -rf evolution-ews evolution-ews*.deb # Obtain the source. git clone http://git.gnome.org/browse/evolution-ews -b gnome-3-4 # Remove some blocking issues in the build configuration. sed '/-Wall/ a \ t-Wno-error=deprecated-declarations \ t-Wno-missing-field-initializers' evolution-ews/configure.ac | \ sed '/AC_SUBST(SOUP_CFLAGS)/ i \ AC_CHECK_LIB(gthread-2.0, g_thread_init)' > \ evolution-ews/configure.ac.new mv evolution-ews/configure.ac.new evolution-ews/configure.ac cd evolution-ews # Build preliminaries: ./autogen.sh --prefix=/usr --disable-maintainer-mode # Comment these lines if you don't want to create the .deb package file. sudo checkinstall --pkgname=evolution-ews --pkgversion=3.4 \ --pkgrelease=git --requires "evolution (>= 3.4), evolution (<<3.5)" sudo mv *.deb .. # Comment these lines if you don't want to install evolution-ews. make sudo make install cd ..
Launch and Setup
When you first launch Evolution, you will be prompted to set up a user. In the Receiving Email section, set the following items:
- Server Type: Exchange web Services
- User name: [the name on your account]
- Authentication Type: Password
Then click Fetch URL to obtain the Host URL and OAB URL. These should populate automatically with URLs for the Exchange Server webmail host if your company DNS entries are correctly set up. Then continue on to finish the setup.
Possible Issues
If you have an preexisting Evolution installation with a configured user account and try to change that account to use Exchange Web Services, then you'll find that this may or may not work: the account editing pages may exhibit strange behavior or simply fail to work. You can work around this by deleting the local account configuration and recreating it from scratch.