Andrew Jones

Wednesday May 12, 2010

Evolution, Evolution-MAPI, and Exchange 2010

The Problem

Exchange 2010 requires encrypted RPC. As a result, the versions of Evolution and Evolution-MAPI in Debian Unstable and Ubuntu can't support Exchange 2010. When one attempts to authenticate to a 2010 host, the result is the error "MAPI_E_LOGON_FAILED".

Only the newest version of libmapi, 0.9, supports the necessary encryption. I decided to build my own packages in order to get libmapi 0.9.

The Solution

Updating libmapi to 0.9 gets me Exchange 2010 support, but it meant building new packages for Samba 4 (alpha 11), Evolution (2.31.1), gnome-pilot (2.0.17) and Evolution-mapi (0.31.1).

Unfortunately, out of the box, Evolution-MAPI 0.31 still doesn't handle adding the encryption flag to accounts' MAPI profiles. A short patch was required in order to force the "seal: true" attribute to be added when it creates the MAPI profile:

./src/libexchangemapi/exchange-mapi-connection.c
2010-05-12 18:39:32.000000000 -0400
@@ -3325,6 +3325,9 @@
        mapi_profile_add_string_attr(profname, "workstation", workstation);
        mapi_profile_add_string_attr(profname, "domain", domain);

+       /* HACK HACK HACK */
+       mapi_profile_add_string_attr(profname, "seal", "true");
+
        /* This is only convenient here and should be replaced at some point */
        mapi_profile_add_string_attr(profname, "codepage", "0x4e4");
        mapi_profile_add_string_attr(profname, "language", "0x409");

Important note: the Exchange 2010-required encryption is hardcoded on new MAPI accounts created with these packages. I'm not sure whether newly-created accounts will work with Exchange 2007!

The Packages

2010-Jan-22: I have removed the pre-compiled packages. Debian, Ubuntu, and Evolution have all moved too far for them to be useful to anyone. The above patch should still work. See the note on ldbedit for how to configure an account after patching Evolution.

The first thing to understand is that these packages are alpha- and beta-quality software. It's a preview release of evolution, an alpha of samba, a beta of libmapi, etc. There will be bugs.

The second thing to keep in mind is that I am not a DD, and my packaging work is not of high quality. Use these packages AT YOUR OWN RISK. I will not be responsible if they nuke your mailbox, trash your system, ruin your fileserver, etc. I would STRONGLY RECOMMEND purging them before upgrading your system -- I can't guarantee that the official debian/ubuntu packages will make a clean upgrade!

With that warning, if you would still like to use them, add this line to your /etc/apt/sources.list

# Evolution packages
deb http://www.jones.ec/debian/evolution sid main
These packages should probably work correctly on Debian Unstable (sid), Ubuntu 10.04 ("Lucid"), or Ubuntu 10.10 ("Maverick"). I only built x86 versions because I only have x86 Debian systems at home and at work. Don't ask me for x64 copies.

After adding to sources.list, installation is straightforward:

sudo apt-get update

sudo apt-get -t sid install evolution evolution-common \
evolution-plugins evolution-plugins-experimental \
libevolution libevolution evolution-data-server \
evolution-data-server-common libcamel1.2-15 \
libebackend1.2-0 libebook1.2-9 libecal1.2-7 \
libedata-book1.2-2 libedata-cal1.2-7 \
libedataserver1.2-11 libedataserverui1.2-8 \
libegroupwise1.2-13 libgdata7 libmapi0 \
libdcerpc0 

After you've installed the newest evolution/libmapi/evolution-mapi, if you have an existing Evolution MAPI account configured, you can use this procedure to add the "Seal: true" attribute for Exchange 2010 encryption. A fellow on gimpnet #evo-mapi, kerihuel, helped me out on this one:

  1. Shut down evolution and evolution-data-server, forcibly if necessary. Evolution-data-server runs in the backround even when evolution is not running! (Easiest way to force kill: killall -9 `pgrep evolution`)

  2. Run ldbedit -H ~/.evolution/mapi_profiles.ldb

  3. Within the profile LDB entry, append:
    seal: true

  4. Save, quit and re-run evolution
Comments:

[Trackback] Table of Contents Introduction The purpose of this page is to get some thoughts and discussion going about an email solution for HGPS that suits all employees. HGPS employees consist of Windows and Linux users based world wide,...

Posted by Confluence: Information Systems Management on December 08, 2010 at 11:50 PM EST #

I create evolution-mapi_0.30.3-1_i386.deb libexchangemapi-1.0-0_0.30.3-1_i386.deb it`s enough for work in maverick. Link for Download: http://bit.ly/fYNQfY P.S. I have strange bug on some PC with segmentation faulth if use DNS instead IP address in server name. =(

Posted by qk4l on February 21, 2011 at 07:31 AM EST #

does this hack works with ubuntu 11.04?

Posted by Marcel on August 23, 2011 at 06:55 PM EDT #

I tried the manual listed above, and it is not working for me. I am still getting "MAPI_E_LOGON_FAILED". is this enough to enter? ldbedit -H ~/.evolution/mapi_profiles.ldb # editing 1 records # record 1 dn: @BASEINFO sequenceNumber: 1 seal: true distinguishedName: @BASEINFO please help, using 10.04 lucid\

Posted by floorripper on September 25, 2011 at 02:54 PM EDT #

Hello I have added the # Evolution packages deb http://www.jones.ec/debian/evolution sid main to the repositories, but I was not able to download all of the packadges you are writing about. Also I have added the seal: true argument to the # ldbedit -H ~/.evolution/mapi_profiles.ldb file, but I am still getting the same error. do you have any idea please?

Posted by floorripper on September 26, 2011 at 03:33 AM EDT #

I took the packages down, guys -- they were too old to be useful on a modern system. Additional provisos: they would only work without an http/https proxy, direct connect only. No, they will not work on ubuntu 11.anything. The packages are gone.

Posted by Andrew Jones on January 12, 2012 at 04:55 PM EST #

Post a Comment:
  • HTML Syntax: NOT allowed

Calendar

Feeds

Search

Links

Navigation