Bug 827371 - unable to send e-mail with exchange-mapi account in evolution
unable to send e-mail with exchange-mapi account in evolution
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: evolution-mapi (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Matthew Barnes
Fedora Extras Quality Assurance
:
: 741842 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-01 05:18 EDT by Gianluca Cecchi
Modified: 2012-07-10 12:29 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-25 10:00:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
lines before and after ModifyRecipients (142.70 KB, image/png)
2012-06-05 10:44 EDT, Gianluca Cecchi
no flags Details
part after ModifyRecipients (26.97 KB, text/plain)
2012-06-14 16:11 EDT, Gianluca Cecchi
no flags Details
mail accounts mapi config (43.46 KB, image/png)
2012-06-26 09:34 EDT, Gianluca Cecchi
no flags Details
contacs config (57.22 KB, image/png)
2012-06-26 09:34 EDT, Gianluca Cecchi
no flags Details
contacts view eror (52.92 KB, image/png)
2012-06-26 10:06 EDT, Gianluca Cecchi
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Bugzilla 637291 None None None 2012-06-22 11:19:03 EDT

  None (edit)
Description Gianluca Cecchi 2012-06-01 05:18:10 EDT
Description of problem:
unable to send e-mail with exchange-mapi account in evolution

Version-Release number of selected component (if applicable):
evolution-mapi-3.4.1-3.fc17.x86_64


How reproducible:
always

Steps to Reproduce:
1. created exchange mapi account to connect to an exchange 2007 server and set it as my default account
2. I'm able to receive e-mail
3. I'm not able to send e-mail
  
Actual results:
I still see the mail in outbox under "On this computer" tree 
and in the tray I see error icon.
After clicking it, it gives a windows with:

An error occurred while Sending. How do you want to proceed?
The reported error was "Could not send message:
ModifyRecipients: MAPI error MAPI_E_CALL_FAILED (0x80004005) occurred

If I run evolution from terminal, when I click the send button I can't see any particular message:

all I get in terminal at startup of evolution is

$ evolution
Unknown parameter encountered: "max log size"
Ignoring unknown parameter "max log size"
Unknown parameter encountered: "load printers"
Ignoring unknown parameter "load printers"
Unknown parameter encountered: "cups options"
Ignoring unknown parameter "cups options"
Unknown parameter encountered: "writable"
Ignoring unknown parameter "writable"
Unknown parameter encountered: "guest ok"
Ignoring unknown parameter "guest ok"
Unknown parameter encountered: "writable"
Ignoring unknown parameter "writable"


Expected results:
to be able to send e-mail

Additional info:

In Fedora 16 with same config it worked.

In F16 my sw versions involvede were:
evolution-3.2.3-3.fc16.x86_64
evolution-data-server-3.2.3-3.fc16.x86_64
evolution-mapi-3.2.3-1.fc16.x86_64
openchange-0.11-3.fc16.x86_64

At the moment in F17 I have:
openchange-1.0-6.fc17.x86_64
evolution-data-server-3.4.1-2.fc17.x86_64
evolution-3.4.1-2.fc17.x86_64
evolution-mapi-3.4.1-3.fc17.x86_64
Comment 1 Milan Crha 2012-06-01 12:33:32 EDT
Thanks for a bug report. Could you run evolution as:
   $ LIBMAPI_DEBUG=15 evolution &>log.txt
and repeat the send message request, and when it fails to close evolution and examine the log.txt file, namely search for "ModifyRecipients" in it, please? There, some lines above and below, will be shown related information, possibly also why the call failed.

Please note the debug log contains raw communication between client (evolution-mapi) and server, exposing all the private information from server addresses up to user names and passwords in clear and/or encoded form, thus it's not advised to attach whole log into the bug report. You can send the log directly to me, and I'll check whether it contains and will separate only the relevant information from it.
Comment 2 Gianluca Cecchi 2012-06-05 10:43:48 EDT
In the mean time I attach  a screenshot of pre/post lines
Let me know if this could be enough or not...
Comment 3 Gianluca Cecchi 2012-06-05 10:44:33 EDT
Created attachment 589541 [details]
lines before and after ModifyRecipients
Comment 4 Gianluca Cecchi 2012-06-06 06:44:05 EDT
One note is that with same server (Exchange 2007) F16 was working until scratch install of F17 on the same pc seven days ago and replicating settings (I think).
I have a backup of F16 filesystem, so that if there is any readable file I can get to compare it is possible.

Also, it seems autocompletion is not working in F17 in my case.
Yesterday I found this sort of workaround:
click contacts box and search for a name
then compose mail and digit the name you searched for
then you get the completion....
otherwise you don't get any autcompletion
I'm able to receive e-mails from people on exchange
I'm able to send e-mail to external adresses
Often I'm able to send mails to internal adresses (without autocompletion), but sometimes it blocks...

For example right now I can send e-mail to internal address, but when I click the contacts box
I get this error:

Unable to open address book
This address book cannot be opened.  This either means that an incorrect URI was entered, or the server is unreachable.

Yesterday it worked...
Comment 5 Milan Crha 2012-06-08 05:25:35 EDT
Thanks for the screenshot. It shows what client is going to send (Modify) towards the server (I see from it you were composing a message to 7 recipients). If you look below these lines, then there should be a ModifyRecipients response, which shows what the server returned. Instead of screenshot, please paste it as a comment, and in case it'll contain any private information, like email addresses, please remove them from the log.

Regarding the autocomplete: I realized only recently that servers doesn't do complicated searches and simply rejects with MAPI_E_TOO_COMPLEX. That's very pity, because evolution-mapi tries to transform exact search term from evolution to MAPI structures, but server rejects to operate with it.

With respect of "Unable to open", it used to show the error below this generic message too, at least if provided by the backend. Is there any such detailed error, please? And which addressbook do you have selected? (Contacts or Global Address List).
Comment 6 Canyon Bliss 2012-06-14 15:27:52 EDT
I'm experiencing this issue as well. Could this issue be related to really long email addresses? I'm able to send mail but not to these customers. They have email address that is a total of 35 and 37 characters, respectively.

I believe this is the response following ModifyRecipents

ntlmssp_seal_data: seal
../librpc/rpc/dcerpc_util.c:140: auth_pad_length 12
ntlmssp_unseal_packet: seal
ntlmssp_check_packet: NTLMSSP signature OK !
ndr_pull_error(11): Pull bytes 42811 (../librpc/ndr/ndr.c:562)
Unable to ndr_pull structure for EcDoRpc - NT_STATUS_BUFFER_TOO_SMALL
     EcDoRpc: struct EcDoRpc
        in: struct EcDoRpc
            handle                   : *
                handle: struct policy_handle
                    handle_type              : 0x00000000 (0)
                    uuid                     : c705538b-4078-4d99-9500-2a8fffaf5482
            size                     : 0x00007fff (32767)
            offset                   : 0x00000000 (0)
            mapi_request             : *
                mapi_len                 : 0x00000009 (9)
                length                   : 0x0005 (5)
                    mapi_request: struct EcDoRpc_MAPI_REQ
                        opnum                    : 0x01 (1)
                        logon_id                 : 0x00 (0)
                        handle_idx               : 0x00 (0)
                        u                        : union EcDoRpc_MAPI_REQ_UNION(case 1)
                        mapi_Release: struct Release_req
                    mapi_request             : (handles) number=1
                        handle                   : 0x0000005f (95)
                length                   : *
                    length                   : 0x0009 (9)
                max_data                 : 0x7fff (32767)

Please let me know if you need more/different information. I'll keep the log files for a bit. I'd attach them if I didn't have to remove private information.
Comment 7 Gianluca Cecchi 2012-06-14 16:11:27 EDT
Created attachment 591920 [details]
part after ModifyRecipients

Here attached is the part after ModifyRecipients.
Hoe the error is there.
It seems perhaps

ntlmssp_seal_data: seal
../librpc/rpc/dcerpc_util.c:140: auth_pad_length 8
ntlmssp_unseal_packet: seal
ntlmssp_check_packet: NTLMSSP signature OK !
ndr_pull_error(11): Pull bytes 40967 (../librpc/ndr/ndr.c:562)
Unable to ndr_pull structure for EcDoRpc - NT_STATUS_BUFFER_TOO_SMALL
     EcDoRpc: struct EcDoRpc


see the file
Comment 8 Gianluca Cecchi 2012-06-15 03:41:57 EDT
For the autocompletion: I had selected in Preferences -> Contacts 
On this computer ---> Personal
On Mapi account ---> both Contacts and GAL

Tried to keep selected only GAL but no way...
What should I try?
Comment 9 Gianluca Cecchi 2012-06-21 10:11:24 EDT
any news?
It seems to me that when I have to send e-mail to single person addresses (internal exchange or external ones), it works ok.
When between the recipients there is a group, I get the error.
And it happens only when replying to e-mails containing distribution adresses between the recipient.
Trying to compose a new e-mail for a distribution group, it works...
Comment 10 Milan Crha 2012-06-22 10:55:48 EDT
I'm sorry for delay, I got disturbed by other work. To summarize, we have two possibilities here:
a) too long addresses (probably just a coincidence)
b) replying to distribution lists

I'll test both with my servers in the beginning of the next week and I'll update this bug report with my findings.
Comment 11 Milan Crha 2012-06-22 11:19:03 EDT
Just a note, there is an upstream bug for this [1], and I would prefer to move there, to not duplicate the effort and gathered information.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=637291
Comment 12 Milan Crha 2012-06-25 09:15:58 EDT
I tested this and I can reproduce it too. I see it when I try to send a message to two persons, one set in To:, as an outer recipient, second in CC:, myself, both autocompleted (the outer is autocompleted from a local address book). I also see that:
   ndr_pull_error(11): Pull bytes 42131 (../librpc/ndr/ndr.c:562)
   Unable to ndr_pull structure for EcDoRpc - NT_STATUS_BUFFER_TOO_SMALL
when doing this, while if I write only to one of them, in To, then this error isn't shown in the log, thus the MAPI_E_CALL_FAILED seems to be an issue in samba4 or openchange, not an error returned from the server.
Comment 13 Gianluca Cecchi 2012-06-25 09:22:53 EDT
Are you going to forward this bug to openchange/samba4, or do I have begin any action?
Any progress about autocompletion (see your commnt#5 and my replies)?
Without being able to autocomplete against GAL, in my case evolution as mail client is quite unusable as I 99% send e-mail to gal users....
Thanks,
Gianluca
Comment 14 Milan Crha 2012-06-25 09:51:14 EDT
I found OpenChange bug report here [1], I'll try what Brad suggests there within evolution-mapi and see. I suppose the same happens with the upstream bug report, thus I'm moving there with the same information too.

Thanks for your help with debugging this issue.

[1] http://tracker.openchange.org/issues/343
Comment 15 Milan Crha 2012-06-25 10:00:51 EDT
(In reply to comment #13)
> Are you going to forward this bug to openchange/samba4, or do I have begin
> any action?

(see above, we clashed on comments) :)

> Any progress about autocompletion (see your commnt#5 and my replies)?
> Without being able to autocomplete against GAL, in my case evolution as mail
> client is quite unusable as I 99% send e-mail to gal users....

I made fixes in evolution-mapi-3.4.3 for GAL searching, I suggest to update to that version. I forgot to write a comment about it there, I'm sorry. It's this [1] upstream bug.

If you use GAL (almost) exclusively, then I guess it will be better for you to cache it locally. The preselected option is to search GAL on demand, with partial results (up to 50 contacts will be fetched on each search request only). Go to Contacts view, right click above "Global Address List" from your MAPI account and select Properties, in the window check "Copy content locally for offline operation", and the next start (it, unfortunately, requires restart of evolution-addressbook-factory) will cache your GAL. You can watch its progress when you open Contacts view and just select GAL in there. It'll show "Searching for contacts" when it connects to your Exchange server and at the status bar will be shown how many contacts left for the download. Having GAL cached locally will make quicker results of searching too. The only disadvantage is that the initial download takes its time.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=677684
Comment 16 Fedora Update System 2012-06-25 14:31:17 EDT
evolution-mapi-3.4.3-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/evolution-mapi-3.4.3-2.fc17
Comment 17 Milan Crha 2012-06-25 14:32:59 EDT
The above update is for the ModifyRecipients error. I'll appreciate if you could give it a try, to see whether you are facing the same issue as I did.
Comment 18 Canyon Bliss 2012-06-25 14:57:38 EDT
I tried evolution-mapi-3.4.3-2.fc17 and I'm still unable to send mail. Consequently, I receive a different error "Could not send message: OpenStream: Permission denied". Therefore, filed a separate bug835178 .
Comment 19 Gianluca Cecchi 2012-06-26 09:10:56 EDT
wow, first time I can send an e-mail to an address list ...
This with evolution-mapi-3.4.3-2.fc17.x86_64.
Also tried this morning evolution-mapi-3.4.3-1.fc17.x86_64 and it didn't work
recipeint lists composed by

to: name1
cc: name2, name3, name4, name5, distribution list

all names and distribution are inside Exchange organization

I'm going to try other combinations of recipeints... and the gal suggestions
Comment 20 Gianluca Cecchi 2012-06-26 09:33:29 EDT
first time I can send an e-mail to an address list ... I meant with f17...

The Gal doesn't work. I'm going to attach my current config for mail/contacts.
Then I'll try with th elocal sync...
Comment 21 Gianluca Cecchi 2012-06-26 09:34:05 EDT
Created attachment 594480 [details]
mail accounts mapi config
Comment 22 Gianluca Cecchi 2012-06-26 09:34:28 EDT
Created attachment 594481 [details]
contacs config
Comment 23 Gianluca Cecchi 2012-06-26 09:41:33 EDT
One strange thing happens, I presume with both today used evolution-mapi-3.4.3-1.fc17.x86_64 and evolution-mapi-3.4.3-2.fc17.x86_64

The "Date" column in Exchange "Sent Items" is 2 hours ahead ...

Suppose now we are at 15:00.
I send an e-mail from evolution mapi account and I go in Exchange sent items I see 17:00.

Another test is: connect with owa with firefox. Send an e-mail from owa (suppose 15:05).
In owa sent items time is ok.
I then go in evolution that in the mean time has syncronized and shows the same message with time 17:05..

Did anything change in locale from
Jun 11 21:48:02 Updated: evolution-mapi-3.4.2-1.fc17.x86_64

to
Jun 26 09:56:51 Updated: evolution-mapi-3.4.3-1.fc17.x86_64

Jun 26 14:55:59 Updated: evolution-mapi-3.4.3-2.fc17.x86_64
?
Comment 24 Gianluca Cecchi 2012-06-26 10:06:06 EDT
Created attachment 594489 [details]
contacts view eror

Before applying your GAL proposed settings for caching internally, I presume I would be ale to open GAL.. correct?
Instead it seems I get this error when I go to contats view...
Comment 25 Gianluca Cecchi 2012-06-26 12:00:13 EDT
To let understand better my comment#23 :
suppose form evolution I send an e-mail to a distribution list of which I am a component.
As soon as I send the e-mail, I get it both in my inbox folder (a) and my sent items folder (b).
(a) item has the right value in "date" column
(b) item has an incorrect value in "date" column (2 hours ahead)
Comment 26 Milan Crha 2012-06-27 08:54:48 EDT
*** Bug 741842 has been marked as a duplicate of this bug. ***
Comment 27 Milan Crha 2012-06-27 09:29:17 EDT
(In reply to comment #25)
> To let understand better my comment#23 :
> suppose form evolution I send an e-mail to a distribution list of which I am
> a component.
> As soon as I send the e-mail, I get it both in my inbox folder (a) and my
> sent items folder (b).
> (a) item has the right value in "date" column
> (b) item has an incorrect value in "date" column (2 hours ahead)

Could you open a new bug report in Gnome's bugzilla [1], please? I'm not going to fix everything in this bug report.

[1] https://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-mapi


(In reply to comment #24)
> Before applying your GAL proposed settings for caching internally, I presume
> I would be ale to open GAL.. correct?
> Instead it seems I get this error when I go to contats view...

Correct, the GAL should work too. I think this is bug #828321, or some kind of variation of it.
Comment 28 Gianluca Cecchi 2012-06-28 06:29:27 EDT
For Sent Items date bug I opened https://bugzilla.gnome.org/show_bug.cgi?id=679041
Comment 29 Fedora Update System 2012-07-10 12:29:35 EDT
evolution-mapi-3.4.3-5.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.