backdown mail
Mailboxes: merge copies of one into a single Maildir, or export a Maildir folder as mbox.
On this page
backdown mail [OPTIONS] <COMMAND>backdown mail merge
Merge copies of the same mailbox taken at different times (Maildir, mbox files, a Thunderbird folder, or whole mail stores, mailbox by mailbox) into one Maildir: every message once by Message-ID, in the folder the newest copy has it in, flags combined. The sources are only read.
backdown mail merge [OPTIONS] --to <TO> <SOURCES>...Arguments
<SOURCES>...- The copies of the mailbox: Maildirs, mbox files, Thunderbird account folders, or whole mail stores (folders of Maildirs), in any order. They are only read.
Options
--to <TO>- The merged Maildir: a new folder (running again carries on where it stopped).
--dry-run- Read everything and show what the merge would be, writing nothing.
--json- Print it as JSON, for scripts.
backdown mail export
Export one Maildir folder (its own messages, not its subfolders) as an mbox file (mboxrd)
backdown mail export [OPTIONS] --mbox <MBOX> <MAILDIR>Arguments
<MAILDIR>- The Maildir folder to export (its own messages, not its subfolders).
Options
--mbox <MBOX>- The mbox file to write (never overwritten).
All of them also take the global options --db and --local.
Good to know
Messages are matched by Message-ID and body (or, without a Message-ID, by headers and body); each lands in the folder the newest copy has it in, with read, replied and flagged marks combined. The destination must be new or empty; it becomes a Maildir++ mailbox. Every message is written, read back and journaled; an interrupted merge carries on when run again. Dovecot mdbox and sdbox aren't read yet. export never overwrites the mbox file. merge exits 2 when some messages failed.
Examples
# what the merge would be (writes nothing)
backdown mail merge /media/old-drive/Mail/Inbox /media/laptop-2012/Mail/Inbox --to /media/archive/Mail/merged --dry-run
backdown mail merge /media/old-drive/Mail/Inbox /media/laptop-2012/Mail/Inbox --to /media/archive/Mail/merged
backdown mail export /media/archive/Mail/merged --mbox /media/archive/Mail/inbox.mboxSee also
Last updated · What's released, and what's next