Cannot send emails: The reported error was "Could not send message: WriteStream: MAPI error MAPI_E_CALL_FAILED (0x80004005) occurred".

Bug #1073991 reported by juri on 2012-11-01
This bug affects 28 people
Affects Status Importance Assigned to Milestone
openchange (Debian)
Fix Released
openchange (Ubuntu)
Jelmer Vernooij

Bug Description

Package: evolution-mapi
Status: install ok installed
Priority: optional
Section: gnome
Installed-Size: 1841
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Version: 3.6.0-0ubuntu1
Depends: libc6 (>= 2.4), libcamel-1.2-40 (>= 3.5.91), libebackend-1.2-5 (>= 3.5.91), libebook-1.2-14 (>= 3.5.91), libecal-1.2-15 (>= 3.5.91), libedata-book-1.2-15 (>= 3.5.91), libedata-cal-1.2-18 (>= 3.5.91), libedataserver-1.2-17 (>= 3.5.91), libedataserverui-3.0-4 (>= 3.5.91), libevolution (>= 3.6), libevolution (<< 3.7), libexchangemapi-1.0-0 (>= 3.5.90), libexchangemapi-1.0-0 (<< 3.7), libglib2.0-0 (>= 2.32.0), libgtk-3-0 (>= 3.0.0), libical0 (>= 0.42), libmapi0, libpango1.0-0 (>= 1.14.0), libtalloc2 (>= 2.0.4~git20101213), evolution (>= 3.6), evolution (<< 3.8)
Enhances: evolution
Description: Exchange support for the Evolution groupware suite
 The Evolution MAPI provider adds support for Microsoft Exchange,
 including Exchange 2007, to the Evolution groupware suite, using the
 proprietary MAPI protocol.
 Unlike the Exchange connector (in the evolution-exchange package), it
 does not use Outlook Web Access and requires direct access to the
 Exchange server.
Original-Maintainer: Debian Evolution Maintainers <email address hidden>


When trying to send message in HTML format is gives this error:
The reported error was "Could not send message: WriteStream: MAPI error MAPI_E_CALL_FAILED (0x80004005) occurred".

Only short messages in plain text could be sent.

juri (eng-juri) wrote :

Bug description:
  Using version Dev Ubuntu 12.10.

  1- Confugure Evolution using exchange mapi server through mapi plugin
  2- Email reception ok
  3- Edit new email
  4- Try to send
  5- The reported error was "Impossible d'envoyer le message : WriteStream :
Error MAPI MAPI_E_CALL_FAILED (0x80004005)".

juri (eng-juri) wrote :

error just after a 12.10 upgrade.

Found that mails below some limit (like 800-1000 plain ASCII
chars) send OK, but longer ones fail, even if the mail is still plain

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in evolution-mapi (Ubuntu):
status: New → Confirmed (osbornab) wrote :

happens to me as well when trying to send a message in HTML.

The reported error was "Could not send message: WriteStream: MAPI error MAPI_E_CALL_FAILED (0x80004005) occurred". (osbornab) wrote :

See this thread:

An issue with openchange.

Jelmer Vernooij (jelmer) on 2012-11-08
affects: evolution-mapi (Ubuntu) → openchange (Ubuntu)
Changed in openchange (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer) wrote :

I've uploaded a fix for this to Debian that should make it into Ubuntu raring at some point.

Changed in openchange (Debian):
status: Unknown → Confirmed
juri (eng-juri) wrote :

Finally good news.

Waiting for solution....

Jelmer Vernooij (jelmer) wrote :

This bug was fixed in the package openchange - 1:1.0-3

openchange (1:1.0-3) unstable; urgency=medium

  * Add 04_ndr_noalign: Fix handling of non-small emails. Closes: #692727

 -- Jelmer Vernooij <email address hidden> Thu, 08 Nov 2012 15:47:54 +0100

Changed in openchange (Ubuntu):
status: Triaged → Fix Released
juri (eng-juri) wrote :
Download full text (12.5 KiB)

Hash: SHA1

Please unblock package openchange

The latest version in unstable (1:1.0-3) fixes Debian bug 692727, which
renders the package unusable for sending email when used with newer
versions of Samba 4.

Debdiff for 1:1.0-3 since 1:1.0-2, which is currently in wheezy:

diff -Nru openchange-1.0/debian/changelog openchange-1.0/debian/changelog
- --- openchange-1.0/debian/changelog 2012-04-12 03:46:23.000000000 +0200
+++ openchange-1.0/debian/changelog 2012-11-08 16:05:18.000000000 +0100
@@ -1,3 +1,9 @@
+openchange (1:1.0-3) unstable; urgency=medium
+ * Add 04_ndr_noalign: Fix handling of non-small emails. Closes: #692727
+ -- Jelmer Vernooij <email address hidden> Thu, 08 Nov 2012 15:47:54 +0100
 openchange (1:1.0-2) unstable; urgency=low

   * Remove unnecessary links.
diff -Nru openchange-1.0/debian/patches/04_ndr_noalign
- --- openchange-1.0/debian/patches/04_ndr_noalign 1970-01-01
01:00:00.000000000 +0100
+++ openchange-1.0/debian/patches/04_ndr_noalign 2012-11-08
15:54:56.000000000 +0100
@@ -0,0 +1,196 @@
+Description: Force use of NDR_NOALIGN, fixes support for non-small emails.
+Author: Milan Crha
+Status: submitted upstream
+Index: exchange.idl
+--- old/exchange.idl (revision 4004)
++++ new/exchange.idl (working copy)
+@@ -1039,7 +1039,7 @@
+ [case(ActionType_OP_COPY)] MoveCopy_Action
+ [case(ActionType_OP_REPLY)] ReplyOOF_Action
+ [case(ActionType_OP_OOF_REPLY)] ReplyOOF_Action
+- [case(ActionType_OP_DEFER_ACTION)][flag(NDR_REMAINING)]
DATA_BLOB DeferAction;
+ [case(ActionType_OP_BOUNCE)] BounceCode
+ [case(ActionType_OP_TAG)] mapi_SPropValue_wrap
+ [case(ActionType_OP_FORWARD)] ForwardDelegate_Action
+@@ -1057,7 +1057,7 @@
+ typedef [flag(NDR_NOALIGN)] struct {
+ uint16 ActionLength;
ActionBlockData ActionBlockData;
ActionBlockData ActionBlockData;
+ } ActionBlock;
+ typedef [flag(NDR_NOALIGN)] struct {
+@@ -1095,7 +1095,7 @@
+ typedef [public,flag(NDR_NOALIGN)] struct {
+ uint16 cValues;
+- [flag(NDR_REMAINING)]mapi_SPropValue lpProps[cValues];
++ [flag(NDR_REMAINING|NDR_NOALIGN)]mapi_SPropValue
+ } mapi_SPropValue_array;
+ typedef [flag(NDR_NOALIGN)] struct {
+@@ -1281,7 +1281,7 @@
+ // T...

juri (eng-juri) wrote :

can we use Debian package until UBUNTU will release the patch?

Hash: SHA1

Format: 3.0 (quilt)
Source: openchange
Binary: libmapi0, libmapi-dev, libmapipp-dev, libmapipp0, libocpf0, libocpf-dev, openchangeclient, openchangeserver, openchangeserver-dev, openchangeproxy, libmapiadmin0, libmapiadmin-dev, libmapiproxy0, libmapiproxy-dev, libmapistore0, libmapistore-dev
Architecture: any
Version: 1:1.0-2
Maintainer: Debian Samba Maintainers <email address hidden>
Uploaders: Jelmer Vernooij <email address hidden>
Standards-Version: 3.9.3
Build-Depends: autoconf, automake, bison, debhelper (>> 8.1.3), doxygen, flex, libboost-thread-dev, libdcerpc-dev (>= 4.0.0~alpha18), libdcerpc-server-dev (>= 4.0.0~alpha18), libical-dev, libldb-dev, libmagic-dev, libndr-standard-dev (>= 4.0.0~alpha18), libparse-pidl-perl (>= 4.0.0~alpha19), libpopt-dev, libsamba-hostconfig-dev (>= 4.0.0~alpha18), libsamba-credentials-dev (>= 4.0.0~alpha18), libsamdb-dev (>= 4.0.0~alpha18~), libsqlite3-dev, libsubunit-dev, libtalloc-dev, libtevent-dev (>= 0.9.9~), libtorture-dev, pkg-config, python-dev (>= 2.6.6-3), python-samba (>= 4.0.0~alpha18), samba4-dev (>= 4.0.0~alpha18), zlib1g-dev
 libmapi-dev deb libdevel optional
 libmapi0 deb libs optional
 libmapiadmin-dev deb libdevel optional
 libmapiadmin0 deb libs optional
 libmapipp-dev deb libdevel optional
 libmapipp0 deb libs optional
 libmapiproxy-dev deb libdevel optional
 libmapiproxy0 deb libs optional
 libmapistore-dev deb libdevel optional
 libmapistore0 deb libs optional
 libocpf-dev deb libdevel optional
 libocpf0 deb libs optional
 openchangeclient deb net optional
 openchangeproxy deb net optional
 openchangeserver deb net optional
 openchangeserver-dev deb net optional
 ef4044ae5a44eaf4201c4dd0a0ac090d4067daaf 1979219 openchange_1.0.orig.tar.gz
 063ffbd8dd126bb69e906d64eb1354a11223b2ef 8053 openchange_1.0-2.debian.tar.gz
 f18c1fdb0dec10ea6a469cb7be5fc24010a44d8c5de42a23da5b0c864f343bb4 1979219 openchange_1.0.orig.tar.gz
 d812baa552d931500f94058b2b3b96b059e5a312b870d25e8c28235773db7030 8053 openchange_1.0-2.debian.tar.gz
 9b57a325e90e5ad3a702ddc6e8762ab6 1979219 openchange_1.0.orig.tar.gz
 863fbc5944492240bff6f201324fceda 8053 openchange_1.0-2.debian.tar.gz

Version: GnuPG v1.4.12 (GNU/Linux)


juri (eng-juri) wrote :

I did patch OPENCHANGE and i tested it.

Use this package with Debian or Ubuntu.

thank you

Jelmer Vernooij (jelmer) wrote :

juri, this bug is fixed in raring only so far.

A SRU is necessary for it to land in quantal as well.

Changed in openchange (Ubuntu Quantal):
status: New → Triaged
importance: Undecided → High
juri (eng-juri) wrote :

I have patched and builded openchange so you can fis this issue just by updating the package.

Changed in openchange (Debian):
status: Confirmed → Fix Released
BartS (bart-steanes) wrote :

Juri, any chance of either build instructions, or i386 versions of these packages (I use AMD C-50 based tablet so I have to run 32 bit executables).
NOTE: In my case the only packages I have installed are libmapi0, and libmapi-dev.
NOTE2: I suspect that the only reasons I have libmapi dev was a side effect of trying to fix the problem.

Geoff Goehle (goehle) wrote :

Hey, so I've been waiting for the fix to this to float downstream but eventually I got tired....

So if you want to apply the fix manually just go to and download libmapi0 (for your correct architecture) using the links at the bottom of the page and install the package manually.


BartS (bart-steanes) wrote :

Thank you so much.

Ted (artisdom) wrote :

thanks, it works.

+1 Geoff Goehle (goehle)! (you just saved my morning :) )

guerlloy (carlos-guerlloy) wrote :

Thank a lot, it worked

DJ (ke7mbz) wrote :

Worked for me too. Thanks.

Manuel Nuñez (yo-elmanu) wrote :

Thanks! it works.

Hassaan (kh-iftikhar) wrote :

goehle: Thank you very much. I'm back in love with evolution :)

kmcphillips (kmcphillips) wrote :

Installing the libmapi0 package downloaded from fixed the issue.
Thank you.

Cameron Smith (cameron-smith) wrote :

I had this problem on Ubuntu 12.10 using evolution 3.6.0-0ubuntu3, with libmapi0 1.0-2.

Installing libmapi0 1.0-4 from the link mention in post #24 above solved the problem. Pleasantly, I just did a straight install over the top of the existing version, via dpkg -i, there were no dependency problems.

It [post#24] works for me as well. Thanks a lot.

tags: added: verification-done
amias (amias) wrote :

quite suprised to see a year on your patch is still required -

from the standard repos i had


these had that error and then i downloaded and installed your libmapi0 package and it seems to work again.

plz to get this in the main repo so more people can use ubuntu at work k thnx bye

Rolf Leggewie (r0lf) wrote :

quantal has seen the end of its life and is no longer receiving any updates. Marking the quantal task for this ticket as "Won't Fix".

Changed in openchange (Ubuntu Quantal):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.