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 700885 - Message size is 0 when downloading for offline
Message size is 0 when downloading for offline
Status: RESOLVED FIXED
Product: evolution-mapi
Classification: Applications
Component: Mail
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: evolution-mapi-maint
evolution-mapi-maint
Depends on:
Blocks:
 
 
Reported: 2013-05-23 12:19 UTC by Richard Bukovansky
Modified: 2013-08-06 09:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0 bytes size of e-mails for evolution-mapi (36.55 KB, image/png)
2013-05-23 12:19 UTC, Richard Bukovansky
  Details
Evolution log (130.77 KB, text/x-log)
2013-06-27 07:09 UTC, Richard Bukovansky
  Details
ema patch (6.43 KB, patch)
2013-08-06 09:34 UTC, Milan Crha
committed Details | Review

Description Richard Bukovansky 2013-05-23 12:19:05 UTC
Created attachment 245120 [details]
0 bytes size of e-mails for evolution-mapi

When I add the size column to my e-mails list, it always shows 0 bytes.

Gmail account that uses IMAP connector is showing correct size.

Not sure if it's limitation of OpenExchange MAPI implementation or any other bug.

Screenshot attached.
Comment 1 Milan Crha 2013-06-04 19:05:59 UTC
Thanks for a bug report. You are right, there was such bug in evolution-mapi. This is fixed since 3.3.5, with commit [1], but as you use 3.6.x you have the commit there. I checked with my folder summary and I have shown message sizes there.

There is one possibility, the message size is properly set only on newly downloaded message, thus I'm wondering whether all those zeros are for old messages, from some previous version of evolution-mapi (pre 3.4.0, as they are from year 2011), and newly downloaded/recognized messages has the size populated as expected?

If not, could you run evolution from console like this:
   $ MAPI_DEBUG=1 evolution

then send a message to yourself, invoke refresh and check whether the message size was properly recognized, and if not, then see the console for its output, which should show you list of properties received for a message, among other things. One of the properties should be PidTagMessageSize, where is stored size of the message.

[1] https://git.gnome.org/browse/evolution-mapi/commit/?h=gnome-3-6&id=1a541503
Comment 2 Richard Bukovansky 2013-06-27 07:07:17 UTC
Unfortunately, that property is not there... :(
Comment 3 Richard Bukovansky 2013-06-27 07:09:00 UTC
Created attachment 247875 [details]
Evolution log

Here is the log from Evolution...
Comment 4 Milan Crha 2013-06-27 14:47:49 UTC
Thanks for the update. I see it's really not there, interesting. Do you know what exchange server version you connect to, please?
Comment 5 Richard Bukovansky 2013-06-27 14:58:10 UTC
It should be Exchange 2010. Not sure about Service Packs...

OWA says:

Mailbox server Microsoft Exchange version:	14.3.123.0
Comment 6 Milan Crha 2013-06-28 07:55:44 UTC
I see, I suppose it's 2010 with some service packs, mine 2010 server claims slightly lower version. I just tried and mine exchange server reports message sizes properly, I see them in the message list. It's with evolution-mapi-3.8.x, I let it download message summary again in one of my folders.

Maybe give a try to evolution-ews, which works with 2007 server, or newer, while with newer you get more working functions (the server didn't support everything from the beginning).
Comment 7 Richard Bukovansky 2013-07-04 09:42:33 UTC
I have given EWS chance already... Not working (Fedora 19/Evo 3.8.3 - account addition went fine, but Evolution is behaving like there is not EWS account) or crashing my Evolution (LM14 / Evo 3.6.2). :(
Comment 8 Milan Crha 2013-07-04 13:41:34 UTC
(In reply to comment #7)
> I have given EWS chance already... Not working (Fedora 19/Evo 3.8.3 - account
> addition went fine, but Evolution is behaving like there is not EWS account) or
> crashing my Evolution (LM14 / Evo 3.6.2). :(

Weird, it works for me flawlessly (Fedora 19). Did you enter the account directly in evolution? I would do that. Also run evolution from a console, that way you may see what it tries to do (and what might fail). If you want even more to be shown, then run evolution from the console like this:
   $ EWS_DEBUG=2 evolution
but in any case, you should see at least the account name in the folder tree on the left of the Mail view, with it's arrow to expand it, once the account is configured.
Comment 9 Richard Bukovansky 2013-07-11 10:06:13 UTC
> Did you enter the account directly in evolution?

Yup. I always do that...

> you should see at least the account name in the folder tree on the left of the
> Mail view, with it's arrow to expand it, once the account is configured.

Which actually never happens. That account is simply not added to list of my accounts.
Comment 10 Milan Crha 2013-08-06 05:36:28 UTC
Back to the message size, I see the problem now, it's there only if I have set to "Copy messages for offline use" in evolution for the MAPI account or folder. I'll fix it.
Comment 11 Richard Bukovansky 2013-08-06 07:18:13 UTC
So, you are saying that message size shows up when I check this option for folders in my Exchange account?

BTW Where I can find this option in MAPI account settings? I can't find it. Thanks.
Comment 12 Milan Crha 2013-08-06 07:51:12 UTC
Nope, it's the opposite. Having checked the option, the message size is 0, not having checked it, the message size is properly shown. Note it'll work only for newly received messages, because this information is downloaded only once. The option is in Edit->Preferences->mail Accounts-><MAPI account->Edit->Receiving Options->[ ] Automatically synchronize account locally; it's for the whole account, but when you right-click folder name, then you get a context menu with "Properties" on the folder, which also let's you "[ ] Copy folder content locally for offline operation".

I guess you face this issue, because that's currently the only way I managed to reproduce the message 0-size issue.
Comment 13 Richard Bukovansky 2013-08-06 08:06:17 UTC
Ah, I see. Yup, I have this checked in my MAPI account settings.

And yes, when I have unchecked this option and sent e-mail to myself, the size is shown.
Comment 14 Milan Crha 2013-08-06 09:34:51 UTC
Created attachment 250947 [details] [review]
ema patch

for evolution-mapi;

This fixes the issue. The property was not downloaded during the fast transfer of the object, thus it was required to be downloaded separately. The other problem was that the property for the message size was not checked anyway, when using fast transfer (for offline download), thus it required a fix as well. As a fallback, I added message size calculation from the transformed message. Due to the transformation (from MAPI properties to Camel's MIME object), the message size doesn't match the one stored on the server, it's smaller in MIME, but I do not think it's an issue, because during my tests the fallback code was not triggered at all.
Comment 15 Milan Crha 2013-08-06 09:39:04 UTC
Created commit b7bb5af in ema master (3.9.90+)
Created commit 413e961 in ema gnome-3-8 (3.8.5+)