KMime does are very bad handling for long headers (multiline headers). Those multiline state get lost, as there is no way to copy those headers. And I think we also loose sometimes the newlines when playing to much with assemble -> parse. This is quite annoying as we send also those headers (X-face, Face and Autocrypt-*). In combination to Persistant Headers (T742) this breaks the OpenPGP Signature, as we modify the content of a signed content. It would be nice, if KMime can handle those headers better.
Currently I have no idea about how to improve KMime as it it too complicted code for myself.