CYR_DBTOOL(8)

πŸ’– CYR_DBTOOL(8) β€” the Cyrus IMAP bestie guide πŸ’–

okay so bestie, welcome to cyr_dbtool, straight outta the Cyrus IMAP manual. she's a lil command-line queen whose whole job is managing Cyrus databases, and honestly? she ate. let's get into it. πŸŽ€

✨ NAME ✨

cyr_dbtool β€” Cyrus IMAP documentation

Manage Cyrus databases πŸ’…

🌸 SYNOPSIS 🌸

cyr_dbtool [ -C config-file ] [ -n ] [ -o ] [ -T ]
        db-file db-backend action [ key ] [ value ]

(yes, -o is literally right there in the synopsis, and no, the OPTIONS section below does not spill the tea about it. we don't make the rules. πŸ™ˆ)

πŸ¦‹ DESCRIPTION πŸ¦‹

so cyr_dbtool is used to manage a cyrusdb file. that's the whole vibe. the usable actions are:

show [<prefix>]

get <key>

set <key> <value>

delete <key>

consistency

repack

you may omit key or key/value and specify one per line on stdin instead. keys are terminated by tab or newline, values are terminated by newline. lowkey important, highkey easy to forget. 😭

running with no options at all will list the available database backends and usable actions β€” like a little menu of possibilities, iconic behavior honestly.

the consistency action runs a consistency check on the DB by calling 'myconsistent' on it. self-care for your database, fr fr. ✨

the repack action will compress the database by removing stale data on backends which support it. it's a NOOP otherwise β€” meaning on backends that don't support it, nothing happens. no drama, no results. πŸ’€

cyr_dbtool reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C.

NOTE: bestie, listen β€” the file locations are NOT read out of the configuration file, and must be supplied on the command line. that's not a suggestion, that's just how it is. 🫢
TIP: the format of all Cyrus databases is detailed in the distribution in file doc/internal/database-formats.html. please consult that for details. iykyk. πŸ“–

πŸ‘‘ OPTIONS πŸ‘‘

  • -C config-file β€” use the specified configuration file config-file rather than the default imapd.conf(5). you want a different config? say less. πŸ’…
  • -n, --create β€” create the database file if it doesn't already exist. manifestation, but make it filesystem. ✨
  • -T, --use-transaction β€” use a transaction to do the action (most especially for 'show') β€” the default used to be transactions. so if you're feeling nostalgic for the old ways, this one's for you. 🌈

πŸ’œ EXAMPLES πŸ’œ

this series of examples addresses manipulating the user_deny.db database, which is used to deny users access to specific services. this is typically a Cyrus "flat" format database. (deny girlies, this one's for you. πŸ“)

user_deny.db is indexed by userid and each record contains the database version number (currently 2), a list of "wildmat" patterns specifying Cyrus services to be denied, and a text message to be displayed to the user upon denial. the service names to be matched are those as used in cyrus.conf(5). cyr_deny(8) provides more convenient way to manage user_deny.db.

NOTE: given that keys are tab-delimited, these examples use the notation <tab> to indicate the tab character. when entering this via the command line, remember to escape tabs. in a normal shell, one can do so with <ctrl-v> (^v). the sequence "<ctrl-v><ctrl-i>" (^v^i) works well to enter tab characters. you're welcome, bestie. 😌
cyr_dbtool /var/lib/imap/user_deny.db flat baduser "2<tab>pop3,imap<tab>Denied"

Deny the user 'baduser' access to imap and pop3.

cyr_dbtool /var/lib/imap/user_deny.db flat show

Show all current database records.

cyr_dbtool /var/lib/imap/user_deny.db flat get baduser

Get the current database record(s) for user 'baduser'.


🧚 FILES 🧚

  • /etc/imapd.conf

⭐ SEE ALSO ⭐

🌟 AUTHOR 🌟

The Cyrus Team, Nic Bernstein (Onlight), Jeroen van Meeuwen (Kolab Systems)

1993–2026, The Cyrus Team


and that's the whole page, bestie!! this was Cyrus IMAP cyr_dbtool, version 3.12.4, dated Sep 09, 2026, and yeah she's still serving CYR_DBTOOL(8) energy. go manage those databases, you main character. periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from