Search K
Appearance
Appearance
This plugin updates a dictionary with mailbox status information every time a mailbox changes.
Note
This plugin requires that the notify plugin is loaded.
notify_status_dict
Default | [None] |
---|---|
Value | string |
The URI of the dictionary to use. This MUST be set for the plugin to be active.
See dictionary for how to configure dictionaries.
plugin {
notify_status_dict = proxy:dict-async:notify_status
}
notify_status_mailbox
Default | [None] |
---|---|
Value | string |
A mailbox pattern to enable for status updates. Wildcards are acceptable.
By default, all mailboxes are processed. When defining one or more patterns only mailboxes matching the pattern are enabled for status updates.
You can define multiple mailbox patterns by appending an increasing number to the setting label.
Example:
plugin {
notify_status_mailbox = Spam
notify_status_mailbox2 = Archive/*
}
notify_status_value
Default | {"messages":%%{messages},"unseen":%%{unseen}} |
---|---|
Value | string |
A template of the string that will be written to the dictionary.
The template supports variable substitution of the form
%%{variable_name}
.
Supported variable substitutions:
Field | Value |
---|---|
first_recent_uid |
First recent UID |
highest_modseq |
Highest modification sequence number |
highest_pvt_modseq |
Highest private modification sequence number |
mailbox |
Mailbox name |
messages |
Number of messages |
recent |
Number of recent messages (deprecated) |
uidnext |
Predicted next UID value |
uidvalidity |
Current UID validity |
unseen |
Number of unseen messages |
username |
Username (user@domain) |
See dictionary for how to configure dictionaries.
This plugin updates the priv/status/<mailbox name>
key.
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/*
#...
}
map {
pattern = priv/status/$box
table = mailbox_status
value_field = status
username_field = username
fields {
mailbox = $box
}
}
CREATE TABLE mailbox_status (
username VARCHAR(255) NOT NULL,
mailbox VARCHAR(255) NOT NULL,
status VARCHAR(255),
PRIMARY KEY (username, mailbox)
);