GNOME Bugzilla – Bug 537988
Breaking From: Header with empty Address
Last modified: 2021-05-19 11:56:03 UTC
Evolution breaks, partially discard existing and re-writes From: headers. This is an example from a recent spam wave. The headers (not all, just the relevant) in the RAW email are these: Date: Thu, 05 Jun 2008 23:45:19 +0100 From: "Damian" <> To: "Sandy" <x.xxxxxxxxxxxx@xxxxxxxx.xxx> Subject: D'u want to have perfect sex all night long? The headers Evolution displays in the email source view: Date: Thu, 05 Jun 2008 23:45:19 +0100 To: "Sandy" <x.xxxxxxxxxxxx@xxxxxxxx.xxx> Subject: D'u want to have perfect sex all night long? X-Evolution-Source: imap://xxxxxxxx@xxxx.xxxxxxxx.xxx/ From: Note that the From: header has been rewritten severely (more on this later). Also do note, that the From: header as displayed by Evolution appears *below* the X-Evolution-Source: header. Also please note, that the list view indeed *does* show all these headers as per the raw snippet above. Including the From: header, exactly as it appears in the raw message.
(In reply to comment #0) > Note that the From: header has been rewritten severely (more on this later). Possibly related to bug 537989.
Created attachment 112618 [details] example email, test case The full example email, slightly edited.
0) Some notes to support my memory (I looked at this yesterday and already can't remember enough) and maybe help others to better investigate this. 1) Previewing this message will print this to stderr (or stdout?): (evolution:[...]): camel-WARNING **: No from set for message Viewing source will print that warning too (twice, actually, for some reason). 2) This message is found in camel/camel-mime-message.c:write_to_stream(). It seems a message with an invalid From address will have the from member of struct CamelMimeMessage set to null. 4) Note that Viewing Source is (much) more than just printing the original message to the screen. It seems to use a specific way to render a message, using evolution's internal representation of this message. This means for instance that for some headers (From, Subject) the source shown will differ from the original if this header was unusable. If Viewing Source should be more accurate this probably means that copies of unusable headers should also be kept (and just for that purpose). This might require some serious changes to the code. I doubt that this is worth the effort. 5) By the way, this message will also preview without headers. This is bug #537088. Patch for that bug works here too.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines and create a new bug report ticket at https://gitlab.gnome.org/GNOME/evolution/-/issues/ Thank you for your understanding and your help.