notify-status plugin

New in version v2.2.33.

This plugin updates a dictionary with mailbox status information every time a mailbox changes.

Configuration

Settings

See notify-status plugin.

This plugin requires that the notify plugin be loaded.

The values to store are listed at notify_status_mailbox.

Dictionary Configuration

See Dovecot Dictionaries for how to configure dictionaries.

This plugin updates the priv/status/<mailbox name> key.

Example

mail_plugins = $mail_plugins notify notify_status

plugin {
  notify_status_dict = proxy:dict-async:notify_status

  # By default all mailboxes are added to dict. This can be limited with:
  #notify_status_mailbox = INBOX
  #notify_status_mailbox2 = pattern2/*
  #...
}

SQL dict Example

If SQL dict is used, you can use this dictionary map:

map {
  pattern = priv/status/$box
  table = mailbox_status
  value_field = status
  username_field = username

  fields {
    mailbox = $box
  }
}

The matching SQL schema is:

CREATE TABLE mailbox_status (
  username VARCHAR(255) NOT NULL,
  mailbox VARCHAR(255) NOT NULL,
  status VARCHAR(255),
  PRIMARY KEY (username, mailbox)
);