Abstract: | This specification defines an XMPP protocol extension that enables entities to include RFC822-style address headers within XMPP stanzas in order to specify multiple recipients or sub-addresses. |
Authors: | Joe Hildebrand, Peter Saint-Andre |
Copyright: | © 1999 - 2016 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Draft |
Type: | Standards Track |
Version: | 1.1 |
Last Updated: | 2004-09-15 |
NOTICE: The protocol defined herein is a Draft Standard of the XMPP Standards Foundation. Implementations are encouraged and the protocol is appropriate for deployment in production systems, but some changes to the protocol are possible before it becomes a Final Standard.
1. Introduction
2. Discovering Server Support
2.1. Disco to determine support
2.2. Multicast service
2.3. Caching
3. Outer Stanza
4. Addresses
4.1. 'jid' attribute
4.2. 'uri' attribute
4.3. 'node' attribute
4.4. 'desc' attribute
4.5. 'delivered' attribute
4.6. 'type' attribute
4.6.1. Address type='to'
4.6.2. Address type='cc'
4.6.3. Address type='bcc'
4.6.4. Address type='replyto'
4.6.5. Address type='replyroom'
4.6.6. Address type='noreply'
4.7. Extensibility
5. Multicast Usage
6. Example Flow
7. Reply Handling
8. Error Conditions
9. Security Considerations
10. IANA Considerations
11. XMPP Registrar Considerations
12. XML Schema
13. Acknowledgements
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
On the existing Jabber network, there are many opportunities to optimize stanza traffic. For example, clients that want to send the same stanza to multiple recipients currently must send multiple stanzas. Similarly, when a user comes online the server sends many nearly-identical presence stanzas to remote servers.
The 'http://jabber.org/protocol/address' specification provides a method for both clients and servers to send a single stanza and have it be delivered to multiple recipients, similar to that found in RFC 822 [1]. As a side-effect, it also provides all of the functionality specified by the old 'jabber:x:envelope' [2] proposal, which this XEP can supersede.
Support for Extended Stanza Addressing in a given server instance SHOULD be determined using Service Discovery (XEP-0030) [3]. A conforming server MUST respond to disco#info requests.
To determine if a server or service supports Extended Stanza Addressing, the requesting entity SHOULD send a disco#info request to it.
<iq type='get' from='romeo@montague.net/orchard' to='multicast.montague.net' id='info1'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
If the server supports Extended Stanza Addressing, it MUST include a "http://jabber.org/protocol/address" feature in the response.
<iq type='result' from='multicast.montague.net' to='romeo@montague.net/orchard' id='info1'> <query xmlns='http://jabber.org/protocol/disco#info'> ... <feature var='http://jabber.org/protocol/address'/> ... </query> </iq>
The IM service MAY implement multicast directly, or it MAY delegate that chore to a separate service. A client can use the following approach to find a multicast-capable service hosted by its domain:
The multicast service MAY choose to limit which local users can use the service. The server MAY choose to limit whether non-local servers can send address headers that require the local server to send to third parties (relaying). In either case, if the server chooses to disallow the request, the server MUST return a Forbidden error (see the Error Conditions section below). In the relaying case, the server SHOULD NOT deliver to any of the addresses (even the local ones) if the sender is disallowed.
Implementations MAY choose to cache the disco response. Positive responses MAY be cached differently than negative responses. The result SHOULD NOT be cached for more than 24 hours, unless some sort of time-to-live information is added to the Service Discovery protocol in the future.
For multicast processing, the stanza containing an address header (the 'outer stanza') MUST be addressed to the multicast service, with no username or resource in the 'to' attribute.
When used for additional information in a one-to-one stanza (e.g. using the 'node' attribute), the outer stanza SHOULD be addressed directly to the recipient, not to the multicast service.
A multicast service MUST NOT change the 'from' address on the outer stanza. Note that this will limit third-party relaying across server-to-server connections as a side-effect.
Address headers MAY be included in message or presence stanzas. They MUST NOT be included as the direct child of an IQ stanza.
Address values are packaged together into an <addresses/> element.
<message to='multicast.jabber.org'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='hildjj@jabber.org/Work' desc='Joe Hildebrand'/> <address type='cc' jid='jer@jabber.org/Home' desc='Jeremie Miller'/> </addresses> <body>Hello, world!</body> </message>
<presence from='hildjj@jabber.com' to='multicast.jabber.org' type='unavailable'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='bcc' jid='temas@jabber.org'/> <address type='bcc' jid='jer@jabber.org'/> </addresses> </presence>
Each address to which the sender wants the stanza to be re-sent will show up as an <address/> in the <addresses/> element. There are several different types of address, shown below.
An <address/> element MUST possess a 'type' attribute, and MUST possess at least one of the 'jid', 'uri', 'node', and 'desc' attributes. An <address/> element MUST NOT possess both a 'jid' attribute and a 'uri' attribute. If sending through a multicast service, an address MUST include a 'jid' or a 'uri' attribute, unless it is of type 'noreply'.
The 'jid' attribute is used to specify a simple Jabber ID associated with this address. If the 'jid' attribute is specified, the 'uri' attribute MUST NOT be specified. Support for the 'jid' attribute is REQUIRED.
The 'uri' attribute is used to specify an external system address, such as a sip:, sips:, or im: URI. If the 'uri' attribute is specified, the 'jid' and 'node' attributes MUST NOT be specified. These URIs MUST be formatted as specified in their respective RFCs, however with the characters & < > ' " replaced by their equivalent XML escapes, & < > ' ". If a receiving entity does not understand the given URI scheme, or if the URI is not formatted correctly, a "JID Malformed" error SHOULD be returned. Support for the 'uri' attribute is OPTIONAL.
The 'node' attribute is used to specify a sub-addressable unit at a particular JID, corresponding to a Service Discovery node. A node attribute MAY be included if a 'jid' attribute is specified. If a 'uri' attribute is specified, a 'node' attribute MUST NOT be specified. Support for the 'node' attribute is RECOMMENDED.
The 'desc' attribute is used to specify human-readable information for this address. This data may be used by clients to provide richer address-book integration. This information is in the language of the sender, which MAY be identified using the standard xml:lang rules from XMPP Core [4]. Support for the 'desc' attribute is RECOMMENDED.
When a multicast service delivers the stanza to a non-bcc address, it MUST add a delivered='true' attribute to the address element. A multicast service MUST NOT deliver to an address that was marked with a delivered='true' attribute when the service received the stanza. A multicast service SHOULD attempt to deliver to all addresses that are not marked with a delivered='true' attribute. The delivered attribute is used to prevent loops. See the Multicast Usage section below for more details. Support for the 'delivered' attribute is REQUIRED.
The 'type' attribute is used to specify the semantics of a particular address. Support for the 'type' attribute is REQUIRED.
These addressees are the primary recipients of the stanza.
These addressees are the secondary recipients of the stanza.
These addressees should receive 'blind carbon copies' of the stanza. This means that the server MUST remove these addresses before the stanza is delivered to anyone other than the given bcc addressee or the multicast service of the bcc addressee.
This is the address to which all replies are requested to be sent. Clients SHOULD respect this request unless an explicit override occurs. There MAY be more than one replyto or replyroom on a stanza, in which case the reply stanza MUST be routed to all of the addresses.
This is the JID of a Multi-User Chat (XEP-0045) [5] room to which responses should be sent. When a user wants to reply to this stanza, the client SHOULD join this room first. Clients SHOULD respect this request unless an explicit override occurs. There MAY be more than one replyto or replyroom on a stanza, in which case the reply stanza MUST be routed to all of the addresses.
This address type contains no actual address information. Instead, it means that the receiver SHOULD NOT reply to the message. This is useful when broadcasting messages to many receivers.
As specified herein, the <address/> element is empty. Implementations or future protocols MAY extend the <address/> element for additional functionality, but any extensions are out of scope for this XEP. Such extensions SHOULD be appropriately qualified with a new namespace, and any extensions that are not understood by an implementation MUST be ignored.
<message to='groups.jabber.org'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' desc='Foo Group'> <group xmlns='some:funny:group:ns'>foo</group> </address> <address type='replyroom' jid='jdev@conference.jabber.org'/> </addresses> </message>
The following usage scenario shows how messages flow through both address-enabled and non-address-enabled portions of the Jabber network.
Note: the logic associated with how to perform the following tasks is purely informational. A conforming service MUST generate output as if these rules had been followed, but need not (and probably will not) use this algorithm.
Assume for these examples that header1.org and header2.org support address headers, and noheader.org does not.
<iq type='get' to='header1.org' from='a@header1.org/work' id='id_1'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
<iq type='result' from='header1.org' to='a@header1.org/work' id='id_1'> <query xmlns='http://jabber.org/protocol/disco#info'> <feature var='http://jabber.org/protocol/address'/> </query> </iq>
<message to='header1.org' from='a@header1.org/work'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='to@header1.org'/> <address type='cc' jid='cc@header1.org'/> <address type='bcc' jid='bcc@header1.org'/> <address type='to' jid='to@header2.org'/> <address type='cc' jid='cc@header2.org'/> <address type='bcc' jid='bcc@header2.org'/> <address type='to' jid='to@noheader.org'/> <address type='cc' jid='cc@noheader.org'/> <address type='bcc' jid='bcc@noheader.org'/> </addresses> <body>Hello, World!</body> </message>
<message to='to@header1.org' from='a@header1.org/work'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='to@header1.org' delivered='true'/> <address type='cc' jid='cc@header1.org' delivered='true'/> <address type='to' jid='to@header2.org' delivered='true'/> <address type='cc' jid='cc@header2.org' delivered='true'/> <address type='to' jid='to@noheader.org' delivered='true'/> <address type='cc' jid='cc@noheader.org' delivered='true'/> </addresses> <body>Hello, World!</body> </message> <message to='cc@header1.org' from='a@header1.org/work'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='to@header1.org' delivered='true'/> <address type='cc' jid='cc@header1.org' delivered='true'/> <address type='to' jid='to@header2.org' delivered='true'/> <address type='cc' jid='cc@header2.org' delivered='true'/> <address type='to' jid='to@noheader.org' delivered='true'/> <address type='cc' jid='cc@noheader.org' delivered='true'/> </addresses> <body>Hello, World!</body> </message> <message to='bcc@header1.org' from='a@header1.org/work'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='to@header1.org' delivered='true'/> <address type='cc' jid='cc@header1.org' delivered='true'/> <address type='to' jid='to@header2.org' delivered='true'/> <address type='cc' jid='cc@header2.org' delivered='true'/> <address type='to' jid='to@noheader.org' delivered='true'/> <address type='cc' jid='cc@noheader.org' delivered='true'/> </addresses> <body>Hello, World!</body> </message>
<iq type='get' to='header2.org' from='header1.org' id='id_2'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
<iq type='result' from='header2.org' to='header1.org' id='id_2'> <query xmlns='http://jabber.org/protocol/disco#info'> ... no address feature ... </query> </iq>
<iq type='get' to='header2.org' from='header1.org' id='id_3'> <query xmlns='http://jabber.org/protocol/disco#items'/> </iq>
<iq type='result' from='header2.org' to='header1.org' id='id_3'> <query xmlns='http://jabber.org/protocol/disco#items'> <item jid='multicast.header2.org' name='Multicast Service'/> </query> </iq>
<iq type='get' to='multicast.header2.org' from='header1.org' id='id_4'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
<iq type='result' from='multicast.header2.org' to='header1.org/work' id='id_4'> <query xmlns='http://jabber.org/protocol/disco#info'> <feature var='http://jabber.org/protocol/address'/> </query> </iq>
<message to='multicast.header2.org' from='a@header1.org/work'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='to@header1.org' delivered='true'/> <address type='cc' jid='cc@header1.org' delivered='true'/> <address type='to' jid='to@header2.org'/> <address type='cc' jid='cc@header2.org'/> <address type='bcc' jid='bcc@header2.org'/> <address type='to' jid='to@noheader.org' delivered='true'/> <address type='cc' jid='cc@noheader.org' delivered='true'/> </addresses> <body>Hello, World!</body> </message>
<message to='to@header2.org' from='a@header1.org/work'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='to@header1.org' delivered='true'/> <address type='cc' jid='cc@header1.org' delivered='true'/> <address type='to' jid='to@header2.org' delivered='true'/> <address type='cc' jid='cc@header2.org' delivered='true'/> <address type='to' jid='to@noheader.org' delivered='true'/> <address type='cc' jid='cc@noheader.org' delivered='true'/> </addresses> <body>Hello, World!</body> </message> <message to='cc@header2.org' from='a@header1.org/work'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='to@header1.org' delivered='true'/> <address type='cc' jid='cc@header1.org' delivered='true'/> <address type='to' jid='to@header2.org' delivered='true'/> <address type='cc' jid='cc@header2.org' delivered='true'/> <address type='to' jid='to@noheader.org' delivered='true'/> <address type='cc' jid='cc@noheader.org' delivered='true'/> </addresses> <body>Hello, World!</body> </message> <message to='bcc@header2.org' from='a@header1.org/work'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='to@header1.org' delivered='true'/> <address type='cc' jid='cc@header1.org' delivered='true'/> <address type='to' jid='to@header2.org' delivered='true'/> <address type='cc' jid='cc@header2.org' delivered='true'/> <address type='to' jid='to@noheader.org' delivered='true'/> <address type='cc' jid='cc@noheader.org' delivered='true'/> </addresses> <body>Hello, World!</body> </message>
<iq type='get' to='noheader.org' from='header1.org' id='id_5'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
<iq type='result' from='noheader.org' to='header1.org' id='id_5'> <query xmlns='http://jabber.org/protocol/disco#info'> ... no address feature ... </query> </iq>
<message to='to@noheader.org' from='a@header1.org/work'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='to@header1.org' delivered='true'/> <address type='cc' jid='cc@header1.org' delivered='true'/> <address type='to' jid='to@header2.org' delivered='true'/> <address type='cc' jid='cc@header2.org' delivered='true'/> <address type='to' jid='to@noheader.org' delivered='true'/> <address type='cc' jid='cc@noheader.org' delivered='true'/> </addresses> <body>Hello, World!</body> </message> <message to='cc@noheader.org' from='a@header1.org/work'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='to@header1.org' delivered='true'/> <address type='cc' jid='cc@header1.org' delivered='true'/> <address type='to' jid='to@header2.org' delivered='true'/> <address type='cc' jid='cc@header2.org' delivered='true'/> <address type='to' jid='to@noheader.org' delivered='true'/> <address type='cc' jid='cc@noheader.org' delivered='true'/> </addresses> <body>Hello, World!</body> </message> <message to='bcc@noheader.org' from='a@header1.org/work'> <addresses xmlns='http://jabber.org/protocol/address'> <address type='to' jid='to@header1.org' delivered='true'/> <address type='cc' jid='cc@header1.org' delivered='true'/> <address type='to' jid='to@header2.org' delivered='true'/> <address type='cc' jid='cc@header2.org' delivered='true'/> <address type='to' jid='to@noheader.org' delivered='true'/> <address type='cc' jid='cc@noheader.org' delivered='true'/> </addresses> <body>Hello, World!</body> </message>
When replying to a message stanza that contains an extended address, the following rules apply:
The following error conditions are to be used by implementations (for further information regarding error syntax, see Error Condition Mappings (XEP-0086) [6]):
XMPP Condition | Purpose |
---|---|
<forbidden/> | The sending user does not have permission to use this multicast service. |
<jid-malformed/> | A URI attribute was invalid or not understood (note that support for the 'uri' attribute is optional). |
<not-acceptable/> | Too many receiver fields were specified. Servers SHOULD have a configurable upper limit for the number of addresses. The limit SHOULD be more than 20 and less than 100. |
A recipient SHOULD trust a stanza's extended addressing headers only as much as it trusts the sender of the stanza.
Furthermore, there exists the potential for abuse related to the 'replyto' and 'replyroom' features (e.g., an entity could send messages with 'replyroom' set to the address of a room that hosts salacious content or with 'replyto' set to the address of a spambot that harvests Jabber addresses). Therefore if a human user's receiving application receives a message with extended stanza addressing that specifies a 'replyto' or 'replyroom' address other than that of the sender, it SHOULD inform the user of that fact. (Naturally, the receiving application MAY also limit the entities to which the recipient can reply using privacy lists as specified in XMPP IM [7].)
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [8].
The XMPP Registrar [9] shall include 'http://jabber.org/protocol/address' in its registry of protocol namespaces.
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://jabber.org/protocol/address' xmlns='http://jabber.org/protocol/address' elementFormDefault='qualified'> <xs:annotation> <xs:documentation> The protocol documented by this schema is defined in XEP-0033: http://www.xmpp.org/extensions/xep-0033.html </xs:documentation> </xs:annotation> <xs:element name='addresses'> <xs:complexType> <xs:sequence> <xs:element ref='address' minOccurs='1' maxOccurs='unbounded'/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name='address'> <xs:complexType> <xs:simpleContent> <xs:extension base='empty'> <xs:attribute name='delivered' use='optional' fixed='true'/> <xs:attribute name='desc' use='optional' type='xs:string'/> <xs:attribute name='jid' use='optional' type='xs:string'/> <xs:attribute name='node' use='optional' type='xs:string'/> <xs:attribute name='type' use='required'> <xs:simpleType> <xs:restriction base='xs:NCName'> <xs:enumeration value='bcc'/> <xs:enumeration value='cc'/> <xs:enumeration value='noreply'/> <xs:enumeration value='replyroom'/> <xs:enumeration value='replyto'/> <xs:enumeration value='to'/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name='uri' use='optional' type='xs:string'/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:simpleType name='empty'> <xs:restriction base='xs:string'> <xs:enumeration value=''/> </xs:restriction> </xs:simpleType> </xs:schema>
Sections of this document were inspired by RFC 822.
Series: XEP
Number: 0033
Publisher: XMPP Standards Foundation
Status:
Draft
Type:
Standards Track
Version: 1.1
Last Updated: 2004-09-15
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0030
Supersedes: None
Superseded By: None
Short Name: address
Schema: <http://www.xmpp.org/schemas/address.xsd>
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
jhildebr@cisco.com
JabberID:
hildjj@jabber.org
Email:
peter@andyet.net
JabberID:
stpeter@stpeter.im
URI:
https://stpeter.im/
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. RFC 822: Standard for the Format of ARPA Internet Text Messages <http://tools.ietf.org/html/rfc0822>.
2. jabber:x:envelope - Message Envelope Information Extension
3. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
4. RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc6120>.
5. XEP-0045: Multi-User Chat <http://xmpp.org/extensions/xep-0045.html>.
6. XEP-0086: Error Condition Mappings <http://xmpp.org/extensions/xep-0086.html>.
7. RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc6121>.
8. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
9. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
END