I am reading emails using VM 8.2.0b, and every now and then it happens that vm combines two emails together. I.e., the second email is attached to the end of first one. This is caused by the fact that the first email does not have the newline in the end of the email, i.e., it ends without the newline, and then next email is attached to it, the end result is not normal "end of email\n\nFrom [email protected]..." but instead it will result to "end of email\nFrom [email protected]..." which will then cause the emails to be show together.
This happens both when the emails are read from the $MAIL mailbox file directly, and when using IMAP to read the mails from the imap server. I first assumed it might be issue with the procmail etc writing it incorrectly to the $MAIL mail box file, but when it appeared also when using imap, it cannot be caused by that. Also when this combining happens, the email shown on the vm will look like it is empty. I.e. it looks like it does not have any text in the body. If I quit vm and start it over again, the email now has text in the body, and both emails are there combined together. If I then go to the mail box and add newline between first email and before the "From " starting the second email the emails will be shown properly. Usually those emails are html-only emails or similar so it might be that their original encoding has been base64 or something, and vm has converted them to text but did not add the missing newline to the end. Now I found out example email that does this. I.e. email having following mime headers: MIME-Version: 1.0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: base64 and having body of VGVzdC4= will cause this issue happening. I will include the attachment having two mails in $MAIL format which will show this issue. When you have those emails in your $MAIL and you fetch new emails, vm will show that you have two emails: 1st email will show with empty body; the next email looks fine (with body of "koe."). If you then quit vm, and start it again, now it will show that you only have one email, i.e., the one email having text "Test" in it, and the second email (with text "koe.") will be combined to to the end of that first one. Any ideas what might cause this and how to fix this?
mbox-example
Description: Example mails of bug in mailbox format.
-- [email protected]
