Sieve Notification Mechanism: xmppXMPP Standards Foundationstpeter@jabber.orghttps://stpeter.im/Isode LimitedAlexey.Melnikov@isode.com
Applications
Sieve Working GroupSievenotificationExtensible Messaging and Presence ProtocolXMPPThis document describes a profile of the Sieve extension for notifications, to allow notifications to be sent over the Extensible Messaging and Presence Protocol (XMPP), also known as Jabber.The extension to the mail filtering language is a framework for providing notifications by employing URIs to specify the notification mechanism. This document defines how xmpp URIs (see ) are used to generate notifications via the Extensible Messaging and Presence Protocol (see ), which is widely implemented in Jabber instant messaging technologies.This document inherits terminology from , , and .The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in .The xmpp mechanism results in the sending of an XMPP message to notify a recipient about an email message. The general XMPP syntax is as follows:The notification MUST be an XMPP <message/> stanza.The value of the XMPP 'type' attribute MUST be 'headline' or 'normal'.The value of the XMPP 'from' attribute MUST be the XMPP address of the notification service.The XMPP <message/> stanza MAY include a <subject/> child element whose value is some configurable text indicating that the message is a Sieve notification.The notification SHOULD include a URL for the recipient to use as a hint in locating the message, encapsulated as the XML character data of a <url/> child element of an <x/> element qualified by the 'jabber:x:oob' namespace as specified in .The recommended mapping of the Sieve notify action into XMPP syntax is described in the following sections.The "method" parameter MUST be a URI that conforms to the xmpp URI scheme (as specified in ) and that identifies an XMPP account associated with the email inbox. The URI MAY include the resource identifier portion of an XMPP address but SHOULD NOT include an authority component, query component, or fragment identifier component. The processing application MUST extract an XMPP address from the URI in accordance with the processing rules specified in . The resulting XMPP address MUST be encapsulated in XMPP syntax as the value of the XMPP 'to' attribute.The ":from" tag has no special meaning for this notification mechanism, and this specification puts no restriction on its use. As noted, the value of the XMPP 'from' attribute specified in the XMPP notification message MUST be the XMPP address of the notification service itself. The value of the ":from" tag MAY be transformed into XMPP syntax; if so, it SHOULD be encapsulated as the value of an XMPP header named "Reply-To".The ":options" tag has no special meaning for this notification mechanism. Any handling of this tag is the responsibility of an implementation.The ":importance" tag has no special meaning for this notification mechanism, and this specification puts no restriction on its use. The value of the ":importance" tag MAY be transformed into XMPP syntax (in addition to or instead of including in the default message); if so, it MUST be encapsulated as the value of an XMPP header named "Urgency", and the XML character of that header MUST be "high" if the value of the ":importance" tag is "1", "medium" if the value of the ":importance" tag is "2", or "low" if the value of the ":importance" tag is "3".If included, the ":message" tag MUST be transformed into the XML character data of an XMPP <body/> element. If not included, the rule specified in SHOULD be followed, as shown in the examples below.In the following examples, the sender of the email has an address of <mailto:juliet@example.org>, the entity to be notified has an XMPP address of romeo@example.com (resulting in an XMPP URI of <xmpp:romeo@example.com>), and the notification service has an XMPP address of notify.example.com (resulting in an XMPP URI of <xmpp:notify.example.com>).The following is a basic Sieve notify action with only a method:The resulting XMPP <message/> stanza might be as follows:The following is a more advanced Sieve notify action with a method, importance, subject, and message, as well as a URL pointing to the message:The resulting XMPP <message/> stanza might be as follows:Section 3.8 of specifies a set of requirements for Sieve notification methods. The conformance of the xmpp notification mechanism is provided here.An implementation of the xmpp notification method SHOULD NOT modify the final notification text (e.g., to limit the length); however, a given deployment MAY do so (e.g., if recipients pay per character or byte for XMPP messages). Modification of characters themselves should not be necessary, since XMPP character data is encoded in .An implementation MAY ignore parameters specified in the ":from", ":importance", and ":options" tags.There is no recommended default message for an implementation to include if the ":message" argument is not specified.A notification sent via the xmpp notification method MAY include a timestamp in the textual message.The value of the XMPP 'from' attribute MUST be the XMPP address of the xmpp notification service. The value of the Sieve ":from" tag MAY be transformed into the value of an XMPP header named "Reply-To".An implementation MUST NOT include any other extraneous information not specified in parameters to the notify action.In accordance with , an implementation MUST ignore any URI action or parameter it does not understand (i.e., the URI MUST be processed as if the action or parameter were not present). It is RECOMMENDED to support the XMPP "message" query type (see ) and the associated "body" and "subject" parameters, which parameters SHOULD be mapped to the XMPP <body/> and <subject/> child elements of the XMPP <message/> stanza type, respectively. However, if included then the Sieve notify ":message" parameter MUST be mapped to the XMPP <body/> element, overriding the "body" parameter (if any) included in the XMPP URI.In response to a notify_method_capability test for the "online" notification-capability, an implementation SHOULD return a value of "yes" if it has knowledge of an active presence session for the specified notification-uri and a value of "no" if it does not have such knowledge.An implementation SHOULD NOT attempt to retry delivery of a notification if it receives an XMPP error of type "auth" or "cancel", MAY attempt to retry delivery if it receives an XMPP error of type "wait", and MAY attempt to retry delivery if it receives an XMPP error of "modify" but only if it makes appropriate modifications to the notification (see ); in any case the number of retries SHOULD be limited to a configurable number no less than 3 and no more than 10. An implementation MAY throttle notifications if the number of notifications within a given time period becomes excessive according to local service policy. Duplicate suppression (if any) is a matter of implementation and is not specified herein.Although an XMPP address may contain nearly any character, the value of the "method" parameter MUST be a Uniform Resource Identifier (see ) rather than an Internationalized Resource Identifier (see ). The rules specified in MUST be followed when generating XMPP URIs.In accordance with Section 13 of RFC 3920, all data sent over XMPP MUST be encoded in .Depending on the information included, sending a notification can be comparable to forwarding mail to the notification recipient. Care must be taken when forwarding mail automatically, to ensure that confidential information is not sent into an insecure environment. In particular, implementations MUST conform to the security considerations given in , , and .The following template provides the IANA registration of the Sieve notification mechanism specified in this document:This information should be added to the list of Sieve notification mechanisms maintained at <http://www.iana.org/assignments/sieve-notification>.Sieve Extension: NotificationsIsode LimitedIBM T.J. Watson Research CenterIBM T.J. Watson Research CenterBeThereBeSquare Inc.Users go to great lengths to be notified as quickly as possible that they have received new mail. Most of these methods involve polling to check for new messages periodically. A push method handled by the final delivery agent gives users quicker notifications and saves server resources. This document does not specify the notification method but it is expected that using existing instant messaging infrastructure such as XMPP, or SMS messages will be popular. This draft describes an extension to the Sieve mail filtering language that allows users to give specific rules for how and when notifications should be sent.Out of Band Datastpeter@jabber.orgXMPP URI Scheme Query Componentsstpeter@jabber.orgStanza Headers and Internet Metadatastpeter@jabber.orgjhildebrand@jabber.comSieve: An Email Filtering LanguageThis document describes a language for filtering email messages at time of final delivery. It is designed to be implementable on either a mail client or mail server. It is meant to be extensible, simple, and independent of access protocol, mail architecture, and operating system. It is suitable for running on a mail server where users may not be allowed to execute arbitrary programs, such as on black box Internet Message Access Protocol (IMAP) servers, as the base language has no variables, loops, or ability to shell out to external programs.Key words for use in RFCs to Indicate Requirement LevelsHarvard University1350 Mass. Ave.CambridgeMA 02138- +1 617 495 3864-
General
keywordIn many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. Authors who follow these guidelines should incorporate this phrase near the beginning of their document:
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.Note that the force of these words is modified by the requirement level of the document in which they are used.Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP)This document defines the use of Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) in identifying or interacting with entities that can communicate via the Extensible Messaging and Presence Protocol (XMPP). This document obsoletes RFC 4622.Internationalized Resource Identifiers (IRIs)The Unicode Standard, Version 3.2.0The Unicode Consortium
The Unicode Standard, Version 3.2.0 is defined by The Unicode Standard, Version 3.0 (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5), as amended by the Unicode Standard Annex #27: Unicode 3.1 (http://www.unicode.org/reports/tr27/) and by the Unicode Standard Annex #28: Unicode 3.2 (http://www.unicode.org/reports/tr28/).
Uniform Resource Identifier (URI): Generic SyntaxUTF-8, a transformation format of ISO 10646Extensible Messaging and Presence Protocol (XMPP): CoreJabber Software Foundation