doveadm
The doveadm command is a powerful administrative utility provided by Dovecot for managing and querying various aspects of the Dovecot mail server. It helps with tasks like managing mailboxes, inspecting user data, and performing administrative operations.
Overview of doveadm
doveadmPurpose:
doveadmis used for performing administrative tasks on the Dovecot mail server. This includes querying mailbox status, managing mailboxes, testing authentication, and more.Usage:
doveadmprovides a range of subcommands to interact with different aspects of the Dovecot service.
Common doveadm Subcommands
doveadm SubcommandsHere’s an overview of some commonly used doveadm subcommands:
doveadm auth testPurpose: Test authentication mechanisms for a specific user.
Usage:
doveadm auth test <username>Example:
doveadm auth test user@example.comDescription: Tests whether the user can authenticate with the current configuration.
doveadm auth statusPurpose: Display the status of the authentication service.
Usage:
doveadm auth status
doveadm auth statsPurpose: Show statistics related to authentication.
Usage:
doveadm auth stats
doveadm mailbox statusPurpose: Display status information for mailboxes.
Usage:
doveadm mailbox status -u <user>Example:
doveadm mailbox status -u user@example.com
doveadm mailbox listPurpose: List all mailboxes for a specific user.
Usage:
doveadm mailbox list -u <user>Example:
doveadm mailbox list -u user@example.com
doveadm syncPurpose: Synchronize mailboxes between different servers.
Usage:
doveadm sync -u <user>Example:
doveadm sync -u user@example.com
doveadm expungePurpose: Expunge (delete) messages from mailboxes.
Usage:
doveadm expunge -u <user> <criteria>Example:
doveadm expunge -u user@example.com before 30d
doveadm flushPurpose: Flush mailbox cache or index files.
Usage:
doveadm flush -u <user>
doveadm auth testPurpose: Test authentication for a user.
Usage:
doveadm auth test user@example.com
doveadm backupPurpose: Perform backup operations on mailboxes.
Usage:
doveadm backup -u <user>
Example Commands and Their Outputs
Testing Authentication:
doveadm auth test user@example.comOutput: Displays whether the authentication was successful or if there were errors.
Listing Mailboxes:
doveadm mailbox list -u user@example.comOutput: Lists all mailboxes associated with the specified user.
Expunging Messages:
doveadm expunge -u user@example.com before 30dOutput: Removes messages older than 30 days from the specified user's mailboxes.
Conclusion
The doveadm command is a versatile tool for managing and querying Dovecot’s mail services. It provides administrators with various functionalities to ensure the proper operation and maintenance of mailboxes and user data. Mastery of doveadm commands can significantly enhance the management of a Dovecot mail server and simplify administrative tasks.
Last updated