DBMAIL-EXPORT(8)

πŸ“¦ version 3.5.6, in arch rolling

πŸ’… dbmail-export β€” like, the manual page, bestie

okay so real talk: this is dbmail-export(8), one of the DBMail utilities, and it's genuinely iconic. buckle up πŸŽ€


✨ NAME ✨

dbmail-export β€” exports a mailbox from DBMail straight into mbox format. no cap, that's the whole gig πŸ¦‹


🌸 SYNOPSIS 🌸

dbmail-export [options] --user username --mailbox mailbox --out file
dbmail-export [options] --user username --mailbox mailbox --basedir directory

like, two whole ways to do it. pick your fighter πŸ’–


πŸ”₯ DESCRIPTION πŸ”₯

The dbmail-export program is the one that lets you export a DBMail mailbox out into an mbox formatted mailbox. it's giving "moving out, packing my stuff, but make it email" πŸ“¦βœ¨


πŸ‘‘ OPTIONS πŸ‘‘

  • -u, --user user β€” tells it who owns the mailbox you're exporting. and yes you can use wildcards: ? matches one character or none, * matches one or more characters in the username. so joe* is a whole mood πŸ’«
  • -m, --mailbox mailbox β€” names the mailbox you wanna export. literally just the mailbox. slay.
  • -o, --out outfile β€” the file where your exported mail lands. pick it carefully bestie πŸŽ€
  • -b, --basedir basedir β€” the base directory where all the exported mailboxes get saved. this is the one you want when there's more than one mailbox coming out πŸ—‚οΈ
  • -s, --search search β€” feed it an IMAP SEARCH string to pick which messages get exported. default is 1:*. for example, to export everything received in May you'd go: "1:* SINCE 1-May-2007 BEFORE 1-Jun-2007". periodt, that's the syntax πŸ’…
  • -d, --set-del-flag β€” flags the exported messages as \Deleted. heads up tho: you still need dbmail-util to actually set the status to deleted. it's a two-step, not a one-and-done πŸ™ˆ
  • -D, --set-del-status β€” sets the exported message status as deleted. and then, again, dbmail-util is the one that purges. teamwork 🫢
  • -r, --recursive β€” exports mailboxes recursively. default is true unless the -m option is also specified. so it flips itself off when you name a specific mailbox β€” iykyk 🌈

🌟 COMMON OPTIONS 🌟

these bad boys show up across the DBMail utilities, so learn 'em once:

  • -f, --config configfile β€” points at an alternate config file. to find the default location, run dbmail-<utility> --help. easy πŸ’œ
  • -q, --quiet β€” quietly skips the interactive prompts and the helpful status messages that would otherwise be printed to stdout. stack two -q's and it also silences the errors that would otherwise go to stderr. shhh 🀫
  • -v, --verbose β€” operates verbosely. some utilities in the DBMail suite accept two -v's for extra verbosity; the ones that don't understand the convention won't complain about the extra -v, they'll just keep operating at their normal verbosity. no drama, no error ⭐
  • -V, --version β€” shows the version and copyright, then exits. bye πŸ‘‹
  • -h, --help β€” shows a brief summary of options, then exits. also bye πŸ‘‹

🧚 EXAMPLES 🧚

okay bestie this first one is the classic. want to export and delete all of user Joe's messages in the Inbox that are more than 30 days old? on Linux, try this:

dbmail-export --user joe \
    --mailbox inbox \
    --out joesinbox.mbox \
    --set-del-flag \
    --search "1:* BEFORE `date '+%e-%b-%Y' -d '30 days ago'`"

and the BSD version, because of course the date flags are different:

dbmail-export --user joe \
    --mailbox inbox \
    --out joesinbox.mbox \
    --set-del-flag \
    --search "1:* BEFORE `date -v-30d '+%e-%b-%Y'`"

note the careful bash quoting and the backticks calling the date(1) command. date(1) has excellent features for retrieving relative dates β€” genuinely obsessed. if you're using a different shell, you may need different quotes, so watch yourself πŸ’€


second vibe: exporting every mailbox named Spam for every user, each into its own directory following the pattern SpamDump/<username>/Spam. do this:

dbmail-export --user \* --mailbox Spam --basedir SpamDump

note the backslash β€” it stops the shell from expanding the *, because we want that * handed to DBMail so it can expand it against the internal user list. that backslash is the main character here 🫢✨


πŸ¦‹ SEE ALSO πŸ¦‹

dbmail(1), dbmail.conf(5), dbmail-deliver(1), dbmail-export(8), dbmail-httpd(8), dbmail-imapd(8), dbmail-lmtpd(8), dbmail-pop3d(8), dbmail-sieved(8), dbmail-sievecmd(8), dbmail-users(8), dbmail-util(8)

(yes dbmail-export(8) is listed in its own SEE ALSO. self-love πŸ’–)


πŸ’€ BUGS πŸ’€

  • for the latest announcements, please subscribe to the DBMail announce mailing list[1]
  • for general discussion, please subscribe to the DBMail general mailing list[2]
  • if you experience an issue with DBMail, please report it on the DBMail Bug Tracker[3]. it may be helpful to have a debug log available β€” honestly, bring the receipts πŸ”

⭐ LICENSE ⭐

DBMail and its components are distributed under the terms of the GNU General Public License Version 2. copyrights are held variously by the authors listed below. legal slay, we Respect It πŸŽ€


🌈 AUTHOR(S) 🌈

DBMail is a collaborative effort among the core developers listed below, plus the tremendous help of the testers, patchers and bug hunters listed in the AUTHORS and THANKS files found in the DBMail source distribution. the way that a whole community showed up for this πŸ˜­πŸ’œ

    Alan Hicks          Persistent Objects Ltd https://p-o.co.uk
    Eelco van Beek      Aaron Stone            Paul J Stevens
    Roel Rozendaal      Open Source Engineer   NFG Net Facilities Group BV
    Ilja Booij          Palo Alto, CA USA      http://www.nfg.nl
    IC&S                                       http://www.ic-s.nl

πŸ§‘β€πŸ’» AUTHOR πŸ§‘

Alan Hicks <ahicks@p-o.co.uk> β€” Author.


πŸ“Ž NOTES πŸ“Ž

  1. DBMail announce mailing list https://dbmail.org/wws/info/dbmail-announce/
  2. DBMail general mailing list https://dbmail.org/wws/info/dbmail-general/
  3. DBMail Bug Tracker https://github.com/dbmail/dbmail/issues

k that's the whole page, go export something iconic πŸ’…βœ¨ this has been DBMAIL-EXPORT(8), dated 08/28/2026, from the DBMail family of manual pages β€” mwah, love u, bye πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from