Sergey, I did some more testing, and found that when movemail converts mbox to other formats, it adds a spurious blank line to all of dotmail, MH format, and maildir.
I tested with an input message whose body is one line, in mbox and dotmail formats. The table below shows the results. In both input and output messages, "bad" means the message has a blank line added, so the message body is two lines; "good" means the message has no extra blank line. to mbox dotmail MH maildir from good mbox good bad bad bad good dotmail good good good good bad dotmail good bad bad bad So I guess the mbox code, on read, appends a blank line to the message in memory. On write, something more complicated happens. Maybe it does three different things if the message in memory ends with 0, 1, or 2 blank lines? Looks like the others are straightforward: drop the file format stuff on read, add it on write, without otherwise modifying the message. Seems it would be simpler, and all these conversions would work, if the mbox code were also straightforward: drop the blank line on read, write a blank line after the message on write. That blank line in mbox format causes endless confusion. Over the years, many programmers have not been sure whether it's part of the message. I'm sure that it's not. That blank line has no technical function. I suspect that whoever invented mbox just threw in a blank line so it would look nice when he used cat to copy an mbox file to his printing terminal. It's antique decoration. Attached are the three input files from the testing above.
good_dog.mbox
Description: application/mbox
From: <j...@blow.nope> To: <al...@flyingcloud.ship> Date: Thu, 01 Jan 1970 00:00:00 +0000 (UTC) dog .
From: <j...@blow.nope> To: <al...@flyingcloud.ship> Date: Thu, 01 Jan 1970 00:00:00 +0000 (UTC) dog .