git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@4232 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2010-06-09 00:48:48 +00:00
parent 8d88ab7a4d
commit c2e74a3033
1 changed files with 228 additions and 88 deletions

View File

@ -6,23 +6,35 @@
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Vacation Messages</title>
<abstract>A protocol for setting up vacation messages in Jabber.</abstract>
<title>Out-of-Office Messages</title>
<abstract>This document defines an XMPP protocol extension for communicating out-of-office status.</abstract>
&LEGALNOTICE;
<number>0109</number>
<status>Deferred</status>
<type>Informational</type>
<status>Experimental</status>
<type>Standards Track</type>
<sig>Standards</sig>
<dependencies>XEP-0030, XEP-0082</dependencies>
<dependencies>XEP-0060, XEP-0163</dependencies>
<supersedes>None</supersedes>
<supersededby>None</supersededby>
<shortname>vacation</shortname>
<shortname>ooo</shortname>
<author>
<firstname>Darrell</firstname>
<surname>Piner</surname>
<email>dpiner@cisco.com</email>
<jid>dpiner@cisco.com</jid>
</author>
<author>
<firstname>Robert</firstname>
<surname>Norris</surname>
<email>rob@cataclysm.cx</email>
<jid>rob@cataclysm.cx</jid>
</author>
<revision>
<version>0.3</version>
<date>2010-05-24</date>
<initials>rdp</initials>
<remark>Modified specification to use PEP instead of a dedicated protocol; streamlined use cases; changed namespace to urn:xmpp:ooo:0.</remark>
</revision>
<revision>
<version>0.2</version>
<date>2003-08-12</date>
@ -38,129 +50,261 @@
</header>
<section1 topic='Introduction'>
<p>Popular electronic mail systems have long including features that allow users to set up automated messages that are returned to message senders when the user is not able to deal with the message immediately. This feature is commonly known as "vacation messages", because it is most commonly used when a user is unable to read their messages because they are on vacation.</p>
<p>This document describes a similar system that allows Jabber users to setup vacation messages when they are away.</p>
<p>Popular electronic mail systems include features allowing users to set up
automated messages that are returned to message senders when the user is not
able to deal with the message immediately. This feature is commonly known as
"out-of-office" or "vacation" messages, because it is most commonly used when
a user is unable to read their messages because they are out of the office
(e.g., on vacation).</p>
<p>This document describes a similar system that enables XMPP users to setup
out-of-office messages when they are away.</p>
<p>The basis for the e-mail system mechanism is considering an incoming
message at the server level and determining whether to respond with a canned
out-of-office message. While a system may send a response for each incoming
message, many systems provide an optimization where a response to subsequent
e-mail messages is sent after some period of time expires.</p>
</section1>
<section1 topic='Requirements'>
<p>The requirements for this document are fairly straightforward. A user MUST be able to:</p>
<p>The requirements for this feature are fairly straightforward. A user MUST be able to:</p>
<ul>
<li>Discover if their server supports vacation messages.</li>
<li>Retrieve their current vacation settings.</li>
<li>Set new vacation settings.</li>
<li>Remove vacation settings.</li>
<li>Retrieve their current out-of-office settings.</li>
<li>Set new out-of-office settings.</li>
<li>Remove out-of-office settings.</li>
<li>Notify interested parties of the out-of-office settings when it
is in effect.</li>
</ul>
<p>Additionally, a server supporting vacation messages MUST respond to a message sent to a local user that has an active vacation message set by automatically sending that message to the sender.</p>
<p>All these requirements are satisfied by &xep0163;, which is a subset of &xep0060;.</p>
</section1>
<section1 topic='Format'>
<p>The out-of-office setting contains a start-time, an end-time and a
short message text.</p>
<example caption="Sample Out-of-Office message"><![CDATA[
<start>2003-07-06T10:30:00+10:00</start>
<end>2003-07-13T08:00:00+10:00</end>
<message>I'm attending OSCON in sunny Portland and won't be able to
read your message until I get back. If its urgent, please
send email to rob@cataclysm.cx.</message>
]]></example>
<p>The start and end times are informational only; i.e., the server does
nothing with these values other than store them. PEP does not include node
lifetime management (i.e., start and end times for the node); therefore, the server is unable
to enforce any start and end times included in the settings.</p>
<p>Using the PEP mechanism a client creates
out-of-office settings on a PEP node with the desired access model (such as Presence or Open). When
a user (or their client) sends presence containing CAPS (see &xep0115;) with an
entry for out-of-office to a contact with an out-of-office message, the user's
client is notified of the out-of-office message and may display, in a client-defined
fashion, the out-of-office settings information.</p>
<p>Clients may rely on the PEP node for notifications of changes as well as
automatic notification when the user logs-in (i.e., a user is notified of the
current item on the out-of-office PEP node of another user on sending initial
presence).</p>
</section1>
<section1 topic='Use cases'>
<section2 topic='Discovering support for vacation messages'>
<section2 topic='Retrieving the current out-of-office settings'>
<p>Before attempting to set or retrieve its current vacation settings, a user SHOULD first verify that their server supports vacation messages. To do this, the user makes a &xep0030; "#info" query to their server. If supported, the server includes a feature of "http://www.jabber.org/protocol/vacation" in the result.</p>
<p>A user may request their current out-of-office message by sending an IQ get to the local server like so:</p>
<example caption='Discovering support for vacation messages'><![CDATA[
<iq type='get' to='cataclysm.cx' id='disco1'>
<query xmlns='http://www.jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<example caption='Discovery response'><![CDATA[
<iq type='result' from='cataclysm.cx' id='disco1'>
<query xmlns='http://www.jabber.org/protocol/disco#info'>
...
<feature var='http://www.jabber.org/protocol/vacation'/>
...
</query>
<example caption='Retrieving the current out-of-office settings'><![CDATA[
<iq type='get'
from='user@example.com'
to='example.com'
id='get1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='urn:xmpp:ooo:0'/>
</pubsub>
</iq>
]]></example>
</section2>
<section2 topic='Retrieving the current vacation settings'>
<p>A user may request their current vacation settings by sending an IQ get to the local server like so:</p>
<example caption='Retrieving the current vacation settings'><![CDATA[
<iq type='get' id='get1'>
<query xmlns='http://www.jabber.org/protocol/vacation'/>
<example caption='Server returns out-of-office settings'><![CDATA[
<iq type='result'
from='example.com'
id='get1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub>
<items node='urn:xmpp:ooo:0>
<item id='current'>
<ooo xmlns='urn:xmpp:ooo:0'>
<start>2003-07-06T10:30:00+10:00</start>
<end>2003-07-13T08:00:00+10:00</end>
<message>I'm attending OSCON in sunny Portland and won't be able to
read your message until I get back. If its urgent, please
send email to rob@cataclysm.cx.</message>
</ooo>
</item>
</items>
</pubsub>
</iq>
]]></example>
<example caption='Server returns vacation settings'><![CDATA[
<iq type='result' id='get1'>
<query xmlns='http://www.jabber.org/protocol/vacation'>
<start>2003-07-06T10:30:00+10:00</start>
<end>2003-07-13T08:00:00+10:00</end>
<message>I'm attending OSCON in sunny Portland and won't be able to
read your message until I get back. If its urgent, please
send email to rob@cataclysm.cx.</message>
</query>
</iq>
]]></example>
<p>The &lt;start/> and &lt;end/> elements define the times between which this vacation
message should be considered valid by a supporting client; the times are in
the format specified by &xep0082;.</p>
<p>The &lt;message/> element contains the text of the message which the client may
display for the user (when appropriate).</p>
<p>&lt;start/> and &lt;end/> define the times between which this vacation message is valid. These are in the format specified by &xep0082;.</p>
<p>&lt;message/> contains the text of the message that will be sent to a remote user that sends the user a message while they have active vacation settings.</p>
<p>If the user has no stored vacation message, the user will receive a
result like the following:</p>
<p>If the user has no stored vacation settings, the user will receive a result like the following:</p>
<example caption='User does not have any vacation settings'><![CDATA[
<example caption='User does not have any out-of-office settings'><![CDATA[
<iq type='result' id='get1'/>
]]></example>
</section2>
<section2 topic='Setting new vacation settings'>
<section2 topic='Publishing new out-of-office settings'>
<p>A user may set new vacation settings by sending a IQ to the local server like so:</p>
<p>A user may set new vacation message by publishing a new item with an id
of 'current' to the out-of-office node:</p>
<example caption='Setting new vacation settings'><![CDATA[
<iq type='set' id='set1'>
<query xmlns='http://www.jabber.org/protocol/vacation'>
<start>2003-07-06T10:30:00+10:00</start>
<end>2003-07-13T08:00:00+10:00</end>
<message>I'm attending OSCON in sunny Portland and won't be able to
read your message until I get back. If its urgent, please
send email to rob@cataclysm.cx.</message>
</query>
<example caption='Publishing new out-of-office settings'><![CDATA[
<iq type='set'
from='user@example.com/client'
to='example.com'
id='publish1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='urn:xmpp:ooo:0'>
<item id='current'>
<ooo xmlns='urn:xmpp:ooo:0'>
<start>2003-07-06T10:30:00+10:00</start>
<end>2003-07-13T08:00:00+10:00</end>
<message>I'm attending OSCON in sunny Portland and won't be able to
read your message until I get back. If its urgent, please
send email to rob@cataclysm.cx.</message>
</ooo>
</item>
</publish>
</pubsub>
</iq>
]]></example>
<example caption='Vacation settings set successfully'><![CDATA[
<iq type='result' id='set1'/>
<example caption='Out-of-office settings published successfully'><![CDATA[
<iq type='result'
from='example.com'
to='user@example.com/client'
id='publish1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='urn:xmpp:ooo:0'>
<item id='current'>
<ooo xmlns='urn:xmpp:ooo:0'>
<start>2003-07-06T10:30:00+10:00</start>
<end>2003-07-13T08:00:00+10:00</end>
<message>I'm attending OSCON in sunny Portland and won't be able to
read your message until I get back. If its urgent, please
send email to rob@cataclysm.cx.</message>
</ooo>
</item>
</publish>
</pubsub>
</iq>
]]></example>
<p>And by design, PEP sends a notification to all the user's resources.</p>
<example caption="PEP node notification sent to user"><![CDATA[
<message from='user@example.com'
id='notification_1781477179'
to='user@example.com/client' type='headline'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='urn:xmpp:ooo:0'>
<item id='current'>
<ooo xmlns='urn:xmpp:ooo:0'>
<start>2003-07-06T10:30:00+10:00</start>
<end>2003-07-13T08:00:00+10:00</end>
<message>I'm attending OSCON in sunny Portland and won't be able to
read your message until I get back. If its urgent, please
send email to rob@cataclysm.cx.</message>
</ooo>
</item>
</items>
</event>
</message>
]]></example>
<p>The meaning of each element is as outlined above. All elements are required.</p>
<p>Additionally, the &lt;start/> and &lt;end/> elements MAY be empty (ie have no CDATA). When &lt;start/> is empty, the server MUST take this to mean that the settings should take effect immediately. Similarly, when &lt;end/> is empty, the server MUST take this to mean that the settings should never expire (unless they are explicitly removed).</p>
<p>Additionally, the &lt;start/> and &lt;end/> elements MAY be empty (i.e.,
have no CDATA). When &lt;start/> is empty, the client MUST take this to mean
that the settings should take effect immediately. Similarly, when &lt;end/>
is empty, the client MUST take this to mean that the settings should never
expire (unless they are explicitly removed).</p>
</section2>
<section2 topic='Removing vacation settings'>
<section2 topic='Removing out-of-office settings'>
<p>A user may remove all stored vacation settings by sending a IQ to the local server like so:</p>
<p>A user may remove all stored vacation settings by sending an IQ to the local server like so:</p>
<example caption='Remove vacation settings'><![CDATA[
<iq type='set' id='set2'>
<query xmlns='http://www.jabber.org/protocol/vacation'/>
<iq type='set'
from='user@example.com/client'
to='example.com'
it='retract1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<retract node='urn:xmpp:ooo:0'>
<item id='current' />
</retract>
</pubsub>
</iq>
]]></example>
<example caption='Vacation settings removed successfully'><![CDATA[
<iq type='result' id='set2'/>
<iq type='result'
from='example.com'
to='user@example.com/client'
id='retract1' />
]]></example>
<p>TODO: Is the Delete And Notify functionality described in XEP-0060
7.2.2.1 widely implemented? If so, should that case be included here?</p>
</section2>
<section2 topic='Hiding vacation settings'>
<p>In PEP, a node's default access model is 'presence' (i.e., any other user
with a subscription type "from" or "both" may subscribe to the node. PEP
provides other access models including a 'whitelist.' See &xep0060; section
4.5 for a list of Node Access Models.</p>
<p>The whitelist access model can be used to hide the current
out-of-office message. With an empty whitelist, no other users
receive notification when the node changes. The client may also use this
fact to allow the client's user to set up an out-of-office message
before it becomes active.</p>
<p>See &xep0060; Section 8.2 for details on configuration the out-of-office
node's access model.</p>
<p>See also &xep0223;.</p>
<p>PEP and PubSub allow for publishing an item and setting configuration on
a node. A user may wish to create an initial, hidden out-of-office
setting. They may do so by publishing an item with id='archive' and an
access model of 'whitelist.' When the user enables the
out-of-office settings, a configuration changing the access model
to some other mode sends notifications as defined by PEP.</p>
<p>TODO: add an example of publishing an item and setting configuration with
a single stanza i.e., find the appropriate example from &xep0060; or
&xep0163; and include it here.</p>
</section2>
</section1>
<section1 topic='Server requirements'>
<p>A server implementing vacation messages MUST reply to the message using the text specified in the receiving users' vacation settings if the time that message arrived from the remote users falls within data range specified, but only if the received message is to be queued for later delivery.</p>
<p>Implementing servers SHOULD (if local resource contraints allow) only send one automated response to a remote user for each local user that has active vacation settings. The memory of this action MUST be reset when the active settings have expired or when the user resets or removes them.</p>
<p>A server implementing out-of-office messages MUST implement
&xep0163;.</p>
</section1>
<section1 topic='Security Considerations'>
<p>None yet defined.</p>
@ -169,7 +313,7 @@
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations'>
<p>The 'http://jabber.org/protocol/vacation' namespace shall be registered with the &REGISTRAR; as a result of this document.</p>
<p>The 'urn:xmpp:ooo:0' namespace shall be registered with the &REGISTRAR; as a result of this document.</p>
</section1>
<section1 topic='XML Schema'>
@ -178,24 +322,20 @@
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://jabber.org/protocol/vacation'
xmlns='http://jabber.org/protocol/vacation'
targetNamespace='urn:xmpp:ooo:0'
xmlns='urn:xmpp:ooo:0'
elementFormDefault='qualified'>
<xs:element name='query'>
<xs:element name='item'>
<xs:complexType>
<xs:sequence>
<xs:element ref='start' minOccurs='0' maxOccurs='1'/>
<xs:element ref='end' minOccurs='0' maxOccurs='1'/>
<xs:element ref='message' minOccurs='0' maxOccurs='1'/>
<xs:element name='start' minOccurs='0' maxOccurs='1' type='xs:string'/>
<xs:element name='end' minOccurs='0' maxOccurs='1' type='xs:string'/>
<xs:element name='message' minOccurs='0' maxOccurs='1' type='xs:string'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name='start' type='xs:string'/>
<xs:element name='end' type='xs:string'/>
<xs:element name='message' type='xs:string'/>
</xs:schema>
]]></code>
</section1>