"doveadm" Command - Dovecot's Administration Utility

This section provides a tutorial example on how to use the 'doveadm' command, Dovecot's Administration Utility, to manage various parts of Dovecot.

What Is "doveadm" Command? - "doveadm" command is the Dovecot administration tool. It can be used to manage various parts of Dovecot, as well as access users' mailboxes.

Here is a list of sub-commands and options supported by "doveadm".

herong$ sudo doveadm help

usage: doveadm [-Dv] [-f <formatter>] <command> [<args>]

  altmove      [-u <user>|-A] [-S <socket_path>] [-r] <search query>
  auth         cache|login|lookup|test
  backup       [-u <user>|-A] [-S <socket_path>] [-fPRU] [-l <secs>] ...
  batch        [-u <user>|-A] [-S <socket_path>] <sep> <cmd1> [<sep> ...
  config       [doveconf parameters]
  copy         [-u <user>|-A] [-S <socket_path>] <destination> [user ...
  deduplicate  [-u <user>|-A] [-S <socket_path>] [-m] <search query>
  dict         get|inc|iter|set|unset
  director     add|down|dump|flush|kick|map|move|remove|ring|status|...
  dump         [-t <type>] <path>
  exec         <binary> [binary parameters]
  expunge      [-u <user>|-A] [-S <socket_path>] [-m] <search query>
  fetch        [-u <user>|-A] [-S <socket_path>] <fields> <search query>
  flags        add|remove|replace
  force-resync [-u <user>|-A] [-S <socket_path>] [-f] <mailbox mask>
  fs           copy|delete|get|iter|iter-dirs|metadata|put|stat
  help         <cmd>
  import       [-u <user>|-A] [-S <socket_path>] [-U source-user] [-s] ...
  index        [-u <user>|-A] [-S <socket_path>] [-q] [-n <max recent>] ...
  instance     list|remove
  kick         [-a <anvil socket path>] <user mask>[|]<ip/bits>
  log          errors|find|reopen|test
  mailbox      cache|cache|create|delete|list|metadata|mutf7|path|rename|...
  move         [-u <user>|-A] [-S <socket_path>] <destination> [user ...
  oldstats     dump|reset|top
  penalty      [-a <anvil socket path>] [<ip/bits>]
  process      status
  proxy        kick|list
  purge        [-u <user>|-A] [-S <socket_path>]
  pw           [-l] [-p plaintext] [-r rounds] [-s scheme] [-t hash] ...
  rebuild      attachments
  reload
  replicator   add|dsync-status|remove|replicate|status
  save         [-u <user>|-A] [-S <socket_path>] [-m mailbox]
  search       [-u <user>|-A] [-S <socket_path>] <search query>
  service      status|stop
  sis          deduplicate|find
  stats        dump
  stop
  sync         [-u <user>|-A] [-S <socket_path>] [-1fPRU] [-l <secs>] ...
  user         [-a <userdb socket path>] [-x <auth info>] [-f field] ...
  who          [-a <anvil socket path>] [-1] [<user mask>] [<ip/bits>]
  zlibconnect  <host> [<port>]

Here are some example of "doveadm" usages.

1. Use "doveadm who" command to display who is logged in to the Dovecot server currently.

herong$ sudo doveadm who

username # proto (pids)  (ips)
joe      1 pop3  (16185) (192.168.1.22)
herong   5 imap  (15632 15647 15642 15597 15684) (192.168.1.11)

2. Use "doveadm user" command to look at a user's mailbox information.

herong $ sudo doveadm user joe

field  value
uid  1004
gid  1005
home  /home/joe
mail  maildir:~/Maildir
system_groups_user  joe

3. Use "doveadm config" to list all current configuration settings.

herong$ sudo doveadm config | grep ssl_cert

ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_cert_username_field = commonName

4. Use "doveadm process" to list all processes initiated by Dovecot.

herong$ sudo doveadm process status

name        pid   available_count total_count idle_start  last_kill_sent
stats       26572 993             2137        0           0
log         26556 971             29          0           0
imap        11228 0               1           0           0
imap        5882  0               1           0           0
imap-login  11224 0               1           0           0
imap-login  5878  0               1           0           0
config      26557 997             2131        0           0
auth        26573 1000            2114        1606188957  0
auth-worker 13406 0               1           0           0
anvil       26555 997             1907        0           0

Table of Contents

 About This Book

 Introduction to Email

 Postfix - Mail Transport Agent (MTA)

 SSL/TLS Secure Connections with Postfix Server

Dovecot - IMAP and POP3 Server

 What Is Dovecot

 Install and Configure Dovecot on CentOS

 Test Dovecot IMAP Server with "telnet" Client

 Test Dovecot POP3 Server with "telnet" Client

 Keep Deleted Emails on Dovecot

 Turn on Dovecot Server Logging for Troubleshooting

"doveadm" Command - Dovecot's Administration Utility

 SSL/TLS Secure Connections with Dovecot Server

 Email Client Tools - Mail User Agents (MUA)

 Mozilla Thunderbird - Mail User Agents (MUA)

 PHPMailer - PHP Package for Sending Emails

 Email Message Format and Headers

 References

 Full Version in PDF/EPUB