Internet Engineering Task Force (IETF)                         R. George
Request for Comments: 6133                                      B. Leiba
Category: Informational                              Huawei Technologies
ISSN: 2070-1721                                              A. Melnikov
                                                           Isode Limited
                                                               July 2011
        
Internet Engineering Task Force (IETF)                         R. George
Request for Comments: 6133                                      B. Leiba
Category: Informational                              Huawei Technologies
ISSN: 2070-1721                                              A. Melnikov
                                                           Isode Limited
                                                               July 2011
        

Sieve Email Filtering: Use of Presence Information with Auto-Responder Functionality

筛选电子邮件过滤:使用状态信息和自动响应功能

Abstract

摘要

This document describes how the Sieve email filtering language, along with some extensions, can be used to create automatic replies to incoming electronic mail messages based on the address book and presence information of the recipient.

本文档描述了如何使用Sieve电子邮件过滤语言以及一些扩展,根据收件人的通讯簿和状态信息创建对传入电子邮件的自动回复。

Status of This Memo

关于下段备忘

This document is not an Internet Standards Track specification; it is published for informational purposes.

本文件不是互联网标准跟踪规范;它是为了提供信息而发布的。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。并非IESG批准的所有文件都适用于任何级别的互联网标准;见RFC 5741第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc6133.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc6133.

Copyright Notice

版权公告

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

版权所有(c)2011 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. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 2
   2.  How To Create Auto-Replies  . . . . . . . . . . . . . . . . . . 3
   3.  Example Use Cases for Auto-Replies  . . . . . . . . . . . . . . 3
   4.  Security Considerations . . . . . . . . . . . . . . . . . . . . 6
   5.  Normative References  . . . . . . . . . . . . . . . . . . . . . 8
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 2
   2.  How To Create Auto-Replies  . . . . . . . . . . . . . . . . . . 3
   3.  Example Use Cases for Auto-Replies  . . . . . . . . . . . . . . 3
   4.  Security Considerations . . . . . . . . . . . . . . . . . . . . 6
   5.  Normative References  . . . . . . . . . . . . . . . . . . . . . 8
        
1. Introduction
1. 介绍

This document describes how the Sieve email filtering language [RFC5228], along with some extensions [RFC5230] [RFC5435] [RFC6134] [RFC6132] [RFC6131], can be used to generate automatic replies to incoming electronic mail messages based on the presence information of the recipient. This can be used, for example, to inform the sender that messages will not be answered immediately because the recipient is busy or away.

本文档描述了如何使用筛选电子邮件过滤语言[RFC5228]以及一些扩展[RFC5230][RFC5435][RFC6134][RFC6132][RFC6131]根据收件人的状态信息生成对传入电子邮件的自动回复。例如,这可以用来通知发件人,由于收件人忙或不在,邮件将不会立即回复。

The auto-reply message can additionally be based on information about the sender from the recipient's address book, sub-lists therefrom, or other lists available to the recipient, so that different senders might get different responses. The recipient can create separate rules for friends, family members, colleagues, and so on.

自动回复消息还可以基于来自收件人地址簿、其中的子列表或收件人可用的其他列表的有关发件人的信息,以便不同的发件人可能会得到不同的响应。收件人可以为朋友、家人、同事等创建单独的规则。

This can be used in mail filtering software, email-based information services, and other automatic responder situations. There are many programs currently in use that automatically respond to email. Some of them send many useless or unwanted responses, or send responses to inappropriate addresses. The mechanism described herein will help avoid those problems (but see the discussion in Section 4). Implementations need to take care of tracking previous messages received from the same sender, and they will start or stop sending responses as the presence status of the recipient changes.

这可用于邮件过滤软件、基于电子邮件的信息服务和其他自动响应者情况。目前使用的许多程序可以自动响应电子邮件。他们中的一些人会发送许多无用或不需要的回复,或者将回复发送到不合适的地址。本文描述的机制将有助于避免这些问题(但请参阅第4节中的讨论)。实现需要注意跟踪以前从同一发件人收到的消息,并且随着收件人的状态发生变化,它们将开始或停止发送响应。

An important note, though: users of any auto-reply mechanism should really think about whether automatic replies are necessary, and at what interval they make sense when they are. Email is not Instant Messaging, and senders generally expect that replies might take a while. Consider whether it's truly important to tell people that you'll read their mail in an hour or so, or whether that can just be taken as how email works. There are times when this makes sense, but let's not use it to exacerbate information overload. Judicious use of appropriate presence information might serve to mitigate these issues.

不过,需要注意的是:任何自动回复机制的用户都应该真正考虑是否需要自动回复,以及自动回复的间隔时间。电子邮件不是即时消息,发件人通常希望回复可能需要一段时间。考虑一下,告诉人们在一个小时左右的时间内阅读他们的邮件是否真的很重要,或者这是否仅仅是电子邮件的工作方式。有时候这是有道理的,但我们不要用它来加剧信息过载。明智地使用适当的状态信息可能有助于缓解这些问题。

Implementors, therefore, need to consider this with respect to the features they expose to users, and the potential for inappropriate use those features represent. The ability to create auto responders

因此,实现者需要考虑它们暴露给用户的特性,以及这些特征所代表的不适当使用的可能性。创建自动响应程序的能力

might be hidden behind an "advanced" button, and users might be warned of the consequences and advised of the considerations in the previous paragraph.

可能隐藏在“高级”按钮后面,用户可能会被警告其后果,并被告知上一段中的注意事项。

2. How To Create Auto-Replies
2. 如何创建自动回复

When an email message arrives, the Sieve script can use the notify_method_capability of the Notify extension [RFC5435] to check the recipient's presence information. The Notify-presence extension [RFC6132] makes additional presence, such as "away" and "do not disturb" status, available. The script can use the External-lists extension [RFC6134] to look the sender up in the recipient's address book or other list. If the information retrieved warrants an auto-reply message, the message can then be composed based on that information.

当电子邮件到达时,Sieve脚本可以使用notify扩展插件[RFC5435]的notify_method_功能来检查收件人的状态信息。Notify presence extension[RFC6132]使其他状态可用,例如“离开”和“请勿打扰”状态。脚本可以使用外部列表扩展[RFC6134]在收件人的通讯簿或其他列表中查找发件人。如果检索到的信息支持自动回复消息,则可以根据该信息编写消息。

The Vacation extension [RFC5230] provides an easy way to send the auto-reply message to the sender, as it automatically keeps track of the automatic replies and attempts to avoid excessive messages and mail loops. The Vacation-seconds extension [RFC6131] allows auto-replies to be sent this way more frequently than once per day, when that's appropriate. (Alternatively, the script can use the Notify extension [RFC5435] to send a notification by a means other than email.)

假期扩展[RFC5230]提供了一种向发件人发送自动回复消息的简单方法,因为它自动跟踪自动回复,并尝试避免过多的消息和邮件循环。休假秒扩展[RFC6131]允许以这种方式发送自动回复的频率高于每天一次,如果合适的话。(或者,脚本可以使用通知扩展[RFC5435]通过电子邮件以外的方式发送通知。)

Personal and Group Responders can refuse to generate responses except to known correspondents or addresses otherwise known to the recipient. Such responders can also generate different kinds of responses for "trusted" vs. "untrusted" addresses. This might be useful, for instance, to avoid inappropriate disclosure of personal or confidential information to arbitrary addresses.

个人和团体响应者可以拒绝生成响应,除非收件人知道已知的通信者或地址。此类响应程序还可以为“受信任”和“不受信任”地址生成不同类型的响应。例如,这可能有助于避免向任意地址不当披露个人或机密信息。

3. Example Use Cases for Auto-Replies
3. 自动回复的示例用例

1. In this example, we check that the envelope "from" is in the recipient's address book [RFC6134] and that the recipient's presence shows "extended away" [RFC6132]. If both of those are true, the "vacation" action [RFC5230] is used to send an auto-reply, making sure we don't reply to the same sender more than once every half hour [RFC6131]. The variables extension [RFC5229] is used to extract the value of the recipient's natural-language presence status message, which will be used as the response to the sender.

1. 在本例中,我们检查信封“from”是否在收件人的通讯簿[RFC6134]中,并且收件人的状态是否显示为“extended away”[RFC6132]。如果这两个都是真的,“休假”操作[RFC5230]用于发送自动回复,确保我们不会每半小时回复同一发件人一次以上[RFC6131]。变量扩展[RFC5229]用于提取收件人的自然语言状态消息的值,该值将用作对发件人的响应。

   require ["envelope", "extlists", "enotify", "variables",
            "vacation-seconds"];
   if allof (
       envelope :list "from" ":addrbook:default",
       notify_method_capability "xmpp:me@example.com" "show" "xa"
     ) {
       # :matches "*" is used here to extract the value
       if notify_method_capability :matches
           "xmpp:myjid@example.com" "status" "*" {
         set "resp_msg" "${1}";
       } else {
         set "resp_msg" "Away for a while, without access to email.";
       }
       vacation :handle "ext-away" :seconds 1800 "${resp_msg}";
     }
        
   require ["envelope", "extlists", "enotify", "variables",
            "vacation-seconds"];
   if allof (
       envelope :list "from" ":addrbook:default",
       notify_method_capability "xmpp:me@example.com" "show" "xa"
     ) {
       # :matches "*" is used here to extract the value
       if notify_method_capability :matches
           "xmpp:myjid@example.com" "status" "*" {
         set "resp_msg" "${1}";
       } else {
         set "resp_msg" "Away for a while, without access to email.";
       }
       vacation :handle "ext-away" :seconds 1800 "${resp_msg}";
     }
        

2. In the next example, we'll check for the recipient's personal assistant, and give very detailed information about the recipient's status to that sender. For other senders in the "family" and "friends" lists, we'll also send an auto-reply. Other senders will be considered less important, and don't need auto-replies.

2. 在下一个示例中,我们将检查收件人的个人助理,并向该发件人提供有关收件人状态的详细信息。对于“家人”和“朋友”列表中的其他发件人,我们还将发送自动回复。其他发件人将被视为不太重要,不需要自动回复。

require ["envelope", "extlists", "enotify", "vacation-seconds"];

需要[“信封”、“ExtList”、“enotify”、“休假秒”];

   if envelope :is "from" "assistant@example.com"
     {
       if notify_method_capability "xmpp:me@example.com" "show" "away"
         {
           vacation :handle "away" :seconds 600
               "I'm away for now, but I'll be back soon.";
         }
       elsif notify_method_capability "xmpp:me@example.com" "show" "dnd"
         {
           vacation :handle "dnd" :seconds 1800
               "I'm not to be disturbed.  I'll check mail later.";
         }
       elsif notify_method_capability "xmpp:me@example.com" "show" "xa"
         {
           vacation :handle "ext-away" :seconds 3600
               "I'm away for a while, without access to email.";
         }
       elsif notify_method_capability "xmpp:me@example.com" "busy" "yes"
         {
           vacation :handle "busy" :seconds 1800
               "I'm very busy, but might check email now and then.";
         }
        
   if envelope :is "from" "assistant@example.com"
     {
       if notify_method_capability "xmpp:me@example.com" "show" "away"
         {
           vacation :handle "away" :seconds 600
               "I'm away for now, but I'll be back soon.";
         }
       elsif notify_method_capability "xmpp:me@example.com" "show" "dnd"
         {
           vacation :handle "dnd" :seconds 1800
               "I'm not to be disturbed.  I'll check mail later.";
         }
       elsif notify_method_capability "xmpp:me@example.com" "show" "xa"
         {
           vacation :handle "ext-away" :seconds 3600
               "I'm away for a while, without access to email.";
         }
       elsif notify_method_capability "xmpp:me@example.com" "busy" "yes"
         {
           vacation :handle "busy" :seconds 1800
               "I'm very busy, but might check email now and then.";
         }
        
     }
   elsif envelope :list "from" [":addrbook:family",
                                ":addrbook:friends"]
     {
       if notify_method_capability "xmpp:me@example.com" "show"
              ["away", "dnd", "xa"]
         {
           vacation :handle "away" :seconds 3600
               "I'm not available to respond to email.";
         }
     }
   else
     { # We could respond as below, making it only once a day
       # for less important senders.  Better to just omit
       # that, though (see the end of the Introduction section).
       #
       # vacation :handle "catchall" :days 1
       #     "I got your message, and might read it eventually.";
     }
        
     }
   elsif envelope :list "from" [":addrbook:family",
                                ":addrbook:friends"]
     {
       if notify_method_capability "xmpp:me@example.com" "show"
              ["away", "dnd", "xa"]
         {
           vacation :handle "away" :seconds 3600
               "I'm not available to respond to email.";
         }
     }
   else
     { # We could respond as below, making it only once a day
       # for less important senders.  Better to just omit
       # that, though (see the end of the Introduction section).
       #
       # vacation :handle "catchall" :days 1
       #     "I got your message, and might read it eventually.";
     }
        

3. For this example, if the sender is a work colleague and the recipient is on extended away status, then reply with a message giving alternative contact information. The message might also include details about the reason for the absence, or other personal or confidential information that shouldn't be shared with senders who aren't associated with the recipient's company.

3. 在本例中,如果发件人是工作同事,而收件人处于“扩展”状态,则回复时会显示一条消息,提供其他联系信息。该邮件还可能包括有关缺席原因的详细信息,或不应与与收件人公司无关的发件人共享的其他个人或机密信息。

require ["envelope", "extlists", "enotify", "vacation"];

要求[“信封”、“外部列表”、“enotify”、“休假”];

   if envelope :list "from" ":addrbook:co-workers"
     {
       if notify_method_capability "xmpp:me@example.com" "show" "xa"
         {
           vacation :handle "bigtrip" :days 3
               "I'm on an extended business trip to Texas for the Foo
                project.  Contact my backup, Susan <susan@example.com>,
                or call my assistant on +1 666 555 1234 if you urgently
                need to contact me.";
         }
     }
        
   if envelope :list "from" ":addrbook:co-workers"
     {
       if notify_method_capability "xmpp:me@example.com" "show" "xa"
         {
           vacation :handle "bigtrip" :days 3
               "I'm on an extended business trip to Texas for the Foo
                project.  Contact my backup, Susan <susan@example.com>,
                or call my assistant on +1 666 555 1234 if you urgently
                need to contact me.";
         }
     }
        

4. This example is used to send an acknowledgment to every message received. A :seconds value of zero is used to reply to every message, with no removal of duplicates to the same sender. This requires that the Sieve engine allow an interval of zero; if it

4. 此示例用于向收到的每条消息发送确认。答:秒值为零用于回复每封邮件,不会删除对同一发件人的重复邮件。这要求筛分引擎允许间隔为零;如果是

does not, and it imposes a minimum value, not every message will receive an auto-reply.

不会,并且它规定了一个最小值,不是每封邮件都会收到自动回复。

require ["envelope", "extlists", "vacation-seconds"];

需要[“信封”、“外部列表”、“假期秒”];

   if not envelope :list "from" ":addrbook:staff"
     {
       vacation :handle "auto-resp" :seconds 0
           "Your request has been received.  A service
            representative will contact you as soon as
            possible, usually within one business day.";
     }
        
   if not envelope :list "from" ":addrbook:staff"
     {
       vacation :handle "auto-resp" :seconds 0
           "Your request has been received.  A service
            representative will contact you as soon as
            possible, usually within one business day.";
     }
        

5. This example uses the same structure to automatically send a copy of each incoming message to the recipient's backup, if the sender is a customer contact or co-worker, or if the message's subject includes the word "urgent".

5. 如果发件人是客户联系人或同事,或者邮件的主题包含单词“加急”,则此示例使用相同的结构自动将每个传入邮件的副本发送到收件人的备份。

require ["envelope", "extlists", "enotify"];

要求[“信封”、“ExtList”、“enotify”];

   if anyof (
       envelope :list "from" [":addrbook:customers",
                              ":addrbook:co-workers"],
       header :contains "subject" "urgent"
     ) {
       if notify_method_capability "xmpp:me@example.com" "show" "xa"
         {
           redirect "susan@example.com"; # send a copy to my backup
           keep; # also keep a copy for myself
         }
     }
   }
        
   if anyof (
       envelope :list "from" [":addrbook:customers",
                              ":addrbook:co-workers"],
       header :contains "subject" "urgent"
     ) {
       if notify_method_capability "xmpp:me@example.com" "show" "xa"
         {
           redirect "susan@example.com"; # send a copy to my backup
           keep; # also keep a copy for myself
         }
     }
   }
        
4. Security Considerations
4. 安全考虑

See the Security Considerations sections of the following specifications for discussion of security considerations not covered here:

有关此处未涉及的安全注意事项的讨论,请参阅以下规范的安全注意事项部分:

o Sieve base specification [RFC5228]

o 筛座规格[RFC5228]

o Sieve Vacation extension [RFC5230]

o 筛选假期扩展[RFC5230]

o Vacation "Seconds" parameter [RFC6131]

o 假期“秒”参数[RFC6131]

o Sieve Externally Stored Lists extension [RFC6134]

o 筛选外部存储的列表扩展[RFC6134]

o Sieve Notify extension [RFC5435] (and any applicable notification methods)

o 筛选通知扩展[RFC5435](以及任何适用的通知方法)

This document describes how to set up a system that creates automatic replies in an intelligent way. Despite the "intelligence", errors in scripts can result in too many auto-reply messages, especially when the reply interval is minimal (using the "notify" action, or the "vacation" action with a small value for ":seconds").

本文档介绍如何设置一个系统,以智能方式创建自动回复。尽管有“智能”,但脚本中的错误可能会导致太多的自动回复消息,尤其是在回复间隔最小的情况下(使用“通知”操作或“休假”操作,值很小:秒)。

Despite the "intelligence", too, errors in scripts can result in private information getting to senders inappropriately. In example 3 in Section 3, for instance, if the :list test checks the wrong list, or none at all, information about the recipient's business trip might be sent to someone who has no need to know about it, and that information should not have been sent.

尽管有“智能”,脚本中的错误也会导致私人信息不适当地传递给发件人。例如,在第3节的示例3中,如果:list测试检查了错误的列表,或者根本没有,那么关于收件人出差的信息可能会被发送给不需要知道的人,而该信息不应该被发送。

Even without errors in scripts, a sender who recognizes that auto-replies are dependent upon the recipient's presence can use that fact to probe the presence information. One result of that can be that the sender discerns changes in the recipient's presence that the sender would normally not be allowed to see, making this an unintentional back door into the user's presence information. Another result is that this can create a "covert channel", allowing the recipient to send information to a sender by changing his presence information, his address book, and/or his Sieve script (though in this regard, the exposure is comparable to any other case of shared presence information).

即使脚本中没有错误,如果发送方认识到自动回复依赖于收件人的状态,则可以使用该事实来探测状态信息。这样做的一个结果可能是,发送者识别出接收者状态中的变化,而发送者通常不允许看到这些变化,从而使其成为进入用户状态信息的无意后门。另一个结果是,这可以创建一个“隐蔽通道”,允许接收者通过更改其状态信息、地址簿和/或筛选脚本向发送者发送信息(尽管在这方面,暴露与共享状态信息的任何其他情况类似)。

An auto responder can cause leaks of other pieces of information, including potentially providing the ability to attack cryptographic keying material. For example, using the time it takes to perform a cryptographic operation, an attacker may obtain information about the secret key. An auto responder that doesn't take timing into account could accidentally leak this kind of information.

自动响应程序可能导致其他信息泄漏,包括可能提供攻击加密密钥材料的能力。例如,攻击者可以利用执行加密操作所需的时间获取有关密钥的信息。不考虑计时的自动应答器可能会意外泄漏此类信息。

Moreover, if an auto responder script directly returns the results of a cryptographic operation, that could also provide an attack vector. For example, if a script returns the results of a decryption operation, an attacker can send an arbitrarily encrypted message and use the results as a chosen cyphertext attack to decode the encryption key. Authors of scripts should be careful about what information they return to senders.

此外,如果自动响应脚本直接返回加密操作的结果,则也可以提供攻击向量。例如,如果脚本返回解密操作的结果,攻击者可以发送任意加密的消息,并将结果用作选定的加密文本攻击来解码加密密钥。脚本的作者应该小心返回给发件人的信息。

5. Normative References
5. 规范性引用文件

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

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

[RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension", RFC 5229, January 2008.

[RFC5229]Homme,K.,“筛选电子邮件过滤:变量扩展”,RFC5292008年1月。

[RFC5230] Showalter, T. and N. Freed, "Sieve Email Filtering: Vacation Extension", RFC 5230, January 2008.

[RFC5230]Showalter,T.和N.Freed,“筛选电子邮件过滤:假期延长”,RFC 5230,2008年1月。

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

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

[RFC6131] George, R. and B. Leiba, "Sieve Vacation Extension: "Seconds" Parameter", RFC 6131, July 2011.

[RFC6131]George,R.和B.Leiba,“筛选假期扩展:“秒”参数”,RFC 61312011年7月。

[RFC6132] George, R. and B. Leiba, "Sieve Notification Using Presence Information", RFC 6132, July 2011.

[RFC6132]George,R.和B.Leiba,“使用状态信息筛选通知”,RFC 61322011年7月。

[RFC6134] Melnikov, A. and B. Leiba, "Sieve Extension: Externally Stored Lists", RFC 6134, July 2011.

[RFC6134]Melnikov,A.和B.Leiba,“筛子扩展:外部存储列表”,RFC 61342011年7月。

Authors' Addresses

作者地址

Robins George Huawei Technologies Bangalore, Karnataka 560071 India

罗宾斯乔治华为技术有限公司印度卡纳塔克邦班加罗尔560071

   Phone: +91-080-41117676
   EMail: robinsgv@gmail.com
        
   Phone: +91-080-41117676
   EMail: robinsgv@gmail.com
        

Barry Leiba Huawei Technologies

巴里·雷巴华为技术有限公司

   Phone: +1 646 827 0648
   EMail: barryleiba@computer.org
   URI:   http://internetmessagingtechnology.org/
        
   Phone: +1 646 827 0648
   EMail: barryleiba@computer.org
   URI:   http://internetmessagingtechnology.org/
        

Alexey Melnikov Isode Limited 5 Castle Business Village, 36 Station Road Hampton, Middlesex TW12 2BX UK

英国米德尔塞克斯郡汉普顿车站路36号城堡商业村5号Alexey Melnikov Isode Limited TW12 2BX

   EMail: Alexey.Melnikov@isode.com
   URI:   http://www.melnikov.ca/
        
   EMail: Alexey.Melnikov@isode.com
   URI:   http://www.melnikov.ca/