You must supply three environment variables to maildir2mbox: MAILDIR is the name of your maildir directory; MAIL is the name of your mbox file; and MAILTMP is a temporary file that maildir2mbox can overwrite. MAILTMP and MAIL must be on the same filesystem.
maildir2mbox is reliable: it will not remove messages from MAILDIR until the messages have been successfully appended to MAIL.
maildir2mbox locks MAIL to protect against simultaneous access by a mail reader. This locking system does not protect against simultaneous access by another maildir2mbox; you should run only one maildir2mbox at a time.