GNOME Bugzilla – Bug 749108
Embedded inline images pretend message attachments
Last modified: 2015-05-13 16:23:10 UTC
When using an HTML signature containing <img src="file://foobar" /> elements, the images will be sent as an attachment (good!) but with "Content-Disposition: attachment" instead of "Content-Disposition: inline" (bad!). That means to all clients (including Evolution itself) will flag the message as "containing an attachment", so, every messages sent from Evolution with an HTML signature containing embedded images (which is the case in virtually all companies) will be flagged as "containing an attachment"... Note: probably a duplicate of #522784 but since it is old and closed as NOTABUG, I'm not sure if I had to add a comment there or fill a new report, sorry.
Thanks for a bug report. "Content-Disposition: inline" is wrong too. The thing is that the "inline" means "shows them expanded by default", which is still related to attachments. If you have inline images in your HTML message, provided by the signature in your case, then the right message structure would look like this: multipart/related multipart/alternative text/plain text/html image/png where the text/html references the image part with a CID, and the image part has set that CID as its filename (if I recall correctly). It's possible to send the message without that top-level multipart/related part too, though using it feels better to me. This might be fixed at once with bug #748574.
Created attachment 303306 [details] Example of HTML mail sent with an inline image
I understand your explanation about the structure of the email. The current structure is already: multipart/related multipart/alternative text/plain text/html image/png Which is fine. I just did other tests and the problem I reported is not only related to signatures, but to the whole mail editor. Please find as an attachment an example mail sent from evolution, which only contained an inline image ("face-smiley.png"). The image is sent with "Content-Disposition: attachment", that means that it is seen by mail clients as an attachment *to download*. Therefore, all mail clients (Oultook, Thunderbird, Evolution itself) shows a little "paper clip" that notifies the receiver that an attachment is enclosed and may be downloaded. This is imho not the expected behavior, an image inserted via the HTML editor should be sent as inline (this how Outlook and Thunderbird behaves). Otherwise, all mails sent from Evolution containing an inline image (i.e a signature) will have that "paper clip" shown to the receiver.
Thanks for the update. You are right the email actually doesn't contain any real attachment, thus might not be shown as such in the message list. Getting rid of the 'attachment' in the Content-Disposition header really makes the trick, as you said. I think evolution can have this changed without any harm.
Two places needed a change. One in evolution-data-server, to not consider "inline" disposition as attachments, and the evolution, to mark inline images with "inline" disposition, not as "attachment". This works for newly received messages only, older, already marked messages, stay unaffected. Created commit_979c6d2 in eds master (3.17.2+) [1] Created commit 6f61578 in evo master (3.17.2+) Created commit_8b3d8a6 in eds gnome-3-16 (3.16.3+) Created commit 4948097 in evo gnome-3-16 (3.16.3+) [1] https://git.gnome.org/browse/evolution-data-server/commit/?id=979c6d2