Mail logger plugin
==================

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

 * Setting and removing \Deleted flag
 * Expunging
 * Copying mails to another mailbox
 * Mailbox deletions
 * Mailbox renames
 * Any flag changes
 * Appends

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): deleted: uid=908, msgid=<123.foo@bar>
imap(user): expunged: uid=908, msgid=<123.foo@bar>
---%<-------------------------------------------------------------------------

You can enable the plugin by setting:

---%<-------------------------------------------------------------------------
mail_plugins = $mail_plugins mail_log
---%<-------------------------------------------------------------------------

Configuration
-------------

You can configure what and how mail_log plugin logs:

---%<-------------------------------------------------------------------------
plugin {
  # Events to log. Also available: flag_change append
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename

  # Group events within a transaction to one line.
  mail_log_group_events =

  # Also available: flags vsize from subject
  mail_log_fields = uid box msgid size
}
---%<-------------------------------------------------------------------------

Log grouping allows grouping multiple changes to one line. Only uid, size and
vsize fields are logged in a grouped event. The sizes are the summed up sizes
of the mails.

(This file was created from the wiki on 2010-07-02 21:30)
