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 591811 - Do not re-encode attachments and change CRLF/LF
Do not re-encode attachments and change CRLF/LF
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.12.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[attachments]
Depends on:
Blocks:
 
 
Reported: 2009-08-14 15:02 UTC by Pedro Villavicencio
Modified: 2014-06-02 17:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
message.diff (142 bytes, text/plain)
2009-09-17 17:51 UTC, Jonathan Pryor
Details
message-evolution.diff (139 bytes, text/plain)
2009-09-17 17:53 UTC, Jonathan Pryor
Details

Description Pedro Villavicencio 2009-08-14 15:02:22 UTC
this report has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/evolution/+bug/411086

"When I send a shell script text as Attachment to my friend's email, he received an error file, I meant, my Attachment, a shell script, is unexpectedly changed, which I can tell with the command
$ diff file.orig file.other
this should not happen, I think.

this bug maybe replicated like fellow:

1. download my Attachment with this bug report.
2. decompression the Attachment, you will get two files:
"msgforme.orig" -- the original shell script
"msgforme.new" -- the shell script that my friend received
you can tell the difference between the two files using the command 'diff'
3. now you can use your evolution to send an email to your other mailbox (called mailboxB) with an Attachment of my shell script file "msgforme.orig" without compressing.
4. then you go to the web, say, use your firefox to receive the email with mailboxB, and download the Attachment.
5. And now you will see the diff between the new file you downloaded just now and the original file.

more infomation for you:
I use gmail as server and evolution as client, I send my file to other mailbox(not gmail), and the Attachment file should/may be a shell script file without compressing. Then this bug occur.

I do the same thing, say, send an email to my friend with the attachment(without compressing) above using the firefox with the same mail server(gmail), This bug didn't occur.

and I did a lot of tests like sending the email from one mail box the another, finally I found that it is exactly the problem of evolution."

http://launchpadlibrarian.net/30084438/sample.tar.bz2

Thanks,
Comment 1 Matthew Barnes 2009-08-14 17:31:20 UTC
Thanks for taking the time to report this bug.
This bug report isn't very useful because it doesn't describe the bug well. If you have time and can still reproduce the bug, please read http://bugzilla.gnome.org/bug-HOWTO.html and add a more useful description to this bug.
Comment 2 André Klapper 2009-08-14 17:44:12 UTC
So all we talk is that 0A becomes 0D0A? Much text for that. ;-))
Comment 3 Jonathan Pryor 2009-09-17 17:47:50 UTC
So here's a better description of the bug.

Evolution CORRUPTS attachments!

To reproduce:

1. Create a DOS-formatted text file, e.g. in vim, type ":set ff=dos", insert "Hello, world!", and save it as old.txt.

2. Append a new line, e.g. "Goodbye!", and save as new.txt.

3. diff -u old.txt new.txt > message.diff

4. Using Evolution, email message.diff to yourself.

5. Once you receive message.diff, compare against the original.  They differ.

The problem is that all embedded \r characters in the message have been removed.

This effectively makes it impossible to sanely/trivially use Evolution to mail diffs/patches of DOS formatted files.  (This may be hard to believe, but some open-source projects actually contain DOS-formatted source text.)

The workaround, presumably, is to gzip the file before attaching.  ("Simple", certainly, but one more step to remember for what should be a trivial operation!)
Comment 4 Jonathan Pryor 2009-09-17 17:51:41 UTC
Created attachment 143391 [details]
message.diff

The original file, before sending via evolution.
Comment 5 Jonathan Pryor 2009-09-17 17:53:08 UTC
Created attachment 143392 [details]
message-evolution.diff

The attachment AFTER sending via Evolution.

Notice that this is NOT the same file as message.diff, specifically that all \r characters have been removed.
Comment 6 Milan Crha 2014-06-02 14:13:20 UTC
Confirming, I see it in git master too (after 3.13.2). Closer investigation shows that the attachment is sent (and received) properly, but when it is saved in evolution its CRLF is replaced with LF.
Comment 7 Milan Crha 2014-06-02 17:39:50 UTC
(In reply to comment #6)
> ... Closer investigation shows that the attachment is sent (and received)
> properly, ...

Not completely true, the received message attachment has all new lines converted into CRLF. There is a possibility to use for example base64 encoding, just like Thunderbird does.
Comment 8 Milan Crha 2014-06-02 17:48:28 UTC
It was more complicated than expected. Some changes were done when sending the message through SMTP, some were done when reading the received message. Both might be correct with below commits:

Created commit 74b7a0a in eds master (3.13.3+) [1]
Created commit fcb8805 in eds evolution-data-server-3-12 (3.12.3+)

[1] https://git.gnome.org/browse/evolution-data-server/commit/?id=74b7a0a