Fails to parse base64-encoded message/rfc822 attachment
I more or less "upstream" evolution-data-server bug https://bugzilla.gnome.org/show_bug.cgi?id=651197 here. It contains a test message too.
When I try with modified basic-example (the message is not printed to the stdout stream, because stdout is not seekable and I also disabled add/remove of the part), then it ends with the mesasge/rfc822 part as this:
--=-t32eenCaTDevIde9UTGe
Content-Disposition: inline
Content-Description: Attached message
Content-Type: message/rfc822
Content-Transfer-Encoding: base64
TWVzc2FnZS1JRDogPGRjZGVkOWIyMTQ3NThhZGRiYTk5YjI0OGJiMTczNzgwZDY4ODRlYjUuY2Ft
--=-t32eenCaTDevIde9UTGe--
which means it garbled the message content.
The Camel library in evolution-data-server works similarly, but I'm quite lost in the parser. If I understand it properly, then when it's tried to decode such message subpart, then the encoding is known, but it's not decoded before "consumed". The thing is that I do not know what to do afterwards, to decode the base64 encoded content (which can be pretty long, split into several reads).