There is a script to convert maildir to mailbox in wiki:
but it doesn't convert any message flags (seen e.t.c.).
I wrote a script, which converts most flags and labels:
It doesn't convert recent flag and UIDs though, because it was not
necessary in my case.
Do you think link to the script should be added to dovecot wiki?
WBR, Anton Yuzhaninov
P. S. My use case was: get maildir from other server, convert to mbox,
compress (gzip -9) and add to my mailbox as read-only archive.