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 586093 - Text Body larger than 4KB received broken
Text Body larger than 4KB received broken
Status: RESOLVED FIXED
Product: evolution-mapi
Classification: Applications
Component: Mail
0.28.x
Other Linux
: High critical
: ---
Assigned To: evolution-mapi-maint
evolution-mapi-maint
: 583492 591032 602905 608350 616991 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-06-17 08:09 UTC by Akhil Laddha
Modified: 2010-06-09 13:22 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
Sample mbox file (7.89 KB, application/mbox)
2009-06-17 08:12 UTC, Akhil Laddha
  Details
4KB.txt (4.01 KB, text/plain)
2009-08-06 18:20 UTC, Milan Crha
  Details
ema.patch (1.70 KB, text/plain)
2009-08-06 18:50 UTC, Milan Crha
  Details
ecs.txt in UTF-8 (19 bytes, text/plain)
2009-08-06 18:53 UTC, Milan Crha
  Details
ema patch (15.20 KB, patch)
2010-01-29 18:24 UTC, Milan Crha
committed Details | Review

Description Akhil Laddha 2009-06-17 08:09:32 UTC
Evolution 2.27.3 

While composing the mail, i pasted some valgrind logs in message body. At the receiver end, mail is showing Chinese characters in body.
Comment 1 Akhil Laddha 2009-06-17 08:12:12 UTC
Created attachment 136806 [details]
Sample mbox file
Comment 2 Bharath Acharya 2009-06-18 09:23:24 UTC
This should mainly happen with large piece of text being pasted and nothing to do with the traces alone. The problem should be while sending large size plain text mails.
Comment 3 Akhil Laddha 2009-07-28 12:05:52 UTC
*** Bug 583492 has been marked as a duplicate of this bug. ***
Comment 4 Milan Crha 2009-08-06 18:20:44 UTC
Created attachment 140049 [details]
4KB.txt

I wonder why you call 4KB large text file. Anything larger than or equal to 4KB is put into a generic stream, instead of a body stream, in camel-mapi-transport.c::mapi_item_set_body_stream. Then I guess there should be some flag indicating the body is in other place.

I tried the openchangeclient, like this:
openchangeclient -f ~/.evolution/mapi-profiles.ldb -S -t "my-email-address" -P password -s "test 4kb" --html-file ../4kB.txt

and the received message is truncated at 4KB, even I see on console:
> We are about to write 4102 bytes in the stream
> ...    sendmail                 : MAPI_E_SUCCESS (0x0)
I guess it's truncated in 4KB, the last 4000 is shown as 400 only.
Comment 5 Milan Crha 2009-08-06 18:30:56 UTC
Oh, ok, with openchangeclient, when I enlarge a file to 5KB the it ends with 500 instead of 5000, thus I guess it's just "one-byte-off" issue.
Comment 6 Milan Crha 2009-08-06 18:50:47 UTC
Created attachment 140051 [details]
ema.patch

this is what I changed. Notice:
a) mapi_sync_deleted - it cause crashing to me
b) mapi_send_to - there should be _decode_ instead of _write_ function used
Comment 7 Milan Crha 2009-08-06 18:53:04 UTC
Created attachment 140052 [details]
ecs.txt in UTF-8

when using for sending this file, I get some letters broken with openchangeclient, it generates in the body: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">&#155;š&#141;&#153;žýáíé
no idea where it get it from, as this should be UTF-8.

ema, on the other hand, is not able to send this at all (pasted file content to plain text message body).
Comment 8 Milan Crha 2009-08-06 18:57:32 UTC
CC'ing Julien to let him know about the above.
Comment 9 Akhil Laddha 2009-08-07 07:36:32 UTC
Patch seems to work fine in terms of encoding but i get 'cann't send message' error pop up many time and cann't flush outbox after many attempts and it's crashing also , see bug 591032 
Comment 10 Milan Crha 2009-08-07 08:40:51 UTC
(In reply to comment #9)
> Patch seems to work fine in terms of encoding but i get 'cann't send message'
> error pop up many time and cann't flush outbox after many attempts and it's
> crashing also , see bug 591032 

Yeah, that might be because of that _write_ to _decode_ function change. It doesn't like UTF8 letters.
Comment 11 Paul Smith 2010-01-19 06:17:15 UTC
Urhm, this bug seems quite reproducible: it happens every time to me if I reply to a larger message.  Surely this needs to be fixed to have even a minimally functional backend?
Comment 12 Valent Turkovic 2010-01-28 09:56:48 UTC
I have 2.28.2 in Fedora 12 and I can confirm the bug.
I can't send attachment via email of forward an existing one. 

Small attachments pass through but larger ones aren't sent.
Comment 13 Milan Crha 2010-01-28 11:08:28 UTC
*** Bug 602905 has been marked as a duplicate of this bug. ***
Comment 14 Milan Crha 2010-01-28 18:17:12 UTC
I partially touched this in bug #608320, and I have few other changes for this, but it's still not there. I'll update when I'll have something.
Comment 15 Milan Crha 2010-01-29 18:24:43 UTC
Created attachment 152596 [details] [review]
ema patch

for evolution-mapi;

With this patch I can send attachments of "any" length, also body content length is no longer a problem (it was there, only needed few tweaks). I changed slightly message decomposition routine, and body content picking, so if you delete your local summary of downloaded messages (~/.evolution/mail/mapi/<account>/folders/ - note folders.db is not needed to be deleted), then you should also get your unicode messages better or the same as before.
Comment 16 Milan Crha 2010-01-29 18:30:41 UTC
Created commit 16f0e65 in ema master (0.29.90+)
Created commit ff76193 in ema gnome-2-28 (0.28.3+)
Comment 17 Akhil Laddha 2010-02-16 05:41:56 UTC
*** Bug 591032 has been marked as a duplicate of this bug. ***
Comment 18 Valent Turkovic 2010-03-08 08:12:35 UTC
Still can't sent attachements larger than 4K on FEdora 12 with Evolution 2.28.2
In which release is this fixed?
Comment 19 Bharath Acharya 2010-03-08 08:23:05 UTC
(In reply to comment #16)
> Created commit 16f0e65 in ema master (0.29.90+)
> Created commit ff76193 in ema gnome-2-28 (0.28.3+)

As this comment says, 0.28.3+ evolution-mapi 0.28.3 release should have the fix for this
Comment 20 Valent Turkovic 2010-03-08 09:16:39 UTC
I can confirm that this issue is resolved with 2.28.3 in Fedora 12. 

Thank you very much!
Comment 21 Akhil Laddha 2010-04-28 03:40:08 UTC
*** Bug 616991 has been marked as a duplicate of this bug. ***
Comment 22 Milan Crha 2010-06-09 13:22:37 UTC
*** Bug 608350 has been marked as a duplicate of this bug. ***