TOC 
Sieve Working GroupP. Saint-Andre
Internet-DraftXMPP Standards Foundation
Intended status: Standards TrackA. Melnikov
Expires: April 3, 2008Isode Limited
 October 01, 2007


Sieve Notification Mechanism: xmpp
draft-ietf-sieve-notify-xmpp-05

Status of this Memo

By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work in progress.”

The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt.

The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html.

This Internet-Draft will expire on April 3, 2008.

Abstract

This 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.



Table of Contents

1.  Introduction
    1.1.  Overview
    1.2.  Terminology
2.  Definition
    2.1.  Notify parameter "method"
    2.2.  Notify tag ":from"
    2.3.  Notify tag ":options"
    2.4.  Notify tag ":importance"
    2.5.  Notify tag ":message"
3.  Examples
4.  Requirements Conformance
5.  Internationalization Considerations
6.  Security Considerations
7.  IANA Considerations
8.  References
    8.1.  Normative References
    8.2.  Informative References
§  Authors' Addresses
§  Intellectual Property and Copyright Statements




 TOC 

1.  Introduction



 TOC 

1.1.  Overview

The [NOTIFY] (Melnikov, A., Leiba, B., Segmuller, W., and T. Martin, “Sieve Extension: Notifications,” July 2007.) extension to the [SIEVE] (Showalter, T. and P. Guenther, “Sieve: An Email Filtering Language,” February 2007.) mail filtering language is a framework for providing notifications by employing URIs to specify the notification mechanism. This document defines how xmpp URIs (see [XMPP‑URI] (Saint-Andre, P., “Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP),” June 2007.)) are used to generate notifications via the Extensible Messaging and Presence Protocol (see [XMPP] (Saint-Andre, P., “Extensible Messaging and Presence Protocol (XMPP): Core,” October 2004.)), which is widely implemented in Jabber instant messaging technologies.



 TOC 

1.2.  Terminology

This document inherits terminology from [NOTIFY] (Melnikov, A., Leiba, B., Segmuller, W., and T. Martin, “Sieve Extension: Notifications,” July 2007.), [SIEVE] (Showalter, T. and P. Guenther, “Sieve: An Email Filtering Language,” February 2007.), and [XMPP] (Saint-Andre, P., “Extensible Messaging and Presence Protocol (XMPP): Core,” October 2004.).

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 [TERMS] (Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” March 1997.).



 TOC 

2.  Definition

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 recommended mapping of the Sieve notify action into XMPP syntax is described in the following sections.



 TOC 

2.1.  Notify parameter "method"

The "method" parameter MUST be a URI that conforms to the xmpp URI scheme (as specified in [XMPP‑URI] (Saint-Andre, P., “Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP),” June 2007.)) 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 [XMPP‑URI] (Saint-Andre, P., “Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP),” June 2007.). The resulting XMPP address MUST be encapsulated in XMPP syntax as the value of the XMPP 'to' attribute.



 TOC 

2.2.  Notify tag ":from"

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 [SHIM] (Saint-Andre, P. and J. Hildebrand, “Stanza Headers and Internet Metadata,” August 2005.) header named "Reply-To".



 TOC 

2.3.  Notify tag ":options"

The ":options" tag has no special meaning for this notification mechanism. Any handling of this tag is the responsibility of an implementation.



 TOC 

2.4.  Notify tag ":importance"

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 [SHIM] (Saint-Andre, P. and J. Hildebrand, “Stanza Headers and Internet Metadata,” August 2005.) 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".



 TOC 

2.5.  Notify tag ":message"

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 [NOTIFY] (Melnikov, A., Leiba, B., Segmuller, W., and T. Martin, “Sieve Extension: Notifications,” July 2007.) SHOULD be followed, as shown in the examples below.



 TOC 

3.  Examples

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:

  notify "xmpp:romeo@example.com"

The resulting XMPP <message/> stanza might be as follows:

  <message from='notify.example.com'
           to='romeo@example.com'
           xml:lang='en'>
    <subject>A Sieve instant notification!</subject>
    <body>&lt;juliet@example.org&gt; Wherefore art thou?</body>
  </message>

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:

  notify :importance "1"
         :message "Contact Juliet immediately!"
         "xmpp:romeo@example.com?message;subject=SIEVE"

The resulting XMPP <message/> stanza might be as follows:

  <message from='notify.example.com'
           to='romeo@example.com'
           xml:lang='en'>
    <subject>SIEVE</subject>
    <body>Contact Juliet immediately!</body>
    <headers xmlns='http://jabber.org/protocol/shim'>
      <header name='Urgency'>high</header>
    </headers>
    <x xmlns='jabber:x:oob'>
      <url>
        imap://romeo@example.com/INBOX;UIDVALIDITY=385759045/;UID=20
      </url>
    </x>
  </message>


 TOC 

4.  Requirements Conformance

Section 3.8 of [NOTIFY] (Melnikov, A., Leiba, B., Segmuller, W., and T. Martin, “Sieve Extension: Notifications,” July 2007.) specifies a set of requirements for Sieve notification methods. The conformance of the xmpp notification mechanism is provided here.

  1. 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 [UTF‑8] (Yergeau, F., “UTF-8, a transformation format of ISO 10646,” November 2003.).
  2. An implementation MAY ignore parameters specified in the ":from", ":importance", and ":options" tags.
  3. There is no recommended default message for an implementation to include if the ":message" argument is not specified.
  4. A notification sent via the xmpp notification method MAY include a timestamp in the textual message.
  5. 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 [SHIM] (Saint-Andre, P. and J. Hildebrand, “Stanza Headers and Internet Metadata,” August 2005.) header named "Reply-To".
  6. An implementation MUST NOT include any other extraneous information not specified in parameters to the notify action.
  7. In accordance with [XMPP‑URI] (Saint-Andre, P., “Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP),” June 2007.), 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 [QUERIES] (Saint-Andre, P., “XMPP URI Scheme Query Components,” September 2006.)) 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.
  8. 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.
  9. 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 [XMPP] (Saint-Andre, P., “Extensible Messaging and Presence Protocol (XMPP): Core,” October 2004.)); 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.



 TOC 

5.  Internationalization Considerations

Although an XMPP address may contain nearly any [UNICODE] (The Unicode Consortium, “The Unicode Standard, Version 3.2.0,” 2000.) character, the value of the "method" parameter MUST be a Uniform Resource Identifier (see [URI] (Berners-Lee, T., Fielding, R., and L. Masinter, “Uniform Resource Identifier (URI): Generic Syntax,” January 2005.)) rather than an Internationalized Resource Identifier (see [IRI] (Duerst, M. and M. Suignard, “Internationalized Resource Identifiers (IRIs),” January 2005.)). The rules specified in [XMPP‑URI] (Saint-Andre, P., “Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP),” June 2007.) MUST be followed when generating XMPP URIs.

In accordance with Section 13 of RFC 3920, all data sent over XMPP MUST be encoded in [UTF‑8] (Yergeau, F., “UTF-8, a transformation format of ISO 10646,” November 2003.).



 TOC 

6.  Security Considerations

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 [NOTIFY] (Melnikov, A., Leiba, B., Segmuller, W., and T. Martin, “Sieve Extension: Notifications,” July 2007.), [SIEVE] (Showalter, T. and P. Guenther, “Sieve: An Email Filtering Language,” February 2007.), and [XMPP] (Saint-Andre, P., “Extensible Messaging and Presence Protocol (XMPP): Core,” October 2004.).



 TOC 

7.  IANA Considerations

The following template provides the IANA registration of the Sieve notification mechanism specified in this document:

  To: iana@iana.org
  Subject: Registration of new Sieve notification mechanism
  Mechanism name: xmpp
  Mechanism URI: RFC4622
  Mechanism-specific tags: none
  Standards Track/IESG-approved experimental RFC number: this RFC
  Person and email address to contact for further information:
       Peter Saint-Andre <stpeter@jabber.org>

This information should be added to the list of Sieve notification mechanisms maintained at <http://www.iana.org/assignments/sieve-notification>.



 TOC 

8.  References



 TOC 

8.1. Normative References

[NOTIFY] Melnikov, A., Leiba, B., Segmuller, W., and T. Martin, “Sieve Extension: Notifications,” draft-ietf-sieve-notify-08 (work in progress), July 2007 (TXT).
[OOB] Saint-Andre, P., “Out of Band Data,” XSF XEP 0066, August 2006.
[QUERIES] Saint-Andre, P., “XMPP URI Scheme Query Components,” XSF XEP 0147, September 2006.
[SHIM] Saint-Andre, P. and J. Hildebrand, “Stanza Headers and Internet Metadata,” XSF XEP 0131, August 2005.
[SIEVE] Showalter, T. and P. Guenther, “Sieve: An Email Filtering Language,” draft-ietf-sieve-3028bis-12 (work in progress), February 2007 (TXT).
[TERMS] Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” BCP 14, RFC 2119, March 1997.
[XMPP-URI] Saint-Andre, P., “Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP),” draft-saintandre-rfc4622bis-01 (work in progress), June 2007 (TXT).


 TOC 

8.2. Informative References

[IRI] Duerst, M. and M. Suignard, “Internationalized Resource Identifiers (IRIs),” RFC 3987, January 2005 (TXT).
[UNICODE] The Unicode Consortium, “The Unicode Standard, Version 3.2.0,” 2000.

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/).

[URI] Berners-Lee, T., Fielding, R., and L. Masinter, “Uniform Resource Identifier (URI): Generic Syntax,” STD 66, RFC 3986, January 2005 (TXT).
[UTF-8] Yergeau, F., “UTF-8, a transformation format of ISO 10646,” STD 63, RFC 3629, November 2003 (TXT).
[XMPP] Saint-Andre, P., “Extensible Messaging and Presence Protocol (XMPP): Core,” RFC 3920, October 2004 (TXT).


 TOC 

Authors' Addresses

  Peter Saint-Andre
  XMPP Standards Foundation
Email:  stpeter@jabber.org
URI:  https://stpeter.im/
  
  Alexey Melnikov
  Isode Limited
Email:  Alexey.Melnikov@isode.com


 TOC 

Full Copyright Statement

Intellectual Property