After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 613147 - Recipients should not be discarded
Recipients should not be discarded
Status: RESOLVED FIXED
Product: evolution-mapi
Classification: Applications
Component: Mail
0.30.x
Other Linux
: Normal normal
: ---
Assigned To: Milan Crha
evolution-mapi-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-17 13:41 UTC by Oded Arbel
Modified: 2011-05-06 07:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot showing a similar issue (185.61 KB, image/png)
2010-04-07 09:00 UTC, Oded Arbel
  Details
proposed ema patch (5.87 KB, patch)
2011-04-28 11:17 UTC, Milan Crha
committed Details | Review
ema patch ][ (18.97 KB, patch)
2011-05-05 10:02 UTC, Milan Crha
committed Details | Review
ema patch ][ - last resort fallback (1.51 KB, patch)
2011-05-05 14:26 UTC, Milan Crha
committed Details | Review
debug ema patch (1.50 KB, text/plain)
2011-05-06 07:26 UTC, Milan Crha
  Details

Description Oded Arbel 2010-03-17 13:41:36 UTC
Using Evolution MAPI 0.29.91 on Fedora 13, if I compose an e-mail message that contains both local (to the Exchange server) and non-local recipients, the e-mail message is never received by the non-local recipients.

From looking at the arrived message it appears that all non-local recipients were simply stripped from the e-mail: none of their addresses are listed in the To or Cc headers as they should be.

Use case:
1. Start a new message to non-local user <user@somedomain.com>
2. add your own local e-mail address as a BCC (or have "always BCC" setup to your e-mail address).
3. Send the e-mail

Expected results:
You should receive the e-mail back and clearly see the non-local user listed in the To header.

Actual results:
An e-mail is received with no To or Cc headers. If a To or Cc header had contained local users, they would have been listed.

I'm setting this as critical priority as currently I can't do meaningful work using the MAPI connector as a lot of my e-mail is sent to both local and non-local users. This while ignoring the very useful case of using always BCC to myself, which basically preclude any outgoing e-mail from going through.
Comment 1 Oded Arbel 2010-04-07 09:00:25 UTC
Created attachment 158102 [details]
Screenshot showing a similar issue

This bug may or may not related to the fact that when viewing a message - that was sent to both internal and external recipients - in the message viewer, the message viewer's recipient list only shows the local recipients.

This screenshot shows evolution with two windows open showing the same message - the back window is using the MAPI connector while the front window is showing the message using the OWA connector. As can be seen all external recipients (not of taboola.com) that are shown in the front window are missing from the back window.

Also, the time stamps shown for the message are not the same, though this is another bug - probably bug #615037
Comment 2 Oded Arbel 2010-06-08 15:36:49 UTC
Also observed in version 0.30. 

This may or may not be related to the fact that, at least with current 0.30, an e-mail received, where the recipient list contains both Exchange accounts and external accounts (whether in To or CC), only the local Exchange accounts are listed in the viewer when accessing the email through the MAPI connector. 

When using the OWA connector, everything is fine.
Comment 3 Milan Crha 2011-03-15 14:46:28 UTC
Thanks for a bug report. I tried to reproduce this with actual git master (which is just before 2.91.92) and it works correctly there. I would expect also 0.32.2 may work as expected, though it's possible it's related to used openchange version. I'm using openchange svn revision 2377.

Could you retest, please?
Comment 4 Oded Arbel 2011-03-16 08:50:20 UTC
Unfortunately, I no longer use a MAPI connection because my company has moved to "microsoft online" hosted exchange service which does not support MAPI - so I am unable to test this fix.
Comment 5 Milan Crha 2011-04-28 11:17:26 UTC
Created attachment 186811 [details] [review]
proposed ema patch

for evolution-mapi;

Charles Bovy showed me few cases where this is reproducible, and even I cannot reproduce exactly this, then the patch may cover the case. I keep it here for testing by him too. This patch also makes sure that the recipient isn't discarded, but as closes address as possible is added instead.
Comment 6 Charles Bovy 2011-04-28 11:51:04 UTC
Patch works for me. All recipients are shown in received e-mail with both local and non-local recipients.
Comment 7 Milan Crha 2011-04-28 16:17:08 UTC
Thanks a lot for testing this.

Created commit c213472 in ema master (3.1.1+)
Created commit f0907d4 in ema gnome-3-0 (3.0.2+)
Comment 8 Charles Bovy 2011-05-04 17:48:14 UTC
Last commit causes some regression for me.
The To-header is missing for e-mails sent by other e-mail clients than Evolution. The Sent-Items folders is updated, but the To-Header is missing.

When I send an e-mail from Evolution, the correct headers are cached in Sent-Items folder. I'll try to add the debugging patch (with mapidump_SRow) to dump contents.
Comment 9 Milan Crha 2011-05-05 10:02:59 UTC
Created attachment 187267 [details] [review]
ema patch ][

for evolution-mapi;

Oh, strange I didn't notice :-/ Anyway, this patch fixes it for me. It adds one advantage from the previous behaviour too, I guess you'll see that.
Comment 10 Milan Crha 2011-05-05 10:05:06 UTC
Created commit c7b1e94 in ema master (3.1.1+)
Created commit 712adc3 in ema gnome-3-0 (3.0.2+)
Comment 11 Charles Bovy 2011-05-05 12:12:11 UTC
Hmm, doesn't fix it for me.

Use-case: Send an e-mail from OWA to myself. E-mail appears in Evo-MAPI Inbox with not To-headers and also in Sent-Item without To-headers.
Comment 12 Milan Crha 2011-05-05 12:17:38 UTC
That's exactly what I tried, sending a message to myself in OWA. (I added also some recipients to CC, which maybe did a difference.) All this on Exchange 2007 server.
Comment 13 Milan Crha 2011-05-05 12:25:40 UTC
I just tried with exchange 2003 server and works fine, I see the To populate as expected in both folders. I guess the build doesn't work for you for some reason.
Comment 14 Milan Crha 2011-05-05 12:36:56 UTC
Hrm, no, my fault, it doesn't work with 2k3 server (I accidentally used evolution-exchange instead of mapi with my exchange 2003 server, I'm sorry).
Comment 15 Milan Crha 2011-05-05 14:26:27 UTC
Created attachment 187285 [details] [review]
ema patch ][ - last resort fallback

for evolution-mapi;

The 2003 server behaves rather strangely here, because if I add some debugging output to get_recipients function, then I see
> exchange_mapi_util_get_recipients: [1] eml:(null) disp:(null)
>	PR_OBJECT_TYPE: 6
>	PR_RECIPIENT_TYPE: 2
>	PR_INTERNET_CPID: 1200
which is really not enough information to reconstruct recipients. A very raw information is also sent in PR_DISPLAY_TO/_CC/_BCC (this is, by the way, used in message list), which I use as the last resort fallback mode for recipients, if any available doesn't have set at least one of email and display name.

This code might be used really rarely, I would expect only for older servers like 2003. Also the MS specification doesn't mention anything about PR_DISPLAY_TO/... to be used for a reconstruction of message's To/Cc/Bcc headers.
Comment 16 Milan Crha 2011-05-05 14:30:24 UTC
Created commit 307301c in ema master (3.1.1+)
Created commit ffaa230 in ema gnome-3-0 (3.0.2+)
Comment 17 Charles Bovy 2011-05-05 14:55:28 UTC
damn, still no go for me. Can you give me a patch to provide some more debugging?
Comment 18 Milan Crha 2011-05-06 07:26:29 UTC
Created attachment 187342 [details]
debug ema patch

Here you are. Did you erase your local message cache before running evolution with the patch included? It doesn't refetch the message again when it's in downloaded already. If you'll need more debugging, then change that mine "1 &&" to "0 &&" and it'll fetch "all" properties for the message (if you keep it "1 &&", then you'll see only those ema is interested in). Hope that helps.