Search K
Appearance
Appearance
push-notification
) Plugin: Chronos Backend Added: 3.0.0
The Chronos push-notification backend supports sending notifications on MessageNew
events if the message contains a calendar invite.
This driver was designed for use with the OX App Suite iCalendar Transport-Independent Interoperability Protocol (iTIP), but can be used by any endpoint that implements the same API.
INFO
The chronos push notification backend requires the push-notification plugin to be loaded.
Key/Value options used with push_notification_driver
:
Name | Required | Type | Description |
---|---|---|---|
url | YES | string | The HTTP end-point (URL + authentication information) to use for sending the push notification.Contains authentication information needed for Basic Authentication (if any).Example: http<s> + "://" + <login> + ":" + <password> + "@" + <host> + ":" + <port> + "/chronos/v1/itip/pushmail" For HTTPS endpoints, system CAs are trusted by default, but internal CAs might need further configuration.See Configuring OX App Suite endpoint. |
max_retries | NO | unsigned integer | The maximum number of times to retry a connection to the API endpoint. Setting it to 0 will disable retries. (DEFAULT: 1 ) |
timeout | NO | time (milliseconds) | Time before HTTP request to the configured API endpoint will timeout. (DEFAULT: 2s ) |
msg_max_size | NO | size | Maximum size a message may have to be considered for push notification sending. (DEFAULT: 1M ) |
mail_plugins = $mail_plugins notify push_notification push_notification_chronos
plugin {
push_notification_driver = chronos:url=http://login:pass@node1.domain.tld:8009/chronos/v1/itip/pushmail msg_max_size=500kb
}
Push notification is sent in JSON format with the following fields:
Name | Type | Description |
---|---|---|
user | string | The username of the account receiving the message on the Dovecot backend. |
event | string | RFC 5423 event type. Currently, only MessageNew . |
folder | string | Mailbox name in which the message was saved. Can be other than INBOX, in case sieve filters are active. A trivial deduplication is enabled if the sieve script copies the files into different folders, then only for one of the messages a push notification will be sent. |
body | string | Full message content of the mail, including headers and text. The field content is escaped to comply to the JSON format. |
Content-Type: application/json; charset=utf-8
{
"user": "4@464646669",
"event": "MessageNew",
"folder": "INBOX",
"body": "From: user@example.com\nTo: user2@example.com\nSubject: calendar\nContent-Type: text/calendar\n\nICAL CONTENT\n"
}