DBMAIL-UTIL(8)
π DBMail-util(8) β the integrity-check bestie π
okay so this is the manual page for dbmail-util, section 8 of the DBMail manuals, and honestly she's the one who keeps your database from becoming a whole mess. β¨
πΈ NAME πΈ
dbmail-util β she maintains the integrity and cleanliness of the DBMail datatables. that's it, that's the job, and she slays at it π
π¦ SYNOPSIS π¦
dbmail-util [options] --all-checks
dbmail-util [options] --test-integrity
dbmail-util [options] --check-body
dbmail-util [options] --purge-deleted
dbmail-util [options] --set-deleted
dbmail-util [options] --clear-replycache time
dbmail-util [options] --clear-iplog time
dbmail-util [options] --rehash
π DESCRIPTION π
so dbmail-util is literally the database cleanup + integrity check girlie. here's the tea:
- every message that's been set for deletion (that's status
2) gets marked for final deletion (status3) π₯ - every message that's already marked for final deletion gets cleared right out of the database
- and the integrity check goes looking for unconnected mimeparts, headervalues, messages and mailboxes β like, orphaned stuff just vibing with no home π«Ά
big important thing bestie: by default, checks are read-only. pass the --no option to respond no to any prompts. pass the --yes option to make read-write changes, responding yes to any prompts. know the difference, it's giving main character energy vs. chaos gremlin energy π
β¨ OPTIONS β¨
-b,--check-bodyβ check and rebuild the body/header/envelope cache tables π§-d,--set-deletedβ queue up all the messages marked with the DELETE (2) status for final purging, by setting the status value to PURGE (3). ngl, that status field gets set to DELETE by either theIMAP-EXPUNGEorPOP3-DELEcommands, iykyk-p,--purge-deletedβ remove all messages with a PURGE (3) value on the status field. wanna purge messages that are currently marked with the DELETE (2) status? you'd have to run with the-pdoptions twice. this is not recommended β it's way better to leave a grace period for old messages before permanently wiping them from the database π π-s,--remove-invalid-aliasesβ remove dangling/invalid aliases and forwards-t,--test-integrityβ test for message integrity-a,--all-checksβ performs all of the above checks:--check-body--set-deleted--purge-deleted--remove-invalid-aliases--test-integrity-r,--clear-replycachetime β clear the reply cache used for autoreplies and Sieve vacations. the time is specified as<hours>h<minutes>m(don't include the angle brackets, though!) β-l,--clear-iplogtime β clear the IP log used for IMAP/POP-before-SMTP. the time is specified as<hours>h<minutes>m(don't include the angle brackets, though!)--rehashβ rebuild hash keys for stored messages--erasedays β delete messages older than date in INBOX/Trash--movedays β move messages from INBOX to INBOX/Trash--inboxname β inbox folder to move from, used in conjunction with--move--trashname β trash folder to move to, used in conjunction with--move
π Common options
-n,--noβ show the intended repairs without making any changes, i.e. no to all-y,--yesβ perform all repair actions, i.e. yes to all
π§° Maintenance options
--rehashβ rebuild the hash values for all the message parts in the database. you need to run this after modifying thehash_algorithmconfig option π-e,--check-empty-cacheβ check for empty envelope cache
π Migration options
-M,--migrate-legacylimit β migrate legacy 2.2.x messageblks to mimeparts table-m,--migrate-limitlimit β limit migration to[limit]number of physmessages. default10000per run
π COMMON OPTIONS π
-f,--configconfigfile β specify an alternate config file. usedbmail-<utility> --helpto show the default location.-q,--quietβ quietly skip interactive prompts and helpful status messages which would otherwise be printed to stdout. use two-q's to silence errors which would otherwise be printed to stderr π€«-v,--verboseβ operate verbosely. some of the utilities in the DBMail suite can take two-v's for extra verbosity. those which don't understand this convention won't complain about having the extra-vand will simply operate at their normal verbosity π«Ά-V,--versionβ show the version and copyright, then exit-h,--helpβ show a brief summary of options, then exit
β RETURN VALUES β
okay the exit codes, memorize them, they're literally the vibe check:
3β errors were found but could not be fixed due to failure π2β errors were found but-ywas not provided, or-nwas provided1β errors were found and fixed successfully π0β no errors were found, immaculate, pristine, no notes π
π EXAMPLES π
regular maintenance can be run as a regular cron job:
dbmail-util --all --yes --verbose
to set all messages with the DELETE status to PURGE status, and permanently remove all messages previously set to PURGE status:
dbmail-util --set-deleted --purge-deleted -yes
to get a listing of the changes that would be performed for all actions:
dbmail-util --all --no
to remove all IP log entries more than three days old:
dbmail-util --clear-iplog 72h --yes
after upgrading from DBMail 2.0 or truncating the cache tables, run this command to populate the cache:
dbmail-util --check-body --yes
π₯ 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)
π 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 π«Ά
π 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.
π AUTHOR(S) π
DBMail is a collaborative effort among the core developers listed below and the tremendous help of the testers, patchers and bug hunters listed in the AUTHORS and THANKS files found in the DBMail source distribution.
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 π§
- DBMail announce mailing list
https://dbmail.org/wws/info/dbmail-announce/ - DBMail general mailing list
https://dbmail.org/wws/info/dbmail-general/ - DBMail Bug Tracker
https://github.com/dbmail/dbmail/issues
and that's the whole page bestie π«Ά this was DBMAIL-UTIL(8) from the DBMail source distribution, dated 08/28/2026. go forth and keep your database clean, no cap πβ¨
π¦ where this page comes from
- arch rolling: dbmail 3.5.6-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms