https://bugs.kde.org/show_bug.cgi?id=368003
Bug ID: 368003 Summary: CATENATE might produce invalid MIME messages Product: trojita Version: git Platform: Other OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: Message Composer Assignee: trojita-b...@kde.org Reporter: j...@kde.org When using drag-and-drop to attach a part stored on an IMAP server, the composer migh produce malformed MIME messages if CATENATE is available and used. ImapPartAttachmentItem::suggestedCTE() makes this easy to see because it hardcodes "Content-Transfer-Encoding: base64" for anything but message/rfc822. So when attaching something like message/delivery-status or essentially anything which is stored without any CTE on the IMAP server, Trojita's composer writes out a CTE header which identifies the content as base64-encoded. When it comes to adding the actual data, Trojita uses an IMAP URL mechanism which points to a raw MIME part as-is, which in this case means a part stored with no CTE which in turns is 7bit. One approach at fixing this is to use the CTE header from the IMAP server, and to hope that the original message was not malformed. This, however, might cause trouble if we are about to send a message which is, say, in CTE: 8bit over an SMTP server which does not support the CTE: 8bit. In that case, we will have to transcode that part. If we are transcoding, there's a question on how a copy of message which we are storing to the sent mailbox should look like -- either it can use the most-efficient format, the CTE: 8bit, saving both bandwidth and disk space, or it should match the outgoing message exactly, bite-wise, which means that it must not use CATENATE in that case. Stuff gets messy because right now, we prepare the full MIME structure beforehand, before even connecting to the SMTP server which makes a lot of sense due to BURL. Maybe we should detect that we cannot submit our message in this way, remove the previously stored copy, upload a new one with no CTE: 8bit et al, and then use this new 7bit version as an outgoing message in that case... Or TL;DR, just disable CATENATE for now? -- You are receiving this mail because: You are watching all bug changes.