This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.

Mail logger plugin

This plugin can be used to log several actions done in a mail session:

Messages' UID and Message-ID header is logged for each action. Here's an example:

imap(user): copy -> Trash: uid=908, msgid=<123.foo@bar>
imap(user): delete: uid=908, msgid=<123.foo@bar>
imap(user): expunged: uid=908, msgid=<123.foo@bar>

You can enable the plugin globally for all services by setting:

mail_plugins = $mail_plugins mail_log notify

The notify plugin is required for the mail_log plugin's operation, so be certain it's also enabled.

Configuration

You can configure what and how mail_log plugin logs:

plugin {
  # Events to log. Defined in src/plugins/mail-log/mail-log-plugin.c - also available: flag_change save mailbox_create
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename

  # Also available: Defined in src/plugins/mail-log/mail-log-plugin.c - flags vsize from subject
  mail_log_fields = uid box msgid size
}

Plugins/MailLog (last edited 2015-08-14 15:03:54 by palpatine)