4.0 MAJOR PROBLEM: breaks multipart messages when it moves them with rules

there’s a serious problem that some messages are being corrupted on move (from the filtering rules). Our server logs show FETCH, FETCH, FETCH (all body parts) of source mail then APPEND to target folder (then STORE & UID EXPUNGE to remove source).

When it rebuilds the message to append, it’s not-reinserting the MIME boundary marker properly, so any multipart messages that are moved this way are broken. The boundary marker is correctly put in the header, just not in the body, instead it puts – -- ----

This actively breaks mail in a way that is going to be extremely difficult to fix in code. I had to manually edit the files on the IMAP server to re-add the boundary marker and rebuild the mailbox index. Most customers won’t be able to do this.

I could understand FETCH + APPEND as a move strategy between 2 different mail accounts, but not between folders in a single account. In the case this strategy is required, it’s safest to retrieve the entire message as 1 part so what you append is what you got from the source.