iBiff uses the following format for the ENS event reference:
enp://127.0.0.1/store?param=value¶m1=value1¶m2=value2
The event key enp://127.0.0.1/store has no significance other than its uniqueness as a string. For example, the hostname portion of the event key has no significance as a hostname. It is simply a string that is part of the URI. However, the event key is user configurable. The list of iBiff event reference parameters is listed in Table 4–2 and Table 4–3 that follow.
The second part of the event reference consists of parameter-value pairs. This part of the event reference is separated from the event key by a question mark (?). The parameter and value are separated by an equals sign (=). The parameter-value pairs are separated by an ampersand (&). Note that there can be empty values, for which the value simply does not exist.
Table 4–2 describes the mandatory event reference parameters that need to be included in every notification.
Table 4–2 Mandatory Event Reference Parameters
Parameter |
Data Type |
Description |
---|---|---|
evtType |
string |
Specifies the event type. |
hostname |
string |
The hostname of the machine that generated the event. |
mailboxName |
string |
Specifies the mailbox name in the message store. The mailboxName has the format uid@domain, where uid is the user’s unique identifier, and domain is the domain the user belongs to. The @domain portion is added only when the user does not belong to the default domain (i.e. the user is in a hosted domain). |
pid |
integer |
ID of the process that generated the event. |
process |
string |
Specifies the name of the process that generated the event. |
timestamp |
64-bit integer |
Specifies the number of milliseconds since the epoch (midnight GMT, January 1, 1970). |
Table 4–3 describes optional event reference parameters, which might be seen in the event depending on the event type (see Table 4–4).
Table 4–3 Optional Event Reference Parameters
Parameter |
Data Type |
Description |
---|---|---|
client |
IP address |
The IP address of the client logging in or out. |
diskQuota |
signed 32-bit integer |
Specifies the disk space quota in kilobytes. The value is set to -1 to indicate no quotas. |
diskUsed |
signed 32-bit integer |
Specifies the amount of disk space used in kilobytes. |
hdrLen |
unsigned 32-bit integer |
Specifies the size of the message header. Note that this might not be the size of the header in the payload, because it might have been truncated. |
imapUid |
unsigned 32-bit integer |
Specifies the IMAP uid parameter. |
lastUid |
unsigned 32-bit integer |
Specifies the last IMAP uid value that was used. |
numDel |
unsigned 32-bit integer |
Specifies the number of messages marked as deleted in the mailbox. |
numMsgs |
unsigned 32-bit integer |
Specifies the number of total messages in the mailbox. |
numMsgsMax |
signed 32-bit integer |
Specifies the quota for the maximum number of messages. The value is set to -1 to indicate no quotas. |
numSeen |
unsigned 32-bit integer |
Specifies the number of messages in the mailbox marked as seen (read). |
size |
unsigned 32-bit integer |
Specifies the size of the message. Note that this may not be the size of payload, since the payload is typically a truncated version of the message. |
uidValidity |
unsigned 32-bit integer |
Specifies the IMAP uid validity parameter. |
Subscribers should allow for undocumented parameters when parsing the event reference. This allows for future compatibility when new parameters are added.
Table 4–4 shows the parameters that are available for each event type. For example, to see which parameters apply to a TrashMsg event, look in the column header for “ReadMsg, TrashMsg” and then note that these events can use numDel, numMsgs, numSeen, and userValidity.
Table 4–4 Available Parameters for Each Event Type
Parameter |
NewMsg, UpdateMsg |
ReadMsg, TrashMsg |
DeleteMsg, PurgeMsg |
Login, Logout |
OverQuota, UnderQuota |
---|---|---|---|---|---|
client |
No |
No |
No |
Yes |
No |
diskQuota |
No |
No |
No |
No |
Yes |
diskUsed |
No |
No |
No |
No |
Yes |
hdrLen |
Yes |
No |
No |
No |
No |
imapUid |
Yes |
No |
Yes |
No |
No |
lastUid |
No |
No |
Yes |
No |
No |
numDel |
No |
Yes |
No |
No |
No |
numMsgs |
Yes |
Yes |
Yes |
No |
Yes |
numMsgsMax |
No |
No |
No |
No |
Yes |
numSeen |
No |
Yes |
No |
No |
No |
size |
Yes |
No |
No |
No |
No |
uidValidity |
Yes |
Yes |
Yes |
No |
No |
userid |
No |
No |
No |
Yes |
No |