---
name: "maildir2mbox"
section: "1"
platform: "linux"
package: "qmail"
version: "1.06-6.2~deb10u1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/maildir2mbox"
---

# maildir2mbox(1)

move mail from a maildir to an mbox

## NAME

maildir2mbox - move mail from a maildir to an mbox

## SYNOPSIS

**maildir2mbox**

## DESCRIPTION

**maildir2mbox** moves mail from a *maildir*-format directory to an *mbox*-format file.

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.

## SEE ALSO

[maildir(5)](/maildir/5.md)
