Image parts of the body are dropped when sent with Apple-Mail

Bug #1546062 reported by Ralph Plawetzki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mail
Fix Released
High
Ralph Plawetzki

Bug Description

When writing an email with Apple-Mail that contains text and an image, Mail displays the text, but does not display the image correctly.

This happens as Geary.RFC822.Message#get_content_filename_by_mime_id(string mime_id) throws an RFC822Error when parsing the email recursively I received for testing purposes.

Comfirmed for Apple Mail (2.3112).

Related branches

summary: - Image parts of the body are droped when sent with Apple-Mail
+ Image parts of the body are dropped when sent with Apple-Mail
Revision history for this message
Ralph Plawetzki (purejava) wrote :

To clarify things - this is the email that causes the problem.

Revision history for this message
Ralph Plawetzki (purejava) wrote :

The RFC822Error is thrown as the mime part with the content-id "<email address hidden>." (the image) can not be found.

This happens in rfc822-message.vala:736
if (part != null && part.get_content_id() == mime_id) {

mime_id is set correctly: "<email address hidden>.", but part.get_content_id() returns "<email address hidden>" (without the trailing period).

This is where my knowledge ends as I do not know C very well and GMimePart is used here.
I read RFC 2392, but it does not make clear if trailing periods are allowed in domain names or not.

Changed in pantheon-mail:
assignee: nobody → Ralph Plawetzki (purejava)
status: Confirmed → In Progress
Revision history for this message
Ralph Plawetzki (purejava) wrote :

Ok, I debugged through the C code of the GMime library.

g_mime_part_get_content_id calls g_mime_object_get_content_id.
g_mime_object_get_content_id removes a trailing period of the Content-Id as g_mime_decode_domain is used to decode the domain part of the Content-Id:

Thread 1 "pantheon-mail" hit Breakpoint 2, g_mime_decode_domain (in=in@entry=0x7fffffffdf78, domain=domain@entry=0xc724e0)
    at gmime-parse-utils.c:289
289 g_string_truncate (domain, domain->len - 1);
(gdb) p *(GString *) domain
$6 = {str = 0x15b2f90 "<email address hidden>.", len = 57, allocated_len = 64}
(gdb)

Changed in pantheon-mail:
status: In Progress → Fix Committed
milestone: none → loki-alpha1
Cody Garver (codygarver)
Changed in pantheon-mail:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.