DOVEADM-MAILBOX-CRYPTOKEY(1)
πΈ DOVEADM-MAILBOX-CRYPTOKEY π
okay bestie, so this is a page from the Dovecot manual β it's the doveadm-mailbox-cryptokey one, aka the mail crypt plugin management era of your life. Let's get into it π
β¨ NAME β¨
doveadm-mailbox-cryptokey β mail crypt plugin management, no cap. it's giving key management main character energy π
π¦ SYNOPSIS π¦
doveadm [-o crypt_user_key_password=password] [GLOBAL OPTIONS] mailbox
cryptokey export|generate|list|password [options] [arguments]
π DESCRIPTION π
Generate a new keypair for a user or for a folder. The new keypair gets marked as active, periodt. β¨
π OPTIONS π
doveadm mailbox cryptokey can be used to manage your user's cryptographic keys. that's the whole vibe fr fr.
π GLOBAL OPTIONS π
these are the global doveadm(1) options, the ones that apply everywhere π«
-Dβ turns on verbosity and debug messages. yapping mode: enabled π£οΈ-Oβ don't read any config file at all, just use the defaults. thedovecot_storage_versionsetting defaults to the latest version, but you can override it with-o.-kβ preserve the entire environment fordoveadm, not just theimport_environmentsetting. keep the whole vibe, not a fragment π«Ά-vβ enables verbosity, including a progress counter. progress bar girlies rise π-iinstance-name β if you're running multiple Dovecot instances, pick the config file based on this instance name. see theinstance_namesetting for more info.-cconfig-file β read configuration from the given config-file. by default it first reads the config socket, and then falls back to/etc/dovecot/dovecot.conf. you can also point this at the config socket of some instance running a compatible version.-osetting=value β overrides the configuration setting from/etc/dovecot/dovecot.confand from the userdb with the given value. and to override multiple settings, just stack the-ooption as many times as you want π-fformatter β specifies the formatter for formatting the output. the supported formatters are:flowβ prints each line withkey=valuepairs.jsonβ prints a JSON array of JSON objects.pagerβ prints eachkey: valuepair on its own line and separates records with form feed character (^L).tabβ prints a table header followed by tab separated value lines.tableβ prints a table header followed by adjusted value lines.
-o crypt_user_key_password=passwordβ Dovecot option, needed if you use password protected keys π
π OPTIONS π
(same heading name, different energy β these are the ones for this command specifically)
-Aβ if the-Aoption is present, the command will be performed for all users. using this option in combination with system users fromuserdb { driver = passwd }is not recommended, because it contains also users with a lower UID than the one configured with thefirst_valid_uidsetting. π
When the SQL userdb module is used, make sure that the userdb_sql_iterate_query setting matches your database layout.
When using the LDAP userdb module, make sure that the userdb_fields setting and the userdb_ldap_iterate_fields setting match your LDAP schema. otherwise doveadm(1) will be unable to iterate over all users. no cap, it just won't.
-Ffile β execute the command for all the users in the file. this is similar to the-Aoption, but instead of getting the list of users from the userdb, they're read from the given file. the file contains one username per line. π--no-userdb-lookupβ do not perform a userdb lookup. use theUSERenvironment variable to specify the username.-Ssocket_path β the option's argument is either an absolute path to a local UNIX domain socket, or a hostname and port (hostname:port), in order to connect a remote host via a TCP socket.
This allows an administrator to execute doveadm(1) mail commands through the given socket. π§
-uuser/mask β run the command only for the given user. it's also possible to use'*'and'?'wildcards (e.g.-u *@example.org). wildcard slay β
π SUBCOMMANDS π
export [-U] | mailbox-mask
-Uβ operate on user keypair only
Exports user's or folder's keypair(s) in PEM format. if the keys are password protected, -o is needed. π₯
generate [-Rf [-U] | mailbox-mask]
-Uβ operate on user keypair only-Rβ re-encrypt all folder keys with current active user key-fβ force keypair creation; normally a keypair is only created if none is found
Generates a new keypair for user or folder. if you want to generate a new user key and use it to secure your folder keys, use generate -u username -UR. π«Ά
If you want to password-protect your key here, use -o.
list [-U] | mailbox-mask
-Uβ operate on user keypair only
List all keys for user or folder. no password is required. easy peasy π
password [-N | -n password] [-O|-o password] [-C]
-Oβ ask for old password-oold-password β provide old password-Nβ ask for new password-nnew-password β provide new password-Cβ clear (unset/remove) the password. your key will not be protected by a password.
Set, change or clear the password from your user key. glow-up for your credentials β¨
π SEE ALSO π
doveadm(1), doveadm-mailbox(1) β go read those too, bestie π
and that's the whole page!! this one's from Dovecot, version tag f979264, dated April 2026 β so yeah, it's fresh π thanks for reading my little manpage rewrite, ily, go manage those crypt keys responsibly ππΈ
π¦ where this page comes from
- alpine 3.23: dovecot-doc 2.4.5-r0 Β· MIT AND LGPL-2.1-or-later
- alpine 3.24: dovecot-doc 2.4.5-r0 Β· MIT AND LGPL-2.1-or-later
- arch rolling: dovecot 2.4.5-1 Β· MIT AND LGPL-2.1-only
- fedora 43: dovecot 1:2.4.5-1.fc43 Β· MIT AND LGPL-2.1-only
- fedora 44: dovecot 1:2.4.5-1.fc44 Β· MIT AND LGPL-2.1-only
- nixos 26.05: dovecot 2.4.5
- nixpkgs unstable: dovecot 2.4.5
- opensuse-leap 16.0: dovecot24 2.4.5-160000.1.1 Β· BSD-3-Clause AND LGPL-2.1-or-later AND MIT
- opensuse-leap 16.0: dovecot24 2.4.5-160000.1.1 Β· BSD-3-Clause AND LGPL-2.1-or-later AND MIT
- opensuse-leap 16.0: dovecot24 2.4.5-160000.1.1 Β· BSD-3-Clause AND LGPL-2.1-or-later AND MIT
- opensuse-leap 16.0: dovecot24 2.4.5-160000.1.1 Β· BSD-3-Clause AND LGPL-2.1-or-later AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms