GNOME Bugzilla – Bug 700885
Message size is 0 when downloading for offline
Last modified: 2013-08-06 09:39:04 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.
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
Unfortunately, that property is not there... :(
Created attachment 247875 [details] Evolution log Here is the log from Evolution...
Thanks for the update. I see it's really not there, interesting. Do you know what exchange server version you connect to, please?
It should be Exchange 2010. Not sure about Service Packs... OWA says: Mailbox server Microsoft Exchange version: 14.3.123.0
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).
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). :(
(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.
> 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.
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.
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.
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.
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.
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.
Created commit b7bb5af in ema master (3.9.90+) Created commit 413e961 in ema gnome-3-8 (3.8.5+)