draft-ietf-sieve-notify-presence-00.txt   draft-ietf-sieve-notify-presence-01.txt 
Sieve working group R. George Sieve working group R. George
Internet-Draft B. Leiba Internet-Draft
Intended status: Standards Track Huawei Technologies Intended status: Standards Track B. Leiba
Expires: December 25, 2010 June 23, 2010 Expires: April 15, 2011 Huawei Technologies
October 12, 2010
Sieve Notification Using Presence Information Sieve Notification Using Presence Information
draft-ietf-sieve-notify-presence-00 draft-ietf-sieve-notify-presence-01
Abstract Abstract
This is a further extension to the Sieve mail filtering language This is a further extension to the Sieve mail filtering language
Notification extension, defining presence information that may be Notification extension, defining presence information that may be
checked through the notify_method_capability feature. checked through the notify_method_capability feature.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
skipping to change at page 1, line 32 skipping to change at page 1, line 33
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 25, 2010. This Internet-Draft will expire on April 15, 2011.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2010 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 3, line 19 skipping to change at page 3, line 19
information about the user that would be useful to have access to in information about the user that would be useful to have access to in
these cases. The Notification extension [RFC5435] defines a these cases. The Notification extension [RFC5435] defines a
mechanism to test for presence (the notify_method_capability mechanism to test for presence (the notify_method_capability
feature), and defines one test for presence (the "online" feature), and defines one test for presence (the "online"
notification-capability, described in Section 5 of RFC 5435). This notification-capability, described in Section 5 of RFC 5435). This
extension specifies testing of a wider variety of presence extension specifies testing of a wider variety of presence
information. information.
1.1. Terminology Used in This Document 1.1. Terminology Used in This Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The upper-case key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
document are to be interpreted as described in [RFC2119]. "OPTIONAL" in this document are to be interpreted as described in
[RFC2119].
2. Testing presence information 2. Testing presence information
This extension uses the "notify_method_capability" test, as defined This extension uses the "notify_method_capability" test, as defined
in the Sieve [RFC5228] Notify extension [RFC5435], to test presence in the Sieve [RFC5228] Notify extension [RFC5435], to test presence
information. When a Sieve event occurs (mail arrives) for a user, a information. When a Sieve event occurs (mail arrives) for a user, a
Sieve script running on behalf of that user can present the user's Sieve script running on behalf of that user can present the user's
presence URI (in the "notification-uri" parameter) and test a presence URI (in the "notification-uri" parameter) and test a
specific item of notification presence as defined below (in the specific item of notification presence as defined below (in the
"notification-capability" parameter) against one or more values (in "notification-capability" parameter) against one or more values (in
skipping to change at page 4, line 33 skipping to change at page 4, line 33
The script tests the values of notification presence items in the The script tests the values of notification presence items in the
key-list parameter. The values that each item may have are specified key-list parameter. The values that each item may have are specified
in the list above; in addition, any item may have the value in the list above; in addition, any item may have the value
"unknown", if it is not possible to determine the correct value of "unknown", if it is not possible to determine the correct value of
the item. the item.
There is no capability string associated with this extension, but There is no capability string associated with this extension, but
this requires support for "enotify".[RFC5435] If the implementation this requires support for "enotify".[RFC5435] If the implementation
does not support the item being tested, RFC 5435 already specifies does not support the item being tested, RFC 5435 already specifies
that the test must fail without an error. that the test fail without an error.
Although this feature was conceived to assist in notifications, and Although this feature was conceived to assist in notifications, and
the test requires support of the Sieve Notify feature, it is only a the test requires support of the Sieve Notify feature, it is only a
condition test, and any Sieve action can appear inside it. There are condition test, and any Sieve action can appear inside it. There are
no Sieve actions that conflict with this extension. no Sieve actions that conflict with this extension.
3. Examples 3. Examples
1. This example will send a notification only if the recipient is 1. This example will send a notification only if the recipient is
not "busy". If the test for "busy" is not supported, this not "busy". If the test for "busy" is not supported, this
example WILL NOT send a notification. example will not send a notification.
require ["enotify"]; require ["enotify"];
if notify_method_capability "xmpp:tim@example.com" "busy" "no" if notify_method_capability "xmpp:tim@example.com" "busy" "no"
{ {
notify :message "You got mail" notify :message "You got mail"
"xmpp:tim@example.com?message;subject=SIEVE"; "xmpp:tim@example.com?message;subject=SIEVE";
} }
2. This example will send a notification only if the recipient is 2. This example will send a notification only if the recipient is
not "busy". If the test for "busy" is not supported, this not "busy". If the test for "busy" is not supported, this
example WILL send a notification. example will send a notification.
require ["enotify"]; require ["enotify"];
if not notify_method_capability "xmpp:tim@example.com" "busy" "yes" if not notify_method_capability "xmpp:tim@example.com" "busy" "yes"
{ {
notify :message "You got mail" notify :message "You got mail"
"xmpp:tim@example.com?message;subject=SIEVE"; "xmpp:tim@example.com?message;subject=SIEVE";
} }
3. This example uses the vacation extension [RFC5230] to generate an 3. This example uses the vacation extension [RFC5230] to generate an
autoreply [I-D.ietf-sieve-autoreply] if the sender is in the autoreply [I-D.ietf-sieve-autoreply] if the sender is in the
recipient's address book [I-D.ietf-sieve-external-lists] and the recipient's address book [I-D.ietf-sieve-external-lists] and the
recipient's presence shows "extended away". The variables recipient's presence shows "extended away". The variables
extension [RFC5229] is used to extract the value of the extension [RFC5229] is used to extract the value of the
recipient's presence status message, which will be used in the recipient's presence status message, which will be used in the
response to the sender. If the test for "show" is not supported, response to the sender. If the test for "show" is not supported,
this example WILL NOT send an autoreply. this example will not send an autoreply.
require ["extlists", "vacation", "enotify", "variables"]; require ["extlists", "vacation", "enotify", "variables"];
if allof ( if allof (
envelope :list "from" "tag:example.com,2009-05-28:mylist", envelope :list "from" "tag:example.com,2009-05-28:mylist",
notify_method_capability "xmpp:myjid@example.com" "show" "xa" notify_method_capability "xmpp:myjid@example.com" "show" "xa"
) { ) {
# :matches "*" is used here to extract the value # :matches "*" is used here to extract the value
if notify_method_capability :matches if notify_method_capability :matches
"xmpp:myjid@example.com" "status" "*" { "xmpp:myjid@example.com" "status" "*" {
skipping to change at page 7, line 42 skipping to change at page 7, line 42
[RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension", [RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension",
RFC 5229, January 2008. RFC 5229, January 2008.
[RFC5230] Showalter, T. and N. Freed, "Sieve Email Filtering: [RFC5230] Showalter, T. and N. Freed, "Sieve Email Filtering:
Vacation Extension", RFC 5230, January 2008. Vacation Extension", RFC 5230, January 2008.
Authors' Addresses Authors' Addresses
Robins George Robins George
Huawei Technologies
Huawei Base, Bantian, Longgang District
Shenzhen, Guangdong 518129
P. R. China
Phone: +86-755-28788314 Email: robinsgv@gmail.com
Email: robinsg@huawei.com
Barry Leiba Barry Leiba
Huawei Technologies Huawei Technologies
Phone: +1 646 827 0648 Phone: +1 646 827 0648
Email: barryleiba@computer.org Email: barryleiba@computer.org
URI: http://internetmessagingtechnology.org/ URI: http://internetmessagingtechnology.org/
 End of changes. 10 change blocks. 
18 lines changed or deleted 15 lines changed or added

This html diff was produced by rfcdiff 1.40. The latest version is available from http://tools.ietf.org/tools/rfcdiff/