Network Working Group                                     P. Saint-Andre
Request for Comments: 5437                                         Cisco
Category: Standards Track                                    A. Melnikov
                                                           Isode Limited
                                                            January 2009
        
Network Working Group                                     P. Saint-Andre
Request for Comments: 5437                                         Cisco
Category: Standards Track                                    A. Melnikov
                                                           Isode Limited
                                                            January 2009
        

Sieve Notification Mechanism: Extensible Messaging and Presence Protocol (XMPP)

筛通知机制:可扩展消息和状态协议(XMPP)

Status of This Memo

关于下段备忘

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (c) 2009 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2009 IETF信托基金和确定为文件作者的人员。版权所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/ 许可证信息)在本文件发布之日生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。

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.

本文档描述了用于通知的Sieve扩展的概要文件,以允许通过可扩展消息和状态协议(XMPP)发送通知,该协议也称为Jabber。

Table of Contents

目录

   1. Introduction ....................................................3
      1.1. Overview ...................................................3
      1.2. Terminology ................................................3
   2. Definition ......................................................3
      2.1. Notify Parameter "method" ..................................3
      2.2. Test notify_method_capability ..............................3
      2.3. Notify Tag ":from" .........................................4
      2.4. Notify Tag ":importance" ...................................4
      2.5. Notify Tag ":message" ......................................4
      2.6. Notify Tag ":options" ......................................4
      2.7. XMPP Syntax ................................................4
   3. Examples ........................................................6
      3.1. Basic Action ...............................................6
      3.2. Action with "body" .........................................7
      3.3. Action with "body", ":importance", ":message", and
           "subject" ..................................................7
      3.4. Action with ":from", ":message", ":importance",
           "body", and "subject" ......................................8
   4. Requirements Conformance ........................................9
   5. Internationalization Considerations ............................10
   6. Security Considerations ........................................11
   7. IANA Considerations ............................................12
   8. References .....................................................12
      8.1. Normative References ......................................12
      8.2. Informative References ....................................13
        
   1. Introduction ....................................................3
      1.1. Overview ...................................................3
      1.2. Terminology ................................................3
   2. Definition ......................................................3
      2.1. Notify Parameter "method" ..................................3
      2.2. Test notify_method_capability ..............................3
      2.3. Notify Tag ":from" .........................................4
      2.4. Notify Tag ":importance" ...................................4
      2.5. Notify Tag ":message" ......................................4
      2.6. Notify Tag ":options" ......................................4
      2.7. XMPP Syntax ................................................4
   3. Examples ........................................................6
      3.1. Basic Action ...............................................6
      3.2. Action with "body" .........................................7
      3.3. Action with "body", ":importance", ":message", and
           "subject" ..................................................7
      3.4. Action with ":from", ":message", ":importance",
           "body", and "subject" ......................................8
   4. Requirements Conformance ........................................9
   5. Internationalization Considerations ............................10
   6. Security Considerations ........................................11
   7. IANA Considerations ............................................12
   8. References .....................................................12
      8.1. Normative References ......................................12
      8.2. Informative References ....................................13
        
1. Introduction
1. 介绍
1.1. Overview
1.1. 概述

The [NOTIFY] extension to the [SIEVE] 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]) are used to generate notifications via the Extensible Messaging and Presence Protocol [XMPP], which is widely implemented in Jabber instant messaging technologies.

[SIEVE]邮件过滤语言的[NOTIFY]扩展是一个通过使用URI指定通知机制来提供通知的框架。本文档定义了如何使用xmpp URI(参见[xmpp-URI])通过可扩展消息和状态协议[xmpp]生成通知,该协议在Jabber即时消息技术中广泛实施。

1.2. Terminology
1.2. 术语

This document inherits terminology from [NOTIFY], [SIEVE], and [XMPP]. In particular, the terms "parameter" and "tag" are used as described in [NOTIFY] to refer to aspects of Sieve scripts, and the term "key" is used as described in [XMPP-URI] to refer to aspects of an XMPP URI.

本文档继承了[NOTIFY]、[SIEVE]和[XMPP]的术语。具体而言,术语“参数”和“标记”如[NOTIFY]中所述用于指代筛选脚本的方面,术语“键”如[XMPP-URI]中所述用于指代XMPP URI的方面。

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

本文件中大写的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”应按照[条款]中所述进行解释。

2. Definition
2. 释义
2.1. Notify Parameter "method"
2.1. 通知参数“方法”

The "method" parameter MUST be a URI that conforms to the xmpp URI scheme (as specified in [XMPP-URI]) and that identifies an XMPP account associated with the email inbox. The URI MAY include the resource identifier of an XMPP address and/or the query component portion of an XMPP URI, but SHOULD NOT include an authority 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]. The resulting XMPP address MUST be encapsulated in XMPP syntax as the value of the XMPP 'to' attribute.

“method”参数必须是符合xmpp URI方案(如[xmpp-URI]中所指定)的URI,并标识与电子邮件收件箱关联的xmpp帐户。URI可以包括XMPP地址的资源标识符和/或XMPP URI的查询组件部分,但不应包括权限组件或片段标识符组件。处理应用程序必须根据[XMPP-URI]中指定的处理规则从URI中提取XMPP地址。生成的XMPP地址必须用XMPP语法封装为XMPP“to”属性的值。

2.2. Test notify_method_capability
2.2. 测试通知方法能力

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 (see [XMPP-IM]) for the specified XMPP notification-uri; otherwise, it SHOULD return a value of "maybe" (since typical XMPP systems may not allow a Sieve engine to gain knowledge about the presence of XMPP entities).

响应“在线”通知功能的notify_method_功能测试,如果实现知道指定的XMPP通知uri的活动状态会话(请参见[XMPP-IM]),则应返回值“是”;否则,它应该返回一个值“maybe”(因为典型的XMPP系统可能不允许筛选引擎获得有关XMPP实体存在的知识)。

2.3. Notify Tag ":from"
2.3. 通知标签“:从”

If included, the ":from" tag MUST be an electronic address that conforms to the "Mailbox" rule defined in [RFC5321]. The value of the ":from" tag MAY be included in the human-readable XML character data of the XMPP notification; alternatively or in addition, it MAY be transformed into formal XMPP syntax, in which case it MUST be encapsulated as the value of an XMPP SHIM (Stanza Headers and Internet Metadata) [SHIM] header named "Resent-From".

如果包括“:from”标记,则该标记必须是符合[RFC5321]中定义的“邮箱”规则的电子地址。“:from”标记的值可以包括在XMPP通知的人类可读XML字符数据中;或者,也可以将其转换为正式的XMPP语法,在这种情况下,它必须封装为名为“Resent From”的XMPP SHIM(节头和Internet元数据)[SHIM]头的值。

2.4. Notify Tag ":importance"
2.4. 通知标签“:重要性”

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 appropriate text in the XML character data of the XMPP <body/> element); if so, it SHOULD be encapsulated as the value of an XMPP SHIM (Stanza Headers and Internet Metadata) [SHIM] header named "Urgency", where the XML character of that header is "high" if the value of the ":importance" tag is "1", "medium" if the value of the ":importance" tag is "2", and "low" if the value of the ":importance" tag is "3".

“:重要性”标记对于此通知机制没有特殊意义,并且本规范对其使用没有限制。“:importance”标记的值可以转换为XMPP语法(除了XMPP<body/>元素的XML字符数据中包含适当的文本之外,或者不包含适当的文本);如果是这样,则应将其封装为名为“紧迫性”的XMPP SHIM(节头和互联网元数据)[SHIM]头的值,如果“:重要性”标记的值为“1”,则该头的XML字符为“高”;如果“:重要性”标记的值为“2”,则为“中”;如果“:重要性”标记的值为“3”,则为“低”。

2.5. Notify Tag ":message"
2.5. 通知标签“:消息”

If the ":message" tag is included, that string MUST be transformed into the XML character data of an XMPP <body/> element (where the string is generated according to the guidelines specified in Section 3.6 of [NOTIFY]).

如果包含“:message”标记,则必须将该字符串转换为XMPP<body/>元素的XML字符数据(根据[NOTIFY]第3.6节规定的指南生成该字符串)。

2.6. Notify Tag ":options"
2.6. 通知标签“:选项”

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

“:options”标记对此通知机制没有特殊意义。任何对此标记的处理都是实现的责任。

2.7. XMPP Syntax
2.7. XMPP语法

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:

xmpp机制导致发送xmpp消息以通知收件人有关电子邮件的信息。一般的XMPP语法如下所示:

o The notification MUST be an XMPP <message/> stanza.

o 通知必须是XMPP<message/>节。

o The value of the XMPP 'from' attribute SHOULD be the XMPP address of the notification service associated with the Sieve engine or the XMPP address of the entity to be notified. The value of the XMPP 'from' attribute MUST NOT be generated from the Sieve ":from" tag.

o XMPP“from”属性的值应该是与筛选引擎关联的通知服务的XMPP地址或要通知的实体的XMPP地址。XMPP“from”属性的值不能从Sieve“:from”标记生成。

o The value of the XMPP 'to' attribute MUST be the XMPP address specified in the XMPP URI contained in the "method" notify parameter.

o XMPP“to”属性的值必须是在“method”notify参数中包含的XMPP URI中指定的XMPP地址。

o The value of the XMPP 'type' attribute MUST be 'headline' or 'normal'.

o XMPP“type”属性的值必须为“headline”或“normal”。

o The XMPP <message/> stanza MUST include a <body/> child element. If the ":message" tag is included in the Sieve script, that string MUST be used as the XML character data of the <body/> element. If not and if the XMPP URI contained in the "method" notify parameter specified a "body" key in the query component, that value SHOULD be used. Otherwise, the XML character data SHOULD be some configurable text indicating that the message is a Sieve notification.

o XMPP<message/>节必须包含<body/>子元素。如果Sieve脚本中包含“:message”标记,则该字符串必须用作<body/>元素的XML字符数据。如果不是,并且如果“method”notify参数中包含的XMPP URI在查询组件中指定了“body”键,则应使用该值。否则,XML字符数据应该是一些可配置的文本,指示消息是一个筛选通知。

o The XMPP <message/> stanza MAY include a <subject/> child element. If the XMPP URI contained in the "method" notify parameter specified a "subject" key in the query component, that value SHOULD be used as the XML character data of the <subject/> element. Otherwise, the XML character data SHOULD be some configurable text indicating that the message is a Sieve notification.

o XMPP<message/>节可能包含一个子元素<subject/>。如果“method”notify参数中包含的XMPP URI在查询组件中指定了一个“subject”键,那么该值应该用作<subject/>元素的XML字符数据。否则,XML字符数据应该是一些可配置的文本,指示消息是一个筛选通知。

o The XMPP <message/> stanza SHOULD include a URI, 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 [OOB]. If included, the URI SHOULD be an Internet Message Access Protocol [IMAP] URL that specifies the location of the message, as defined in [IMAP-URL], but MAY be another URI type that can specify or hint at the location of an email message, such as a URI for an HTTP resource [HTTP] or a Post Office Protocol Version 3 (POP3) mailbox [POP-URL] at which the message can be accessed. It is not expected that an XMPP user agent shall directly handle such a URI, but instead that it shall invoke an appropriate helper application to handle the URI.

o XMPP<message/>节应该包含一个URI,以便收件人在定位消息时用作提示,该URI被封装为<x/>元素的<url/>子元素的XML字符数据,该子元素由[oob]中指定的“jabber:x:oob”命名空间限定。如果包括,URI应该是指定消息位置的Internet消息访问协议[IMAP]URL,如[IMAP-URL]中所定义,但也可以是可以指定或提示电子邮件位置的另一种URI类型,例如HTTP资源[HTTP]的URI或邮局协议版本3(POP3)邮箱[POP-URL]可以访问消息的位置。XMPP用户代理不应该直接处理这样的URI,而是应该调用适当的助手应用程序来处理URI。

o The XMPP <message/> stanza MAY include an XMPP SHIM (Stanza Headers and Internet Metadata) [SHIM] header named "Resent-From". If the Sieve script included a ":from" tag, the "Resent-From"

o XMPP<message/>节可能包括一个名为“Resent From”的XMPP SHIM(节头和Internet元数据)[SHIM]头。如果筛选脚本包含“:from”标记,“Resent from”

value MUST be the value of the ":from" tag; otherwise, the "Resent-From" value SHOULD be the envelope recipient address of the original email message that triggered the notification.

值必须是“:from”标记的值;否则,“重新发送发件人”值应为触发通知的原始电子邮件的信封收件人地址。

3. Examples
3. 例子

In the following examples, the sender of the email has an address of <mailto:juliet@example.org>, the entity to be notified has an email address of <mailto:romeo@example.com> and an XMPP address of romeo@im.example.com (resulting in an XMPP URI of <xmpp:romeo@im.example.com>), and the notification service associated with the Sieve engine has an XMPP address of notify.example.com.

在以下示例中,电子邮件发件人的地址为<mailto:juliet@example.org>,被通知实体的电子邮件地址为<mailto:romeo@example.com>以及的XMPP地址romeo@im.example.com(导致XMPP URI小于XMPP:romeo@im.example.com>),与Sieve引擎关联的通知服务的XMPP地址为notify.example.com。

Note: In the following examples, line breaks are included in XMPP URIs solely for the purpose of readability.

注意:在以下示例中,XMPP URI中包含换行符仅是为了可读性。

3.1. Basic Action
3.1. 基本作用

The following is a basic Sieve notify action with only a method. The XML character data of the XMPP <body/> and <subject/> elements are therefore generated by the Sieve engine based on configuration. In addition, the Sieve engine includes a URI pointing to the message.

以下是仅使用一个方法执行的基本操作。因此,XMPP<body/>和<subject/>元素的XML字符数据由Sieve引擎根据配置生成。此外,Sieve引擎还包括一个指向消息的URI。

Basic action (Sieve syntax)

基本操作(筛语法)

notify "xmpp:romeo@im.example.com"

通知“xmpp:romeo@im.example.com"

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

产生的XMPP<message/>节可能如下所示:

Basic action (XMPP syntax)

基本操作(XMPP语法)

     <message from='notify.example.com'
              to='romeo@im.example.com'
              type='headline'
              xml:lang='en'>
       <subject>SIEVE</subject>
       <body>&lt;juliet@example.com&gt; You got mail.</body>
       <x xmlns='jabber:x:oob'>
         <url>
           imap://romeo@example.com/INBOX;UIDVALIDITY=385759043/;UID=18
         </url>
       </x>
     </message>
        
     <message from='notify.example.com'
              to='romeo@im.example.com'
              type='headline'
              xml:lang='en'>
       <subject>SIEVE</subject>
       <body>&lt;juliet@example.com&gt; You got mail.</body>
       <x xmlns='jabber:x:oob'>
         <url>
           imap://romeo@example.com/INBOX;UIDVALIDITY=385759043/;UID=18
         </url>
       </x>
     </message>
        
3.2. Action with "body"
3.2. “身体”的作用

The following action contains a "body" key in the query component of the XMPP URI but no ":message" tag in the Sieve script. As a result, the XML character data of the XMPP <body/> element in the XMPP notification is taken from the XMPP URI. In addition, the Sieve engine includes a URI pointing to the message.

以下操作在xmppuri的查询组件中包含一个“body”键,但在Sieve脚本中没有“:message”标记。因此,XMPP通知中XMPP<body/>元素的XML字符数据取自xmppuri。此外,Sieve引擎还包括一个指向消息的URI。

Action with "body" (Sieve syntax)

带有“body”的操作(筛语法)

     notify "xmpp:romeo@im.example.com?message
              ;body=Wherefore%20art%20thou%3F"
        
     notify "xmpp:romeo@im.example.com?message
              ;body=Wherefore%20art%20thou%3F"
        

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

产生的XMPP<message/>节可能如下所示。

Action with "body" (XMPP syntax)

带有“body”的操作(XMPP语法)

     <message from='notify.example.com'
              to='romeo@im.example.com'
              type='headline'
              xml:lang='en'>
       <subject>SIEVE</subject>
       <body>Wherefore art thou?</body>
       <x xmlns='jabber:x:oob'>
         <url>
           imap://romeo@example.com/INBOX;UIDVALIDITY=385759044/;UID=19
         </url>
       </x>
     </message>
        
     <message from='notify.example.com'
              to='romeo@im.example.com'
              type='headline'
              xml:lang='en'>
       <subject>SIEVE</subject>
       <body>Wherefore art thou?</body>
       <x xmlns='jabber:x:oob'>
         <url>
           imap://romeo@example.com/INBOX;UIDVALIDITY=385759044/;UID=19
         </url>
       </x>
     </message>
        
3.3. Action with "body", ":importance", ":message", and "subject"
3.3. 带有“正文”、“重要性”、“信息”和“主题”的动作

The following action specifies an ":importance" tag and a ":message" tag in the Sieve script, as well as a "body" key and a "subject" key in the query component of the XMPP URI. As a result, the ":message" tag from the Sieve script overrides the "body" key from the XMPP URI when generating the XML character data of the XMPP <body/> element. In addition, the Sieve engine includes a URI pointing to the message.

下面的操作指定了Sieve脚本中的“:重要性”标记和“:消息”标记,以及xmppuri的查询组件中的“body”键和“subject”键。因此,当生成XMPP<body/>元素的XML字符数据时,来自Sieve脚本的“:message”标记会覆盖来自xmppuri的“body”键。此外,Sieve引擎还包括一个指向消息的URI。

Action with "body", ":importance", ":message", and "subject" (Sieve syntax)

带有“body”、“importance”、“message”和“subject”的操作(筛选语法)

     notify :importance "1"
            :message "Contact Juliet immediately!"
            "xmpp:romeo@im.example.com?message
              ;body=You%27re%20in%20trouble
              ;subject=ALERT%21"
        
     notify :importance "1"
            :message "Contact Juliet immediately!"
            "xmpp:romeo@im.example.com?message
              ;body=You%27re%20in%20trouble
              ;subject=ALERT%21"
        

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

产生的XMPP<message/>节可能如下所示。

Action with "body", ":importance", ":message", and "subject" (XMPP syntax)

带有“body”、“重要性”、“消息”和“主题”的操作(XMPP语法)

     <message from='notify.example.com'
              to='romeo@im.example.com'
              type='headline'
              xml:lang='en'>
       <subject>ALERT!</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>
        
     <message from='notify.example.com'
              to='romeo@im.example.com'
              type='headline'
              xml:lang='en'>
       <subject>ALERT!</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>
        

3.4. Action with ":from", ":message", ":importance", "body", and "subject"

3.4. 带有“:from”、“:message”、“:重要性”、“body”和“subject”的操作

The following action specifies a ":from" tag, an ":importance" tag, and a ":message" tag in the Sieve script, as well as a "body" key and a "subject" key in the query component of the XMPP URI. As a result, the ":message" tag from the Sieve script overrides the "body" key from the XMPP URI when generating the XML character data of the XMPP <body/> element. In addition, the Sieve engine includes a URI pointing to the message, as well as an XMPP SHIM (Stanza Headers and Internet Metadata) [SHIM] header named "Resent-From" (which encapsulates the value of the ":from" tag).

以下操作在Sieve脚本中指定“:from”标记“:importance”标记“:message”标记,以及XMPP URI的查询组件中的“body”键和“subject”键。因此,当生成XMPP<body/>元素的XML字符数据时,来自Sieve脚本的“:message”标记会覆盖来自xmppuri的“body”键。此外,Sieve引擎还包括一个指向消息的URI,以及一个名为“Resent From”的XMPP SHIM(节头和互联网元数据)[SHIM]头(它封装“:From”标记的值)。

   Action with ":from", ":importance", ":message", "body", and "subject"
   (Sieve syntax)
        
   Action with ":from", ":importance", ":message", "body", and "subject"
   (Sieve syntax)
        
     notify :from "romeo.my.romeo@example.com"
            :importance "1"
            :message "Contact Juliet immediately!"
            "xmpp:romeo@im.example.com?message
              ;body=You%27re%20in%20trouble
              ;subject=ALERT%21"
        
     notify :from "romeo.my.romeo@example.com"
            :importance "1"
            :message "Contact Juliet immediately!"
            "xmpp:romeo@im.example.com?message
              ;body=You%27re%20in%20trouble
              ;subject=ALERT%21"
        

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

产生的XMPP<message/>节可能如下所示。

   Action with ":from", ":importance", ":message", "body", and "subject"
   (XMPP syntax)
        
   Action with ":from", ":importance", ":message", "body", and "subject"
   (XMPP syntax)
        
     <message from='notify.example.com'
              to='romeo@im.example.com'
              type='headline'
              xml:lang='en'>
       <subject>ALERT!</subject>
       <body>Contact Juliet immediately!</body>
       <headers xmlns='http://jabber.org/protocol/shim'>
         <header name='Resent-From'>romeo.my.romeo@example.com</header>
         <header name='Urgency'>high</header>
       </headers>
       <x xmlns='jabber:x:oob'>
         <url>
           imap://romeo@example.com/INBOX;UIDVALIDITY=385759045/;UID=21
         </url>
       </x>
     </message>
        
     <message from='notify.example.com'
              to='romeo@im.example.com'
              type='headline'
              xml:lang='en'>
       <subject>ALERT!</subject>
       <body>Contact Juliet immediately!</body>
       <headers xmlns='http://jabber.org/protocol/shim'>
         <header name='Resent-From'>romeo.my.romeo@example.com</header>
         <header name='Urgency'>high</header>
       </headers>
       <x xmlns='jabber:x:oob'>
         <url>
           imap://romeo@example.com/INBOX;UIDVALIDITY=385759045/;UID=21
         </url>
       </x>
     </message>
        
4. Requirements Conformance
4. 需求一致性

Section 3.8 of [NOTIFY] specifies a set of requirements for Sieve notification methods. The conformance of the xmpp notification mechanism is provided here.

[通知]第3.8节规定了筛分通知方法的一系列要求。这里提供了xmpp通知机制的一致性。

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

1. xmpp通知方法的实现不应修改最终通知文本(例如,限制长度);但是,给定的部署可能会这样做(例如,如果收件人为XMPP消息按字符或字节付费)。由于XMPP字符数据是用[UTF-8]编码的,因此不需要修改字符本身。

2. An implementation MAY ignore parameters specified in the ":from", ":importance", and ":options" tags.

2. 实现可以忽略“:from”、“:importance”和“:options”标记中指定的参数。

3. There is no recommended default message for an implementation to include if the ":message" tag is not specified.

3. 如果未指定“:message”标记,则不建议实现包含默认消息。

4. A notification sent via the xmpp notification method MAY include a timestamp in the textual message.

4. 通过xmpp通知方法发送的通知可以在文本消息中包括时间戳。

5. The value of the XMPP 'from' attribute MUST be the XMPP address of the notification service associated with the Sieve engine. The value of the Sieve ":from" tag MAY be transformed into the value of an XMPP SHIM (Stanza Headers and Internet Metadata) [SHIM] header named "Resent-From".

5. XMPP“from”属性的值必须是与筛选引擎关联的通知服务的XMPP地址。Sieve“:from”标记的值可以转换为名为“Resent from”的XMPP填充(节头和Internet元数据)[SHIM]头的值。

6. The value of the XMPP 'to' attribute MUST be the XMPP address specified in the XMPP URI contained in the "method" parameter.

6. XMPP“to”属性的值必须是在“method”参数中包含的XMPP URI中指定的XMPP地址。

7. In accordance with [XMPP-URI], an implementation MUST ignore any URI action or key it does not understand (i.e., the URI MUST be processed as if the action or key were not present). It is RECOMMENDED to support the XMPP "message" query type (see [QUERIES]) and the associated "body" and "subject" keys, which SHOULD be mapped to the XMPP <body/> and <subject/> child elements of the XMPP <message/> stanza, respectively. However, if included, then the Sieve notify ":message" tag MUST be mapped to the XMPP <body/> element, overriding the "body" key (if any) included in the XMPP URI.

7. 根据[XMPP-URI],实现必须忽略它不理解的任何URI操作或键(即,必须像操作或键不存在一样处理URI)。建议支持XMPP“message”查询类型(请参见[querys])以及相关的“body”和“subject”键,它们应分别映射到XMPP<message/>节的XMPP<body/>和<subject/>子元素。但是,如果包含,那么Sieve notify“:message”标记必须映射到XMPP<body/>元素,覆盖XMPP URI中包含的“body”键(如果有)。

8. An implementation MUST NOT include any other extraneous information not specified in parameters to the notify action.

8. 实现不得包含notify操作参数中未指定的任何其他无关信息。

9. 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 (see [XMPP-IM]) for the specified XMPP notification-uri, but only if the entity that requested the test is authorized to know the presence of the associated XMPP entity (e.g., via explicit presence subscription as specified in [XMPP-IM]); otherwise, it SHOULD return a value of "maybe" (since typical XMPP systems may not allow a Sieve engine to gain knowledge about the presence of XMPP entities).

9. 为响应“在线”通知功能的notify_method_功能测试,如果实现知道指定的XMPP通知uri的活动状态会话(请参见[XMPP-IM]),则应返回值“是”,但仅当请求测试的实体被授权知道相关XMPP实体的存在时(例如,通过[XMPP-IM]中规定的显式存在订阅);否则,它应该返回一个值“maybe”(因为典型的XMPP系统可能不允许筛选引擎获得有关XMPP实体存在的知识)。

10. 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]); 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.

10. 如果实现接收到类型为“auth”或“cancel”的XMPP错误,则不应尝试重试传递通知;如果实现接收到类型为“wait”的XMPP错误,则可能尝试重试传递;如果实现接收到类型为“modify”的XMPP错误,则可能尝试重试传递,但前提是它对通知进行了适当的修改(请参见[XMPP]);在任何情况下,重试次数应限制为不少于3次且不超过10次的可配置次数。根据本地服务策略,如果给定时间段内的通知数量过多,则实施可能会限制通知。重复抑制(如果有)是一个实施问题,此处未作规定。

5. Internationalization Considerations
5. 国际化考虑

Although an XMPP address may contain nearly any [UNICODE] character, the value of the "method" parameter MUST be a Uniform Resource Identifier (see [URI]) rather than an Internationalized Resource Identifier (see [IRI]). The rules specified in [XMPP-URI] MUST be followed when generating XMPP URIs.

尽管XMPP地址几乎可以包含任何[UNICODE]字符,“method”参数的值必须是统一的资源标识符(请参见[URI]),而不是国际化的资源标识符(请参见[IRI])。生成XMPP URI时必须遵循[XMPP-URI]中指定的规则。

In accordance with Section 13 of RFC 3920, all data sent over XMPP MUST be encoded in [UTF-8].

根据RFC 3920第13节,通过XMPP发送的所有数据必须用[UTF-8]编码。

6. Security Considerations
6. 安全考虑

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], [SIEVE], and [XMPP].

根据包含的信息,发送通知可以与将邮件转发给通知收件人相比较。自动转发邮件时必须小心,以确保机密信息不会发送到不安全的环境中。具体而言,实现必须符合[NOTIFY]、[SIEVE]和[XMPP]中给出的安全注意事项。

[NOTIFY] specifies that a notification method MUST provide mechanisms for avoiding notification loops. One type of notification loop can be caused by message forwarding; however, such loops are prevented because XMPP does not support the forwarding of messages from one XMPP address to another. Another type of notification loop can be caused by auto-replies to XMPP messages received by the XMPP notification service associated with the Sieve engine; therefore, such a service MUST NOT auto-reply to XMPP messages it receives.

[NOTIFY]指定通知方法必须提供避免通知循环的机制。一种类型的通知循环可由消息转发引起;但是,由于XMPP不支持将消息从一个XMPP地址转发到另一个XMPP地址,因此阻止了此类循环。另一种类型的通知循环可能是由与筛选引擎相关联的XMPP通知服务接收的XMPP消息的自动回复引起的;因此,这样的服务不能自动回复它收到的XMPP消息。

A common use case might be for a user to create a script that enables the Sieve engine to act differently if the user is currently available at a particular type of service (e.g., send notifications to the user's XMPP address if the user has an active session at an XMPP service). Whether the user is currently available can be determined by means of a notify_method_capability test for the "online" notification-capability. In XMPP, information about current network availability is called "presence" (see also [MODEL]). Since [XMPP-IM] requires that a user must approve a presence subscription before an entity can gain access to the user's presence information, a limited but reasonably safe implementation might be for the Sieve engine to request a subscription to the user's presence. The user would then need to approve that subscription request so that the Sieve engine can act appropriately depending on whether the user is online or offline. However, the Sieve engine MUST NOT use the user's presence information when processing scripts on behalf of a script owner other than the user, unless the Sieve engine has explicit knowledge (e.g., via integration with an XMPP server's presence authorization rules) that the script owner is authorized to know the user's presence. While it would be possible to design a more advanced approach to the delegation of presence authorization, any such approach is left to future standards work.

一个常见的用例可能是用户创建一个脚本,如果用户当前在特定类型的服务中可用,该脚本使筛选引擎能够以不同的方式进行操作(例如,如果用户在XMPP服务中有活动会话,则向用户的XMPP地址发送通知)。用户当前是否可用可通过“在线”通知功能的notify_method_功能测试来确定。在XMPP中,有关当前网络可用性的信息称为“存在”(另请参见[MODEL])。由于[XMPP-IM]要求用户必须批准状态订阅,实体才能访问用户的状态信息,因此筛选引擎可能需要有限但合理安全的实现来请求订阅用户的状态。然后,用户需要批准该订阅请求,以便筛选引擎可以根据用户是在线还是离线而适当地进行操作。但是,当代表除用户以外的脚本所有者处理脚本时,筛选引擎不得使用用户的状态信息,除非筛选引擎明确知道(例如,通过与XMPP服务器的状态授权规则集成)脚本所有者有权知道用户的状态。虽然可以设计一种更先进的授权方法,但任何此类方法都将留给未来的标准工作。

7. IANA Considerations
7. IANA考虑

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

以下模板提供了本文件中规定的SIVE通知机制的IANA注册:

     To: iana@iana.org
     Subject: Registration of new Sieve notification mechanism
     Mechanism name: xmpp
     Mechanism URI: RFC 5122 [XMPP-URI]
     Mechanism-specific options: none
     Permanent and readily available reference: RFC 5437
     Person and email address to contact for further information:
          Peter Saint-Andre <registrar@xmpp.org>
        
     To: iana@iana.org
     Subject: Registration of new Sieve notification mechanism
     Mechanism name: xmpp
     Mechanism URI: RFC 5122 [XMPP-URI]
     Mechanism-specific options: none
     Permanent and readily available reference: RFC 5437
     Person and email address to contact for further information:
          Peter Saint-Andre <registrar@xmpp.org>
        

This information has been added to the list of Sieve notification mechanisms maintained at <http://www.iana.org>.

此信息已添加到维护的筛选通知机制列表中<http://www.iana.org>.

8. References
8. 工具书类
8.1. Normative References
8.1. 规范性引用文件

[NOTIFY] Melnikov, A., Ed., Leiba, B., Ed., Segmuller, W., and T. Martin, "Sieve Email Filtering: Extension for Notifications", RFC 5435, January 2009.

[通知]Melnikov,A.,Ed.,Leiba,B.,Ed.,Segmuller,W.,和T.Martin,“筛选电子邮件过滤:通知扩展”,RFC 54352009年1月。

[OOB] Saint-Andre, P., "Out of Band Data", XSF XEP 0066, August 2006.

[OOB]圣安德烈,P.,“带外数据”,XSF XEP 0066,2006年8月。

[QUERIES] Saint-Andre, P., "XMPP URI Scheme Query Components", XSF XEP 0147, September 2006.

[QUERIES]Saint Andre,P.,“XMPP URI方案查询组件”,XSF XEP 0147,2006年9月。

[RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, October 2008.

[RFC5321]Klensin,J.,“简单邮件传输协议”,RFC 53212008年10月。

[SHIM] Saint-Andre, P. and J. Hildebrand, "Stanza Headers and Internet Metadata", XSF XEP 0131, July 2006.

[SHIM]Saint Andre,P.和J.Hildebrand,“节头和互联网元数据”,XSF XEP 01312006年7月。

[SIEVE] Guenther, P., Ed. and T. Showalter, Ed., "Sieve: An Email Filtering Language", RFC 5228, January 2008.

[筛]Guenther,P.,Ed.和T.Showalter,Ed.,“筛:电子邮件过滤语言”,RFC 5228,2008年1月。

[TERMS] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[术语]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[XMPP-URI] Saint-Andre, P., "Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP)", RFC 5122, February 2008.

[XMPP-URI]Saint Andre,P.,“可扩展消息传递和存在协议(XMPP)的国际化资源标识符(IRI)和统一资源标识符(URI)”,RFC 5122,2008年2月。

8.2. Informative References
8.2. 资料性引用

[HTTP] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.

[HTTP]菲尔丁,R.,盖蒂斯,J.,莫卧儿,J.,弗莱斯蒂克,H.,马斯特,L.,利奇,P.,和T.伯纳斯李,“超文本传输协议——HTTP/1.1”,RFC2616,1999年6月。

[IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, March 2003.

[IMAP]Crispin,M.,“互联网消息访问协议-版本4rev1”,RFC 35012003年3月。

[IMAP-URL] Melnikov, A. and C. Newman, "IMAP URL Scheme", RFC 5092, November 2007.

[IMAP-URL]Melnikov,A.和C.Newman,“IMAP URL方案”,RFC 5092,2007年11月。

[IRI] Duerst, M. and M. Suignard, "Internationalized Resource Identifiers (IRIs)", RFC 3987, January 2005.

[IRI]Duerst,M.和M.Suignard,“国际化资源标识符(IRIs)”,RFC 3987,2005年1月。

[MODEL] Day, M., Rosenberg, J., and H. Sugano, "A Model for Presence and Instant Messaging", RFC 2778, February 2000.

[模型]Day,M.,Rosenberg,J.,和H.Sugano,“存在和即时信息模型”,RFC 27782000年2月。

[POP-URL] Gellens, R., "POP URL Scheme", RFC 2384, August 1998.

[POP-URL]Gellens,R.,“POP-URL方案”,RFC 2384,1998年8月。

[UNICODE] The Unicode Consortium, "The Unicode Standard, Version 3.2.0", 2000.

[UNICODE]UNICODE联盟,“UNICODE标准,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/).

Unicode标准3.2.0版由Unicode标准3.0版(雷丁,马萨诸塞州,Addison-Wesley,2000.ISBN 0-201-61633-5)定义,并由Unicode标准附录27:Unicode 3.1修订(http://www.unicode.org/reports/tr27/)根据Unicode标准附录#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.

[URI]Berners Lee,T.,Fielding,R.,和L.Masinter,“统一资源标识符(URI):通用语法”,STD 66,RFC 3986,2005年1月。

[UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.

[UTF-8]Yergeau,F.,“UTF-8,ISO 10646的转换格式”,STD 63,RFC 3629,2003年11月。

[XMPP] Saint-Andre, P., "Extensible Messaging and Presence Protocol (XMPP): Core", RFC 3920, October 2004.

[XMPP]Saint Andre,P.,“可扩展消息和状态协议(XMPP):核心”,RFC 3920,2004年10月。

[XMPP-IM] Saint-Andre, P., "Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence", RFC 3921, October 2004.

[XMPP-IM]Saint Andre,P.,“可扩展消息和状态协议(XMPP):即时消息和状态”,RFC 39212004年10月。

Authors' Addresses

作者地址

Peter Saint-Andre Cisco

彼得·圣安德烈·思科

   EMail: psaintan@cisco.com
        
   EMail: psaintan@cisco.com
        

Alexey Melnikov Isode Limited

阿列克谢·梅尔尼科夫伊索德有限公司

   EMail: Alexey.Melnikov@isode.com
        
   EMail: Alexey.Melnikov@isode.com