-
Notifications
You must be signed in to change notification settings - Fork 0
/
xep-0033.xml
712 lines (624 loc) · 37.1 KB
/
xep-0033.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
<?xml version='1.0'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Extended Stanza Addressing</title>
<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.</abstract>
&LEGALNOTICE;
<number>0033</number>
<status>Draft</status>
<type>Standards Track</type>
<sig>Standards</sig>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0030</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>address</shortname>
<schemaloc>
<url>http://www.xmpp.org/schemas/address.xsd</url>
</schemaloc>
&hildjj;
&stpeter;
<revision>
<version>1.2.1</version>
<date>2017-01-11</date>
<initials>cs (XEP Editor: ssw)</initials>
<remark>Clarify Reply Handling, add 'ofrom' type and fix examples</remark>
</revision>
<revision>
<version>1.2</version>
<date>2015-09-22</date>
<initials>mre/psa (XEP Editor: ssw)</initials>
<remark>Clarification: Multicast service MUST track directed presence broadcast to later ensure broadcast of subsequent unvailable presence to the same receiving parties.</remark>
</revision>
<revision>
<version>1.1</version>
<date>2004-09-15</date>
<initials>psa</initials>
<remark>Per list discussion, removed prohibition on multiple replyto and replyroom addresses, since this is allowed by RFC 822.</remark>
</revision>
<revision>
<version>1.0</version>
<date>2004-05-10</date>
<initials>psa</initials>
<remark>Per a vote of the Jabber Council, advanced status to Draft; also added Security Considerations in consultation with author.</remark>
</revision>
<revision>
<version>0.10</version>
<date>2004-03-18</date>
<initials>psa</initials>
<remark>Disallowed <addresses/> as direct child
of &IQ;.</remark>
</revision>
<revision>
<version>0.9</version>
<date>2004-02-27</date>
<initials>jjh</initials>
<remark>Added language note on desc attribute. Ensured
that if uri attribute is used, node MUST NOT be.</remark>
</revision>
<revision>
<version>0.8</version>
<date>2004-02-11</date>
<initials>jjh</initials>
<remark>Editorial cleanups, rearrangement. Allowed IQ's
in certain cases. Clarified node rules. Changed
delivered='yes' to delivered='true'. Noreply shouldn't
imply no other addresses. Clarified when authorization
checks take place. Remove own address on reply. Bad URI
error added.</remark>
</revision>
<revision>
<version>0.7</version>
<date>2004-02-04</date>
<initials>jjh</initials>
<remark>Clarified that a node attribute refers to a disco
node.</remark>
</revision>
<revision>
<version>0.6</version>
<date>2004-02-04</date>
<initials>jjh</initials>
<remark>Changed namespace to
'http://www.jabber.org/protocol/address', and removed one
level of nesting, since addresses are the only block left.
Made it clearer that the session manager can implement
multicast directly. Removed infobits (needs to be a
separate specification). Reworked the examples to be more correct.
Added reply handling rules. Added schema.</remark>
</revision>
<revision>
<version>0.5</version>
<date>2003-12-17</date>
<initials>jjh</initials>
<remark>Replaced info with infobits, added noreply address
type.</remark>
</revision>
<revision>
<version>0.4</version>
<date>2003-12-15</date>
<initials>jjh</initials>
<remark>Removed trace; if you want that, use a different
namespace. Required disco use, and removed agents/browse.
Added URI addressing.</remark>
</revision>
<revision>
<version>0.3</version>
<date>2002-07-29</date>
<initials>jjh</initials>
<remark>Made addresses extensible, added replyroom</remark>
</revision>
<revision>
<version>0.2</version>
<date>2002-05-06</date>
<initials>jjh</initials>
<remark>Re-worked to simpler/more structured XML.</remark>
</revision>
<revision>
<version>0.1</version>
<date>2002-04-19</date>
<initials>jjh</initials>
<remark>Initial version.</remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>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.</p>
<p>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 &rfc0822;. As a side-effect, it also provides all of the functionality specified by the old 'jabber:x:envelope' <note><link url='http://archive.jabber.org/docs/proto-draft/envelope.html'>jabber:x:envelope</link> - Message Envelope Information Extension</note> proposal, which this XEP can supersede.</p>
</section1>
<section1 topic='Discovering Server Support' anchor='disco'>
<p>Support for Extended Stanza Addressing in a given server instance SHOULD be determined using &xep0030;. A conforming server MUST respond to disco#info requests.</p>
<section2 topic='Disco to determine support' anchor='disco-support'>
<p>To determine if a server or service supports Extended Stanza Addressing, the requesting entity SHOULD send a disco#info request to it.</p>
<example caption='Disco request for address header support'><![CDATA[
<iq type='get'
from='[email protected]/orchard'
to='multicast.montague.net'
id='info1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>]]>
</example>
<p>If the server supports Extended Stanza Addressing, it MUST include a "http://jabber.org/protocol/address" feature in the response.</p>
<example caption='Disco response for server supporting address headers'><![CDATA[
<iq type='result'
from='multicast.montague.net'
to='[email protected]/orchard'
id='info1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='http://jabber.org/protocol/address'/>
...
</query>
</iq>]]>
</example>
</section2>
<section2 topic='Multicast service' anchor='disco-multicast'>
<p>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:</p>
<ol>
<li>Send a disco#info request to the IM server; if its reply includes the 'http://jabber.org/protocol/address' feature, then it is a multicast-capable service.</li>
<li>If the IM server is not a multicast-capable service, send a disco#items request to the IM server; the IM server will then return a list of associated services.</li>
<li>Send a disco#info request to each of the services associated with the IM server; if one of the replies includes the 'http://jabber.org/protocol/address' feature, then that service is a multicast-capable service.</li>
</ol>
<p>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 <link url='#errors'>Error Conditions</link> section below). In the relaying case, the server SHOULD NOT deliver to <em>any</em> of the addresses (even the local ones) if the sender is disallowed.</p>
</section2>
<section2 topic='Caching' anchor='disco-caching'>
<p>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.</p>
</section2>
</section1>
<section1 topic='Outer Stanza' anchor='outer'>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>Address headers MAY be included in message or presence
stanzas. They MUST NOT be included as the direct child of an
IQ stanza.</p>
</section1>
<section1 topic='Addresses' anchor='addresses'>
<p>Address values are packaged together into an
<addresses/> element.</p>
<example caption='Message with an extended address'><![CDATA[<message to='multicast.jabber.org'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]/Work' desc='Joe Hildebrand'/>
<address type='cc' jid='[email protected]/Home' desc='Jeremie Miller'/>
</addresses>
<body>Hello, world!</body>
</message>]]></example>
<example caption='Presence with an extended address'><![CDATA[<presence from='[email protected]' to='multicast.jabber.org' type='unavailable'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='bcc' jid='[email protected]'/>
<address type='bcc' jid='[email protected]'/>
</addresses>
</presence>]]></example>
<p>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.</p>
<p>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'.</p>
<section2 topic="'jid' attribute" anchor='addr-jid'>
<p>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.</p>
</section2>
<section2 topic="'uri' attribute" anchor='addr-uri'>
<p>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, &amp; &lt; &gt; &apos; &quot;. 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.</p>
</section2>
<section2 topic="'node' attribute" anchor='addr-node'>
<p>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.</p>
</section2>
<section2 topic="'desc' attribute" anchor='addr-desc'>
<p>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 &xmppcore;. Support for the 'desc' attribute is RECOMMENDED.</p>
</section2>
<section2 topic="'delivered' attribute" anchor='addr-delivered'>
<p>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 <link url='#multicast'>Multicast Usage</link> section below for more details. Support for the 'delivered' attribute is REQUIRED.</p>
</section2>
<section2 topic="'type' attribute" anchor='addr-type'>
<p>The 'type' attribute is used to specify the semantics of a particular address. Support for the 'type' attribute is REQUIRED.</p>
<section3 topic="Address type='to'" anchor='addr-type-to'>
<p>These addressees are the primary recipients of the stanza.</p>
</section3>
<section3 topic="Address type='cc'" anchor='addr-type-cc'>
<p>These addressees are the secondary recipients of the stanza.</p>
</section3>
<section3 topic="Address type='bcc'" anchor='addr-type-bcc'>
<p>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.</p>
</section3>
<section3 topic="Address type='replyto'" anchor='addr-type-replyto'>
<p>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.</p>
</section3>
<section3 topic="Address type='replyroom'" anchor='addr-type-replyroom'>
<p>This is the JID of a &xep0045; 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.</p>
</section3>
<section3 topic="Address type='noreply'" anchor='addr-type-noreply'>
<p>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.</p>
</section3>
<section3 topic="Address type='ofrom'" anchor='addr-type-ofrom'>
<p>This address type is used by &xep0045; services. If a room is non-anonymous, the service MAY include an Extended Stanza Addressing (XEP-0033) [16] element that notes the original full JID of the sender by means of the "ofrom" address type</p>
</section3>
</section2>
<section2 topic="Extensibility" anchor='extensibility'>
<p>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.</p>
<example caption='Possible future extension'><![CDATA[<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='[email protected]'/>
</addresses>
</message>]]></example>
</section2>
</section1>
<section1 topic='Business Rules' anchor='rules'>
<section2 topic='Directed Presence' anchor='presence'>
<p>This specification can be used to, in effect, send directed
presence (see Section 4.6 of &rfc6121;). In order to ensure
that entities that have received directed available presence
through the service also are informed when the originating
entity sends unavailable presence, the multicast service MUST
do the following:</p>
<ol>
<li>Keep track of the entities to which it sends available
presence (i.e., presence stanzas with no 'type' attribute)
along with the originating entity of that presence.</li>
<li>Upon receiving a presence stanza of type "unavailable"
from an originating entity, broadcast that unavailable
presence to all entities to which it has send available
presence.</li>
</ol>
<p>In this way, the multicast service ensures that all
entities which have received available presence through the
service also receive the associated unavailable presence.</p>
</section2>
</section1>
<section1 topic='Multicast Usage' anchor='multicast'>
<p>The following usage scenario shows how messages flow through both address-enabled and non-address-enabled portions of the Jabber network.</p>
<p>Note: the logic associated with <em>how</em> 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 <em>will not</em>) use this algorithm.</p>
<ol>
<li>User desires to send a stanza to more than one
recipient.</li>
<li>Client determines the JID of a multicast service,
using Service Discovery.</li>
<li>If no multicast service is found, the client MAY
choose to deliver each stanza individually, or it MAY
query each of the servers associated with desired
recipients, and batch stanzas to those servers
itself.</li>
<li>If a multicast service is found, the client constructs
a stanza with an address block, and sends it to the
multicast service. (Note: For the following rules, any
address that was marked on the incoming address header
with delivered='true' is never re-delivered.)</li>
<li>The server checks to see if it can deliver to all of
the specified addresses. If not, the stanza is returned
with a "Forbidden" error, and processing stops.</li>
<li>The server adds a delivered='true' attribute to all
addresses.</li>
<li>The server removes all type='bcc' attributes.</li>
<li>The server delivers the stanza to all of the 'to',
'cc', and 'bcc' addresses from the original address header that
are being handled locally. The server replaces the
'to' attribute on the outer stanza with the JID of each
addressee. Each 'bcc' recipient MUST receive only the
<address type='bcc'/> associated with that
addressee.</li>
<li>For each non-local server (the 'target server') that
has addresses specified in 'to', 'cc', or 'bcc' addresses
in the original address header, the local server determines
whether the target server supports multicast, using Service
Discovery.</li>
<li>If the target server does not support address headers, the
local server sends a copy of the stanza to each address,
with the 'to' attribute on the outer stanza set to the JID
of the given addressee.</li>
<li>If the target server does support address headers, the server
removes the delivered='true' attributes on each of the
addresses bound for that server, and replaces the 'to'
attribute on the outer stanza with the adress of the
multicast service for the target server. The 'bcc'
addresses for the target server from the original address header
are added back to the address header. A single stanza is sent to
the target server.</li>
</ol>
</section1>
<section1 topic='Example Flow' anchor='examples'>
<p>Assume for these examples that header1.org and header2.org
support address headers, and noheader.org does not.</p>
<example caption='Client checks local server for address header support'><![CDATA[<iq type='get' to='header1.org' from='[email protected]/work' id='id_1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>]]></example>
<example caption='Client receives positive results from server'><![CDATA[<iq type='result' from='header1.org' to='[email protected]/work' id='id_1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<feature var='http://jabber.org/protocol/address'/>
</query>
</iq>]]></example>
<example caption='Client sends message to local server with address header'><![CDATA[<message to='header1.org' from='[email protected]/work'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]'/>
<address type='cc' jid='[email protected]'/>
<address type='bcc' jid='[email protected]'/>
<address type='to' jid='[email protected]'/>
<address type='cc' jid='[email protected]'/>
<address type='bcc' jid='[email protected]'/>
<address type='to' jid='[email protected]'/>
<address type='cc' jid='[email protected]'/>
<address type='bcc' jid='[email protected]'/>
</addresses>
<body>Hello, World!</body>
</message>]]></example>
<example caption='Server delivers to local addresses'><![CDATA[<message to='[email protected]' from='[email protected]/work'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
</addresses>
<body>Hello, World!</body>
</message>
<message to='[email protected]' from='[email protected]/work'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
</addresses>
<body>Hello, World!</body>
</message>
<message to='[email protected]' from='[email protected]/work'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='bcc' jid='[email protected]'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
</addresses>
<body>Hello, World!</body>
</message>]]></example>
<example caption='Local server checks target server for address support'><![CDATA[<iq type='get' to='header2.org' from='header1.org' id='id_2'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<example caption='Local server receives initial negative results from target server'><![CDATA[<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>]]></example>
<example caption='Local server checks target server for another component having address support'><![CDATA[<iq type='get' to='header2.org' from='header1.org' id='id_3'>
<query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>
]]></example>
<example caption='Local server receives associated services from target server'><![CDATA[<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>]]></example>
<example caption='Local server checks associated services for address support'><![CDATA[<iq type='get' to='multicast.header2.org' from='header1.org' id='id_4'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<example caption='Local server receives positive results from target server'><![CDATA[<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>]]></example>
<example caption='Local server delivers to target server supporting address headers'><![CDATA[<message to='multicast.header2.org' from='[email protected]/work'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]'/>
<address type='cc' jid='[email protected]'/>
<address type='bcc' jid='[email protected]'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
</addresses>
<body>Hello, World!</body>
</message>]]></example>
<example caption='Target server delivers to its recipients'><![CDATA[<message to='[email protected]' from='[email protected]/work'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
</addresses>
<body>Hello, World!</body>
</message>
<message to='[email protected]' from='[email protected]/work'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
</addresses>
<body>Hello, World!</body>
</message>
<message to='[email protected]' from='[email protected]/work'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='bcc' jid='[email protected]'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
</addresses>
<body>Hello, World!</body>
</message>]]></example>
<example caption='Local server checks target server for address header support'><![CDATA[<iq type='get' to='noheader.org' from='header1.org' id='id_5'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>]]></example>
<example caption='Local server receives negative results from target server (assume no associated services found)'><![CDATA[<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>]]></example>
<example caption='Server delivers to each address on the target server not supporting address headers'><![CDATA[<message to='[email protected]' from='[email protected]/work'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
</addresses>
<body>Hello, World!</body>
</message>
<message to='[email protected]' from='[email protected]/work'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
</addresses>
<body>Hello, World!</body>
</message>
<message to='[email protected]' from='[email protected]/work'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='to' jid='[email protected]' delivered='true'/>
<address type='cc' jid='[email protected]' delivered='true'/>
<address type='bcc' jid='[email protected]'/>
</addresses>
<body>Hello, World!</body>
</message>]]></example>
</section1>
<section1 topic='Reply Handling' anchor='replies'>
<p>When replying to a message stanza that contains an extended
address, the following rules apply:</p>
<ol>
<li>If a noreply address is
specified, a reply SHOULD NOT be generated.</li>
<li>If one or more replyroom addresses are specified, the client SHOULD
join the specified chat rooms instead of replying directly
to the specified users. No further extended address
processing is required.</li>
<li>If one or more replyto address are specified, the reply SHOULD go
to the specified addresses. No further extended address
processing is required. Any <thread/> element from
the initial message MUST be copied into the replies.</li>
<li>Otherwise, an extended-address aware client MUST copy
the address header from the original message into the reply,
removing any delivered attributes. If the original sender
is not in the copied list, the original sender MUST be
added as a 'to' address. The recipient's address SHOULD
be removed from the list. The client then proceeds with
the rules from the <link url='#multicast'>Multicast Usage</link>
section above for delivery of the message.</li>
</ol>
</section1>
<section1 topic='Error Conditions' anchor='errors'>
<p>The following error conditions are to be used by implementations (for further information regarding error syntax, see &xep0086;):</p>
<table caption='Error Conditions'>
<tr>
<th>XMPP Condition</th>
<th>Purpose</th>
</tr>
<tr>
<td><forbidden/></td>
<td>The sending user does not have permission to use this multicast service.</td>
</tr>
<tr>
<td><jid-malformed/></td>
<td>A URI attribute was invalid or not understood (note that support for the 'uri' attribute is optional).</td>
</tr>
<tr>
<td><not-acceptable/></td>
<td>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.</td>
</tr>
</table>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>A recipient SHOULD trust a stanza's extended addressing headers only as much as it trusts the sender of the stanza.</p>
<p>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 &xmppim;.)</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<p>The ®ISTRAR; shall include 'http://jabber.org/protocol/address' in its registry of protocol namespaces.</p>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?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:enumeration value='ofrom'/>
</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>
]]></code>
</section1>
<section1 topic='Acknowledgements' anchor='ack'>
<p>Sections of this document were inspired by RFC 822.</p>
</section1>
</xep>