doveadm

Dovecot mail server administration tool

TLDR

Show mailbox status
$ doveadm mailbox status -u [[email protected]] all '*'
List user mailboxes
$ doveadm mailbox list -u [[email protected]]
Search messages
$ doveadm search -u [[email protected]] mailbox INBOX subject "[test]"
Expunge deleted messages
$ doveadm expunge -u [[email protected]] mailbox Trash all
Force user reindex
$ doveadm index -u [[email protected]] INBOX
Show user quota
$ doveadm quota get -u [[email protected]]
Sync mailboxes
$ doveadm sync -u [[email protected]] [remote_host]

SYNOPSIS

doveadm [options] command [args]

DESCRIPTION

doveadm is the administration tool for Dovecot IMAP/POP3 server. It provides commands for managing mailboxes, users, and server operations without directly manipulating mail storage.The tool handles tasks like mailbox maintenance, message search and manipulation, quota management, and replication control.

PARAMETERS

-u user

Target user for operation.
-A
Apply to all users.
-D
Enable debug output.
-v
Verbose output.
-f format
Output format (flow, pager, tab, table).
-o setting=value
Override configuration.

CONFIGURATION

/etc/dovecot/dovecot.conf

Main Dovecot configuration file controlling mail storage, authentication, and protocols.

COMMANDS

mailbox list/status/create/delete/rename: Mailbox managementsearch: Find messagesfetch: Retrieve message dataexpunge: Delete messagesindex: Reindex mailboxesquota: Quota operationssync: Dsync replicationuser: User information

INSTALL

sudo apt install dovecot-core
sudo dnf install dovecot
sudo pacman -S dovecot
sudo apk add dovecot
sudo zypper install dovecot
brew install dovecot
nix profile install nixpkgs#dovecot

CAVEATS

Requires proper Dovecot configuration. Some commands need root or dovecot user. Operations on large mailboxes can be slow. User must exist in Dovecot's user database.

HISTORY

doveadm was introduced in Dovecot 2.0 around 2010, replacing older administrative scripts. Dovecot itself was created by Timo Sirainen in 2002 as a secure, high-performance IMAP server. Doveadm unified various administrative tasks into a single, consistent interface.

SEE ALSO

dovecot(1), postfix(1), mutt(1)