6133
INFORMATIONAL
Sieve Email Filtering: Use of Presence Information with Auto-Responder Functionality
Authors: R. George, B. Leiba, A. Melnikov
Date: July 2011
Area: app
Working Group: sieve
Stream: IETF
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. This document is not an Internet Standards Track specification; it is published for informational purposes.
RFC 6133
INFORMATIONAL
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
<span class="h1">Sieve Email Filtering:</span>
<span class="h1">Use of Presence Information with Auto-Responder Functionality</span>
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.
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 <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="https://www.rfc-editor.org/info/rfc6133">http://www.rfc-editor.org/info/rfc6133</a>.
Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) 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.
<span class="grey">George, et al. Informational [Page 1]</span>
<span id="page-2" ></span>
<span class="grey"><a href="./rfc6133">RFC 6133</a> Auto Response July 2011</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. How To Create Auto-Replies . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-3">3</a>. Example Use Cases for Auto-Replies . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-4">4</a>. Security Considerations . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-5">5</a>. Normative References . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
This document describes how the Sieve email filtering language
[<a href="./rfc5228" title=""Sieve: An Email Filtering Language"">RFC5228</a>], along with some extensions [<a href="./rfc5230" title=""Sieve Email Filtering: Vacation Extension"">RFC5230</a>] [<a href="./rfc5435" title=""Sieve Email Filtering: Extension for Notifications"">RFC5435</a>] [<a href="./rfc6134" title=""Sieve Extension: Externally Stored Lists"">RFC6134</a>]
[<a href="./rfc6132" title=""Sieve Notification Using Presence Information"">RFC6132</a>] [<a href="./rfc6131" title=""Sieve Vacation Extension: "">RFC6131</a>], 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.
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 <a href="#section-4">Section 4</a>).
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.
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
<span class="grey">George, et al. Informational [Page 2]</span>
<span id="page-3" ></span>
<span class="grey"><a href="./rfc6133">RFC 6133</a> Auto Response July 2011</span>
might be hidden behind an "advanced" button, and users might be
warned of the consequences and advised of the considerations in the
previous paragraph.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. How To Create Auto-Replies</span>
When an email message arrives, the Sieve script can use the
notify_method_capability of the Notify extension [<a href="./rfc5435" title=""Sieve Email Filtering: Extension for Notifications"">RFC5435</a>] to check
the recipient's presence information. The Notify-presence extension
[<a href="./rfc6132" title=""Sieve Notification Using Presence Information"">RFC6132</a>] makes additional presence, such as "away" and "do not
disturb" status, available. The script can use the External-lists
extension [<a href="./rfc6134" title=""Sieve Extension: Externally Stored Lists"">RFC6134</a>] 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.
The Vacation extension [<a href="./rfc5230" title=""Sieve Email Filtering: Vacation Extension"">RFC5230</a>] 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 [<a href="./rfc6131" title=""Sieve Vacation Extension: "">RFC6131</a>] 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 [<a href="./rfc5435" title=""Sieve Email Filtering: Extension for Notifications"">RFC5435</a>] to send a notification by a means other than
email.)
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.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Example Use Cases for Auto-Replies</span>
1. In this example, we check that the envelope "from" is in the
recipient's address book [<a href="./rfc6134" title=""Sieve Extension: Externally Stored Lists"">RFC6134</a>] and that the recipient's
presence shows "extended away" [<a href="./rfc6132" title=""Sieve Notification Using Presence Information"">RFC6132</a>]. If both of those are
true, the "vacation" action [<a href="./rfc5230" title=""Sieve Email Filtering: Vacation Extension"">RFC5230</a>] is used to send an auto-
reply, making sure we don't reply to the same sender more than
once every half hour [<a href="./rfc6131" title=""Sieve Vacation Extension: "">RFC6131</a>]. The variables extension
[<a href="./rfc5229" title=""Sieve Email Filtering: Variables Extension"">RFC5229</a>] 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.
<span class="grey">George, et al. Informational [Page 3]</span>
<span id="page-4" ></span>
<span class="grey"><a href="./rfc6133">RFC 6133</a> Auto Response July 2011</span>
require ["envelope", "extlists", "enotify", "variables",
"vacation-seconds"];
if allof (
envelope :list "from" ":addrbook:default",
notify_method_capability "xmpp:[email protected]" "show" "xa"
) {
# :matches "*" is used here to extract the value
if notify_method_capability :matches
"xmpp:[email protected]" "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.
require ["envelope", "extlists", "enotify", "vacation-seconds"];
if envelope :is "from" "[email protected]"
{
if notify_method_capability "xmpp:[email protected]" "show" "away"
{
vacation :handle "away" :seconds 600
"I'm away for now, but I'll be back soon.";
}
elsif notify_method_capability "xmpp:[email protected]" "show" "dnd"
{
vacation :handle "dnd" :seconds 1800
"I'm not to be disturbed. I'll check mail later.";
}
elsif notify_method_capability "xmpp:[email protected]" "show" "xa"
{
vacation :handle "ext-away" :seconds 3600
"I'm away for a while, without access to email.";
}
elsif notify_method_capability "xmpp:[email protected]" "busy" "yes"
{
vacation :handle "busy" :seconds 1800
"I'm very busy, but might check email now and then.";
}
<span class="grey">George, et al. Informational [Page 4]</span>
<span id="page-5" ></span>
<span class="grey"><a href="./rfc6133">RFC 6133</a> Auto Response July 2011</span>
}
elsif envelope :list "from" [":addrbook:family",
":addrbook:friends"]
{
if notify_method_capability "xmpp:[email protected]" "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.
require ["envelope", "extlists", "enotify", "vacation"];
if envelope :list "from" ":addrbook:co-workers"
{
if notify_method_capability "xmpp:[email protected]" "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
<span class="grey">George, et al. Informational [Page 5]</span>
<span id="page-6" ></span>
<span class="grey"><a href="./rfc6133">RFC 6133</a> Auto Response July 2011</span>
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.";
}
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".
require ["envelope", "extlists", "enotify"];
if anyof (
envelope :list "from" [":addrbook:customers",
":addrbook:co-workers"],
header :contains "subject" "urgent"
) {
if notify_method_capability "xmpp:[email protected]" "show" "xa"
{
redirect "[email protected]"; # send a copy to my backup
keep; # also keep a copy for myself
}
}
}
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Security Considerations</span>
See the Security Considerations sections of the following
specifications for discussion of security considerations not covered
here:
o Sieve base specification [<a href="./rfc5228" title=""Sieve: An Email Filtering Language"">RFC5228</a>]
o Sieve Vacation extension [<a href="./rfc5230" title=""Sieve Email Filtering: Vacation Extension"">RFC5230</a>]
o Vacation "Seconds" parameter [<a href="./rfc6131" title=""Sieve Vacation Extension: "">RFC6131</a>]
<span class="grey">George, et al. Informational [Page 6]</span>
<span id="page-7" ></span>
<span class="grey"><a href="./rfc6133">RFC 6133</a> Auto Response July 2011</span>
o Sieve Externally Stored Lists extension [<a href="./rfc6134" title=""Sieve Extension: Externally Stored Lists"">RFC6134</a>]
o Sieve Notify extension [<a href="./rfc5435" title=""Sieve Email Filtering: Extension for Notifications"">RFC5435</a>] (and any applicable notification
methods)
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 <a href="#section-3">Section 3</a>, 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.
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.
<span class="grey">George, et al. Informational [Page 7]</span>
<span id="page-8" ></span>
<span class="grey"><a href="./rfc6133">RFC 6133</a> Auto Response July 2011</span>
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Normative References</span>
[<a id="ref-RFC5228">RFC5228</a>] Guenther, P. and T. Showalter, "Sieve: An Email Filtering
Language", <a href="./rfc5228">RFC 5228</a>, January 2008.
[<a id="ref-RFC5229">RFC5229</a>] Homme, K., "Sieve Email Filtering: Variables Extension",
<a href="./rfc5229">RFC 5229</a>, January 2008.
[<a id="ref-RFC5230">RFC5230</a>] Showalter, T. and N. Freed, "Sieve Email Filtering:
Vacation Extension", <a href="./rfc5230">RFC 5230</a>, January 2008.
[<a id="ref-RFC5435">RFC5435</a>] Melnikov, A., Leiba, B., Segmuller, W., and T. Martin,
"Sieve Email Filtering: Extension for Notifications",
<a href="./rfc5435">RFC 5435</a>, January 2009.
[<a id="ref-RFC6131">RFC6131</a>] George, R. and B. Leiba, "Sieve Vacation Extension:
"Seconds" Parameter", <a href="./rfc6131">RFC 6131</a>, July 2011.
[<a id="ref-RFC6132">RFC6132</a>] George, R. and B. Leiba, "Sieve Notification Using
Presence Information", <a href="./rfc6132">RFC 6132</a>, July 2011.
[<a id="ref-RFC6134">RFC6134</a>] Melnikov, A. and B. Leiba, "Sieve Extension: Externally
Stored Lists", <a href="./rfc6134">RFC 6134</a>, July 2011.
<span class="grey">George, et al. Informational [Page 8]</span>
<span id="page-9" ></span>
<span class="grey"><a href="./rfc6133">RFC 6133</a> Auto Response July 2011</span>
Authors' Addresses
Robins George
Huawei Technologies
Bangalore, Karnataka 560071
India
Phone: +91-080-41117676
EMail: [email protected]
Barry Leiba
Huawei Technologies
Phone: +1 646 827 0648
EMail: [email protected]
URI: <a href="http://internetmessagingtechnology.org/">http://internetmessagingtechnology.org/</a>
Alexey Melnikov
Isode Limited
5 Castle Business Village, 36 Station Road
Hampton, Middlesex TW12 2BX
UK
EMail: [email protected]
URI: <a href="http://www.melnikov.ca/">http://www.melnikov.ca/</a>
George, et al. Informational [Page 9]
Annotations
Select text to annotate