DOVEADM-DIRECTOR(1)
๐ NAME ๐
doveadm-director โ manage Dovecot directors. that's the whole job description bestie, and she does it flawlessly ๐
(it's a Dovecot manual page, section 1, iykyk)
โจ SYNOPSIS โจ
doveadm [-Dv] [-f formatter] director command [OPTIONS] [ARGUMENTS]
๐ DESCRIPTION ๐
ok so doveadm director is your girl for both managing and querying the status of the list of backend mail servers where the Dovecot proxy can redirect connections to. two jobs. both iconic. she ate ๐ซถ
๐ OPTIONS ๐
๐
Global doveadm(1) options ๐
-Dโ enables verbosity and debug messages. she's chatty, we love that.-f formatterโ specifies the formatter for formatting the output. the supported formatters are literally these four:flowโ prints each line withkey=valuepairs.pagerโ prints eachkey: valuepair on its own line and separates records with a 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 setting=valueโ overrides the configuration setting from/etc/dovecot/dovecot.confand from the userdb with the given value. and listen, in order to override multiple settings, the-ooption may be specified multiple times. no cap.-vโ enables verbosity, including the progress counter. โญ
๐ Command specific options ๐
-a director_socket_pathโ this option is used to specify an alternative socket. 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. by defaultdoveadm(1)will use the socket/run/dovecot/director-admin. the socket may be located in another directory when the defaultbase_dirsetting was overridden in/etc/dovecot/dovecot.conf. so like, check your config before you spiral ๐
๐ธ ARGUMENTS ๐ธ
hostโ a mail server's hostname or IP address.ipโ a director's IP address.portโ the TCP port on which the director server is listening for connections. the default port is the same as what the local director is listening in.userโ a user's login name. depending on the configuration, a login name may be for examplejaneorjohn@example.com.vhost_countโ the number of "virtual hosts" to assign to this server. the higher the number is relative to other servers, the more connections it gets. the default is100. โ๏ธ
๐ COMMANDS ๐
director add
doveadm director add [-a director_socket_path] host [vhost_count]
the command's tasks are:
- assign a new mail server to the director.
- increase/decrease the
vhost_countof an already assigned server.
director dump
doveadm director dump [-a director_socket_path]
dump the current host configuration as doveadm commands. these commands can be easily run after a full director cluster restart to get back to the dumped state. it's giving โจrestoration arcโจ
director flush
doveadm director flush [-a director_socket_path] [-F] [--max-parallel n]
host|all
doveadm director flush removes all user associations either from the given host or all hosts. all the existing connections will be kicked. if director_flush_socket is specified, a flush script is also automatically executed.
because the kicking and moving of users to new backends creates a temporary load spike, all the users aren't moved at once. the --max-parallel parameter specifies how many users can be moved concurrently. the default is 100.
if the -F parameter is used, the user associations are simply dropped. existing connections won't be kicked and flush scripts aren't run.
lowkey important: -F is the "no drama, just drop it" mode. nobody gets kicked, no scripts run. ๐
director kick
doveadm director kick [-a director_socket_path] user
kick the specified user from the entire Dovecot cluster. this is similar to doveadm proxy kick, but this command needs to be run only once instead of in each director server. one and done, main character energy ๐
director map
doveadm director map [-a director_socket_path] [-f users_file] [-h|-u]
[host]
the command doveadm director map is used to list current user โ host mappings.
โ ๏ธ note that the director works using 32bit hashes which makes collisions quite likely, so this command can't reliably list exactly which users have recently logged in. don't treat it like gospel, bestie. ๐
-f users_fileโ path to a file containing all user names (one per line). when given, no userdb lookup will be performed. this may be a helpful alternative when for example the network connection to the LDAP or SQL server is slow.-hโ output all usernames which match the given hash.-uโ output hash for the given username.hostโ specify a server's IP address or hostname, to list only mappings of the given host.
director move
doveadm director move [-a director_socket_path] user host
move the user to the specified backend host. if the user has any existing connections they will be killed. ๐ sorry girl
director remove
doveadm director remove [-a director_socket_path] host
use this command in order to remove the given host from the director.
director ring add
doveadm director ring add [-a director_socket_path] ip [port]
add a new director to the ring. ๐โจ
director ring remove
doveadm director ring remove [-a director_socket_path] ip [port]
remove a director from the ring.
director ring status
doveadm director ring status [-a director_socket_path]
show the status of all the directors currently in the ring.
director status
doveadm director status [-a director_socket_path] [user]
this command is used to show the current usage of all assigned mail servers.
when a user name is given, this command shows which server the user is currently assigned to, where the user will be assigned after the current saved assignment gets removed, and where the user would be assigned to if the whole proxy cluster was restarted fresh. three futures, one command, we stan ๐ฎ
๐๏ธ FILES ๐๏ธ
/etc/dovecot/dovecot.confโ Dovecot's main configuration file./etc/dovecot/conf.d/10-director.confโ Director specific settings.
๐ EXAMPLE ๐
add a director with vhost count 150 (or change an existing one's vhost count to 150):
doveadm -v director add x1357.imap.ha.example.net 150
2001:db8:543:6861:143::1357: OK
remove a director:
doveadm director remove x1357.imap.ha.example.net
query the status of mail hosts in a director:
doveadm director status
mail server ip vhosts users
192.168.10.1 100 125
192.168.10.2 100 144
192.168.10.3 100 115
query the status of a user's assignment:
doveadm director status user@example.com
Current: 192.168.10.1 (expires 2010-06-18 20:17:04)
Hashed: 192.168.10.2
Initial config: 192.168.10.3
so what does all that mean? this means that the user is currently assigned to the mail server on IP 192.168.10.1. after all of the user's connections have logged out, the assignment will be removed (currently it looks like at 20:17:04, but that may be increased). after the assignment has expired, the user will next time be redirected to 192.168.10.2 (assuming no changes to director settings). and if the entire Dovecot proxy cluster was restarted, so that all of the director configuration would revert back to its initial values, the user would be redirected to 192.168.10.3. the whole timeline is right there, obsessed ๐
๐ REPORTING BUGS ๐
report bugs, including doveconf -n output, to the Dovecot Mailing List <dovecot@dovecot.org>. information about reporting bugs is available at: http://dovecot.org/bugreport.html
fr fr, include the doveconf -n output. they want it, periodt.
๐ SEE ALSO ๐
and that's the whole page bestie ๐ซถ this one's from Dovecot v2.3, dated 2014-08-30. go forth and manage those directors, you absolute icon ๐ง๐
๐ฆ where this page comes from
- debian bookworm: dovecot-core 1:2.3.19.1+dfsg1-2.1+deb12u6 ยท LGPL-2.1-only
- debian bookworm: dovecot-core 1:2.3.19.1+dfsg1-2.1+deb12u7 ยท LGPL-2.1-only
- ubuntu noble: dovecot-core 1:2.3.21+dfsg1-2ubuntu5 ยท LGPL-2.1-only
- ubuntu noble: dovecot-core 1:2.3.21+dfsg1-2ubuntu6.5 ยท LGPL-2.1-only
- Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms