DOVEADM-KICK(1)
π DOVEADM-KICK π
okay bestie, gather round, because this is doveadm-kick from the Dovecot manual pages (section 1) and it is literally the "you're done here, log off" button. It disconnects users by user name and/or IP address. no cap. π
πΈ NAME πΈ
doveadm-kick β Disconnect users by user name and/or IP address β¨
π¦ SYNOPSIS π¦
okay so there are four whole vibes of this command, and you pick based on what you're mad at:
doveadm [GLOBAL OPTIONS] kick [-a anvil_socket_path] [-f passdb_field]
[-h dest_host] user_mask
doveadm [GLOBAL OPTIONS] kick [-a anvil_socket_path] [-f passdb_field]
[-h dest_host] ip [/ bits]
doveadm [GLOBAL OPTIONS] kick [-a anvil_socket_path] [-f passdb_field]
[-h dest_host] user_mask ip [/ bits]
doveadm [GLOBAL OPTIONS] kick [-a anvil_socket_path] [-f passdb_field]
-h dest_host
π DESCRIPTION π
doveadm's kick command is the one that disconnects users by user_mask and/or the ip address they're connected from. it's giving bouncer energy but for IMAP. πͺ
here's the tea on the four forms:
- First form β every user whose login name matches the
user_maskargument gets disconnected. bye boo π - Second form β every user connected from the given IP address or network range gets disconnected. the whole block, gone.
- Third form β only the users connected from the given IP address or network range and with a matching login name get disconnected. both boxes checked or you stay.
- Last form β all proxy connections to the given destination host are disconnected. not a single user, just the pipes to that host. π«Ά
π«Ά GLOBAL OPTIONS π«Ά
these are the global doveadm(1) options, not kick-exclusive, but they apply here too:
-Dβ Enables verbosity and debug messages. it's yapping mode, but make it diagnostic. π£οΈ-Oβ Do not read any config file, just use defaults. Thedovecot_storage_versionsetting defaults to the latest version, but can be overridden with-o. raw-dogging the defaults, iconic.-kβ Preserve entire environment fordoveadm, not justimport_environmentsetting. the whole env, not a sampler platter.-vβ Enables verbosity, including progress counter. progress bar girlies rise π-iinstance-nameβ If using multiple Dovecot instances, choose the config file based on this instance name. Seeinstance_namesetting for more information. multi-instance besties, this one's for you.-cconfig-fileβ Read configuration from the givenconfig-file. By default it first reads config socket, and then falls back to/etc/dovecot/dovecot.conf. You can also point this to config socket of some instance running compatible version.-osetting=valueβ Overrides the configuration setting from/etc/dovecot/dovecot.confand from the userdb with the given value. In order to override multiple settings, the-ooption may be specified multiple times. stack them like bracelets. β¨
π OPTIONS π
these are the kick-specific ones, the actual main characters:
-aanvil_socket_pathβ This option is used to specify an absolute path to an alternative UNIX domain socket. By defaultdoveadm(1)will use the socket/rundir/anvil. The socket may be located in another directory, when the defaultbase_dirsetting was overridden in/etc/dovecot/dovecot.conf.-fpassdb_fieldβ Alternative username field to use for kicking, as returned by passdb. Only the passdb fields beginning with theuser_prefix are tracked. lowkey picky, but fair. π-hdest_hostβ Disconnect proxy connections to the givendest_host. bye proxy π«‘
π ARGUMENTS π
ip [/ bits]βiporip / bitsis the host or network, from which the users are connected.user_maskβ Is a user's login name, or the alternative username (user_*field) if the-fparameter is used. Depending on the configuration, a login name may be for examplejaneorβ¨john@example.comβ©. It's also possible to use'*'and'?'wildcards (e.g.-u *@example.org). wildcards?? we love a flexible queen π
β EXAMPLE β
If you don't want to disconnect all users at once, you can check who's currently logged in first. peek before you yeet. π
The first example demonstrates how to disconnect all users whose login name is 3 characters long and begins with ba:
doveadm who -1 ja\*
username service pid ip
jane imap 8192 ::1
jano imap 8196 ::2
james imap 8203 2001:db8:543:2::1
doveadm kick jan?
# The connections for jane and jano are kicked.
The next example shows how to kick user foo's connections from 192.0.2.*:
doveadm who -1 foo
username service pid ip
foo imap 8135 fd95:4eed:38ba::25
foo imap 9112 192.0.2.53
foo imap 8216 192.0.2.111
doveadm kick foo 192.0.2.0/24
doveadm who f\*
username # service (pids) (ips)
foo 1 imap (8135) (fd95:4eed:38ba::25)
notice how thefd95:4eed:38ba::25connection survived? yeah. you only kicked the192.0.2.0/24ones.kickdoesn't do "and also everything else", bestie. read the args. π
π₯ REPORTING BUGS π₯
Report bugs, including doveconf -n output, to the Dovecot Mailing List β¨dovecot@dovecot.orgβ©. Information about reporting bugs is available at: β¨https://dovecot.org/bugreport.htmlβ©
(include the doveconf -n output, fr fr β the maintainers need it or they'll be asking in the group chat forever π§)
π SEE ALSO π
that's the whole page, bestie. this revision is f979264, and it's dated April 2026 β so if you're reading this from the future, hiiii, hope your anvil socket is healthy. mwah, bye! πβ¨ππ¦πΈπ
π¦ 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