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 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781
|
<pre>Network Working Group P. Saint-Andre
Request for Comments: 5437 Cisco
Category: Standards Track A. Melnikov
Isode Limited
January 2009
<span class="h1">Sieve Notification Mechanism:</span>
<span class="h1">Extensible Messaging and Presence Protocol (XMPP)</span>
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (c) 2009 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/</a>
<a href="http://trustee.ietf.org/license-info">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.
Abstract
This document describes a profile of the Sieve extension for
notifications, to allow notifications to be sent over the Extensible
Messaging and Presence Protocol (XMPP), also known as Jabber.
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
Table of Contents
<a href="#section-1">1</a>. Introduction ....................................................<a href="#page-3">3</a>
<a href="#section-1.1">1.1</a>. Overview ...................................................<a href="#page-3">3</a>
<a href="#section-1.2">1.2</a>. Terminology ................................................<a href="#page-3">3</a>
<a href="#section-2">2</a>. Definition ......................................................<a href="#page-3">3</a>
<a href="#section-2.1">2.1</a>. Notify Parameter "method" ..................................<a href="#page-3">3</a>
<a href="#section-2.2">2.2</a>. Test notify_method_capability ..............................<a href="#page-3">3</a>
<a href="#section-2.3">2.3</a>. Notify Tag ":from" .........................................<a href="#page-4">4</a>
<a href="#section-2.4">2.4</a>. Notify Tag ":importance" ...................................<a href="#page-4">4</a>
<a href="#section-2.5">2.5</a>. Notify Tag ":message" ......................................<a href="#page-4">4</a>
<a href="#section-2.6">2.6</a>. Notify Tag ":options" ......................................<a href="#page-4">4</a>
<a href="#section-2.7">2.7</a>. XMPP Syntax ................................................<a href="#page-4">4</a>
<a href="#section-3">3</a>. Examples ........................................................<a href="#page-6">6</a>
<a href="#section-3.1">3.1</a>. Basic Action ...............................................<a href="#page-6">6</a>
<a href="#section-3.2">3.2</a>. Action with "body" .........................................<a href="#page-7">7</a>
3.3. Action with "body", ":importance", ":message", and
"subject" ..................................................<a href="#page-7">7</a>
3.4. Action with ":from", ":message", ":importance",
"body", and "subject" ......................................<a href="#page-8">8</a>
<a href="#section-4">4</a>. Requirements Conformance ........................................<a href="#page-9">9</a>
<a href="#section-5">5</a>. Internationalization Considerations ............................<a href="#page-10">10</a>
<a href="#section-6">6</a>. Security Considerations ........................................<a href="#page-11">11</a>
<a href="#section-7">7</a>. IANA Considerations ............................................<a href="#page-12">12</a>
<a href="#section-8">8</a>. References .....................................................<a href="#page-12">12</a>
<a href="#section-8.1">8.1</a>. Normative References ......................................<a href="#page-12">12</a>
<a href="#section-8.2">8.2</a>. Informative References ....................................<a href="#page-13">13</a>
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Overview</span>
The [<a href="#ref-NOTIFY" title=""Sieve Email Filtering: Extension for Notifications"">NOTIFY</a>] extension to the [<a href="#ref-SIEVE" title=""Sieve: An Email Filtering Language"">SIEVE</a>] mail filtering language is a
framework for providing notifications by employing URIs to specify
the notification mechanism. This document defines how xmpp URIs (see
[<a href="#ref-XMPP-URI" title=""Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP)"">XMPP-URI</a>]) are used to generate notifications via the Extensible
Messaging and Presence Protocol [<a href="#ref-XMPP" title=""Extensible Messaging and Presence Protocol (XMPP): Core"">XMPP</a>], which is widely implemented
in Jabber instant messaging technologies.
<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>. Terminology</span>
This document inherits terminology from [<a href="#ref-NOTIFY" title=""Sieve Email Filtering: Extension for Notifications"">NOTIFY</a>], [<a href="#ref-SIEVE" title=""Sieve: An Email Filtering Language"">SIEVE</a>], and
[<a href="#ref-XMPP" title=""Extensible Messaging and Presence Protocol (XMPP): Core"">XMPP</a>]. In particular, the terms "parameter" and "tag" are used as
described in [<a href="#ref-NOTIFY" title=""Sieve Email Filtering: Extension for Notifications"">NOTIFY</a>] to refer to aspects of Sieve scripts, and the
term "key" is used as described in [<a href="#ref-XMPP-URI" title=""Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP)"">XMPP-URI</a>] to refer to aspects of
an XMPP URI.
The capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
interpreted as described in [<a href="#ref-TERMS" title=""Key words for use in RFCs to Indicate Requirement Levels"">TERMS</a>].
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Definition</span>
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Notify Parameter "method"</span>
The "method" parameter MUST be a URI that conforms to the xmpp URI
scheme (as specified in [<a href="#ref-XMPP-URI" title=""Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP)"">XMPP-URI</a>]) and that identifies an XMPP
account associated with the email inbox. The URI MAY include the
resource identifier of an XMPP address and/or the query component
portion of an XMPP URI, but SHOULD NOT include an authority component
or fragment identifier component. The processing application MUST
extract an XMPP address from the URI in accordance with the
processing rules specified in [<a href="#ref-XMPP-URI" title=""Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP)"">XMPP-URI</a>]. The resulting XMPP address
MUST be encapsulated in XMPP syntax as the value of the XMPP 'to'
attribute.
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. Test notify_method_capability</span>
In response to a notify_method_capability test for the "online"
notification-capability, an implementation SHOULD return a value of
"yes" if it has knowledge of an active presence session (see
[<a href="#ref-XMPP-IM" title=""Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence"">XMPP-IM</a>]) for the specified XMPP notification-uri; otherwise, it
SHOULD return a value of "maybe" (since typical XMPP systems may not
allow a Sieve engine to gain knowledge about the presence of XMPP
entities).
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>. Notify Tag ":from"</span>
If included, the ":from" tag MUST be an electronic address that
conforms to the "Mailbox" rule defined in [<a href="./rfc5321" title=""Simple Mail Transfer Protocol"">RFC5321</a>]. The value of
the ":from" tag MAY be included in the human-readable XML character
data of the XMPP notification; alternatively or in addition, it MAY
be transformed into formal XMPP syntax, in which case it MUST be
encapsulated as the value of an XMPP SHIM (Stanza Headers and
Internet Metadata) [<a href="#ref-SHIM" title=""Stanza Headers and Internet Metadata"">SHIM</a>] header named "Resent-From".
<span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a>. Notify Tag ":importance"</span>
The ":importance" tag has no special meaning for this notification
mechanism, and this specification puts no restriction on its use.
The value of the ":importance" tag MAY be transformed into XMPP
syntax (in addition to or instead of including appropriate text in
the XML character data of the XMPP <body/> element); if so, it SHOULD
be encapsulated as the value of an XMPP SHIM (Stanza Headers and
Internet Metadata) [<a href="#ref-SHIM" title=""Stanza Headers and Internet Metadata"">SHIM</a>] header named "Urgency", where the XML
character of that header is "high" if the value of the ":importance"
tag is "1", "medium" if the value of the ":importance" tag is "2",
and "low" if the value of the ":importance" tag is "3".
<span class="h3"><a class="selflink" id="section-2.5" href="#section-2.5">2.5</a>. Notify Tag ":message"</span>
If the ":message" tag is included, that string MUST be transformed
into the XML character data of an XMPP <body/> element (where the
string is generated according to the guidelines specified in <a href="#section-3.6">Section</a>
<a href="#section-3.6">3.6</a> of [<a href="#ref-NOTIFY" title=""Sieve Email Filtering: Extension for Notifications"">NOTIFY</a>]).
<span class="h3"><a class="selflink" id="section-2.6" href="#section-2.6">2.6</a>. Notify Tag ":options"</span>
The ":options" tag has no special meaning for this notification
mechanism. Any handling of this tag is the responsibility of an
implementation.
<span class="h3"><a class="selflink" id="section-2.7" href="#section-2.7">2.7</a>. XMPP Syntax</span>
The xmpp mechanism results in the sending of an XMPP message to
notify a recipient about an email message. The general XMPP syntax
is as follows:
o The notification MUST be an XMPP <message/> stanza.
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
o The value of the XMPP 'from' attribute SHOULD be the XMPP address
of the notification service associated with the Sieve engine or
the XMPP address of the entity to be notified. The value of the
XMPP 'from' attribute MUST NOT be generated from the Sieve ":from"
tag.
o The value of the XMPP 'to' attribute MUST be the XMPP address
specified in the XMPP URI contained in the "method" notify
parameter.
o The value of the XMPP 'type' attribute MUST be 'headline' or
'normal'.
o The XMPP <message/> stanza MUST include a <body/> child element.
If the ":message" tag is included in the Sieve script, that string
MUST be used as the XML character data of the <body/> element. If
not and if the XMPP URI contained in the "method" notify parameter
specified a "body" key in the query component, that value SHOULD
be used. Otherwise, the XML character data SHOULD be some
configurable text indicating that the message is a Sieve
notification.
o The XMPP <message/> stanza MAY include a <subject/> child element.
If the XMPP URI contained in the "method" notify parameter
specified a "subject" key in the query component, that value
SHOULD be used as the XML character data of the <subject/>
element. Otherwise, the XML character data SHOULD be some
configurable text indicating that the message is a Sieve
notification.
o The XMPP <message/> stanza SHOULD include a URI, for the recipient
to use as a hint in locating the message, encapsulated as the XML
character data of a <url/> child element of an <x/> element
qualified by the 'jabber:x:oob' namespace, as specified in [<a href="#ref-OOB" title=""Out of Band Data"">OOB</a>].
If included, the URI SHOULD be an Internet Message Access Protocol
[<a href="#ref-IMAP" title=""INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1"">IMAP</a>] URL that specifies the location of the message, as defined
in [<a href="#ref-IMAP-URL" title=""IMAP URL Scheme"">IMAP-URL</a>], but MAY be another URI type that can specify or
hint at the location of an email message, such as a URI for an
HTTP resource [<a href="#ref-HTTP" title=""Hypertext Transfer Protocol -- HTTP/1.1"">HTTP</a>] or a Post Office Protocol Version 3 (POP3)
mailbox [<a href="#ref-POP-URL" title=""POP URL Scheme"">POP-URL</a>] at which the message can be accessed. It is not
expected that an XMPP user agent shall directly handle such a URI,
but instead that it shall invoke an appropriate helper application
to handle the URI.
o The XMPP <message/> stanza MAY include an XMPP SHIM (Stanza
Headers and Internet Metadata) [<a href="#ref-SHIM" title=""Stanza Headers and Internet Metadata"">SHIM</a>] header named "Resent-From".
If the Sieve script included a ":from" tag, the "Resent-From"
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
value MUST be the value of the ":from" tag; otherwise, the
"Resent-From" value SHOULD be the envelope recipient address of
the original email message that triggered the notification.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Examples</span>
In the following examples, the sender of the email has an address of
<mailto:juliet@example.org>, the entity to be notified has an email
address of <mailto:romeo@example.com> and an XMPP address of
romeo@im.example.com (resulting in an XMPP URI of
<xmpp:romeo@im.example.com>), and the notification service associated
with the Sieve engine has an XMPP address of notify.example.com.
Note: In the following examples, line breaks are included in XMPP
URIs solely for the purpose of readability.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Basic Action</span>
The following is a basic Sieve notify action with only a method. The
XML character data of the XMPP <body/> and <subject/> elements are
therefore generated by the Sieve engine based on configuration. In
addition, the Sieve engine includes a URI pointing to the message.
Basic action (Sieve syntax)
notify "xmpp:romeo@im.example.com"
The resulting XMPP <message/> stanza might be as follows:
Basic action (XMPP syntax)
<message from='notify.example.com'
to='romeo@im.example.com'
type='headline'
xml:lang='en'>
<subject>SIEVE</subject>
<body>&lt;juliet@example.com&gt; You got mail.</body>
<x xmlns='jabber:x:oob'>
<url>
imap://romeo@example.com/INBOX;UIDVALIDITY=385759043/;UID=18
</url>
</x>
</message>
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Action with "body"</span>
The following action contains a "body" key in the query component of
the XMPP URI but no ":message" tag in the Sieve script. As a result,
the XML character data of the XMPP <body/> element in the XMPP
notification is taken from the XMPP URI. In addition, the Sieve
engine includes a URI pointing to the message.
Action with "body" (Sieve syntax)
notify "xmpp:romeo@im.example.com?message
;body=Wherefore%20art%20thou%3F"
The resulting XMPP <message/> stanza might be as follows.
Action with "body" (XMPP syntax)
<message from='notify.example.com'
to='romeo@im.example.com'
type='headline'
xml:lang='en'>
<subject>SIEVE</subject>
<body>Wherefore art thou?</body>
<x xmlns='jabber:x:oob'>
<url>
imap://romeo@example.com/INBOX;UIDVALIDITY=385759044/;UID=19
</url>
</x>
</message>
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Action with "body", ":importance", ":message", and "subject"</span>
The following action specifies an ":importance" tag and a ":message"
tag in the Sieve script, as well as a "body" key and a "subject" key
in the query component of the XMPP URI. As a result, the ":message"
tag from the Sieve script overrides the "body" key from the XMPP URI
when generating the XML character data of the XMPP <body/> element.
In addition, the Sieve engine includes a URI pointing to the message.
Action with "body", ":importance", ":message", and "subject" (Sieve
syntax)
notify :importance "1"
:message "Contact Juliet immediately!"
"xmpp:romeo@im.example.com?message
;body=You%27re%20in%20trouble
;subject=ALERT%21"
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
The resulting XMPP <message/> stanza might be as follows.
Action with "body", ":importance", ":message", and "subject" (XMPP
syntax)
<message from='notify.example.com'
to='romeo@im.example.com'
type='headline'
xml:lang='en'>
<subject>ALERT!</subject>
<body>Contact Juliet immediately!</body>
<headers xmlns='http://jabber.org/protocol/shim'>
<header name='Urgency'>high</header>
</headers>
<x xmlns='jabber:x:oob'>
<url>
imap://romeo@example.com/INBOX;UIDVALIDITY=385759045/;UID=20
</url>
</x>
</message>
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. Action with ":from", ":message", ":importance", "body", and</span>
"subject"
The following action specifies a ":from" tag, an ":importance" tag,
and a ":message" tag in the Sieve script, as well as a "body" key and
a "subject" key in the query component of the XMPP URI. As a result,
the ":message" tag from the Sieve script overrides the "body" key
from the XMPP URI when generating the XML character data of the XMPP
<body/> element. In addition, the Sieve engine includes a URI
pointing to the message, as well as an XMPP SHIM (Stanza Headers and
Internet Metadata) [<a href="#ref-SHIM" title=""Stanza Headers and Internet Metadata"">SHIM</a>] header named "Resent-From" (which
encapsulates the value of the ":from" tag).
Action with ":from", ":importance", ":message", "body", and "subject"
(Sieve syntax)
notify :from "romeo.my.romeo@example.com"
:importance "1"
:message "Contact Juliet immediately!"
"xmpp:romeo@im.example.com?message
;body=You%27re%20in%20trouble
;subject=ALERT%21"
The resulting XMPP <message/> stanza might be as follows.
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
Action with ":from", ":importance", ":message", "body", and "subject"
(XMPP syntax)
<message from='notify.example.com'
to='romeo@im.example.com'
type='headline'
xml:lang='en'>
<subject>ALERT!</subject>
<body>Contact Juliet immediately!</body>
<headers xmlns='http://jabber.org/protocol/shim'>
<header name='Resent-From'>romeo.my.romeo@example.com</header>
<header name='Urgency'>high</header>
</headers>
<x xmlns='jabber:x:oob'>
<url>
imap://romeo@example.com/INBOX;UIDVALIDITY=385759045/;UID=21
</url>
</x>
</message>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Requirements Conformance</span>
Section 3.8 of [<a href="#ref-NOTIFY" title=""Sieve Email Filtering: Extension for Notifications"">NOTIFY</a>] specifies a set of requirements for Sieve
notification methods. The conformance of the xmpp notification
mechanism is provided here.
1. An implementation of the xmpp notification method SHOULD NOT
modify the final notification text (e.g., to limit the length);
however, a given deployment MAY do so (e.g., if recipients pay
per character or byte for XMPP messages). Modification of
characters themselves should not be necessary, since XMPP
character data is encoded in [<a href="#ref-UTF-8" title=""UTF-8, a transformation format of ISO 10646"">UTF-8</a>].
2. An implementation MAY ignore parameters specified in the
":from", ":importance", and ":options" tags.
3. There is no recommended default message for an implementation to
include if the ":message" tag is not specified.
4. A notification sent via the xmpp notification method MAY include
a timestamp in the textual message.
5. The value of the XMPP 'from' attribute MUST be the XMPP address
of the notification service associated with the Sieve engine.
The value of the Sieve ":from" tag MAY be transformed into the
value of an XMPP SHIM (Stanza Headers and Internet Metadata)
[<a href="#ref-SHIM" title=""Stanza Headers and Internet Metadata"">SHIM</a>] header named "Resent-From".
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
6. The value of the XMPP 'to' attribute MUST be the XMPP address
specified in the XMPP URI contained in the "method" parameter.
7. In accordance with [<a href="#ref-XMPP-URI" title=""Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP)"">XMPP-URI</a>], an implementation MUST ignore any
URI action or key it does not understand (i.e., the URI MUST be
processed as if the action or key were not present). It is
RECOMMENDED to support the XMPP "message" query type (see
[<a href="#ref-QUERIES" title=""XMPP URI Scheme Query Components"">QUERIES</a>]) and the associated "body" and "subject" keys, which
SHOULD be mapped to the XMPP <body/> and <subject/> child
elements of the XMPP <message/> stanza, respectively. However,
if included, then the Sieve notify ":message" tag MUST be mapped
to the XMPP <body/> element, overriding the "body" key (if any)
included in the XMPP URI.
8. An implementation MUST NOT include any other extraneous
information not specified in parameters to the notify action.
9. In response to a notify_method_capability test for the "online"
notification-capability, an implementation SHOULD return a value
of "yes" if it has knowledge of an active presence session (see
[<a href="#ref-XMPP-IM" title=""Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence"">XMPP-IM</a>]) for the specified XMPP notification-uri, but only if
the entity that requested the test is authorized to know the
presence of the associated XMPP entity (e.g., via explicit
presence subscription as specified in [<a href="#ref-XMPP-IM" title=""Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence"">XMPP-IM</a>]); otherwise, it
SHOULD return a value of "maybe" (since typical XMPP systems may
not allow a Sieve engine to gain knowledge about the presence of
XMPP entities).
10. An implementation SHOULD NOT attempt to retry delivery of a
notification if it receives an XMPP error of type "auth" or
"cancel", MAY attempt to retry delivery if it receives an XMPP
error of type "wait", and MAY attempt to retry delivery if it
receives an XMPP error of "modify", but only if it makes
appropriate modifications to the notification (see [<a href="#ref-XMPP" title=""Extensible Messaging and Presence Protocol (XMPP): Core"">XMPP</a>]); in
any case, the number of retries SHOULD be limited to a
configurable number no less than 3 and no more than 10. An
implementation MAY throttle notifications if the number of
notifications within a given time period becomes excessive
according to local service policy. Duplicate suppression (if
any) is a matter of implementation and is not specified herein.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Internationalization Considerations</span>
Although an XMPP address may contain nearly any [<a href="#ref-UNICODE" title=""The Unicode Standard, Version 3.2.0"">UNICODE</a>] character,
the value of the "method" parameter MUST be a Uniform Resource
Identifier (see [<a href="#ref-URI" title=""Uniform Resource Identifier (URI): Generic Syntax"">URI</a>]) rather than an Internationalized Resource
Identifier (see [<a href="#ref-IRI" title=""Internationalized Resource Identifiers (IRIs)"">IRI</a>]). The rules specified in [<a href="#ref-XMPP-URI" title=""Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP)"">XMPP-URI</a>] MUST be
followed when generating XMPP URIs.
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
In accordance with <a href="./rfc3920#section-13">Section 13 of RFC 3920</a>, all data sent over XMPP
MUST be encoded in [<a href="#ref-UTF-8" title=""UTF-8, a transformation format of ISO 10646"">UTF-8</a>].
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
Depending on the information included, sending a notification can be
comparable to forwarding mail to the notification recipient. Care
must be taken when forwarding mail automatically, to ensure that
confidential information is not sent into an insecure environment.
In particular, implementations MUST conform to the security
considerations given in [<a href="#ref-NOTIFY" title=""Sieve Email Filtering: Extension for Notifications"">NOTIFY</a>], [<a href="#ref-SIEVE" title=""Sieve: An Email Filtering Language"">SIEVE</a>], and [<a href="#ref-XMPP" title=""Extensible Messaging and Presence Protocol (XMPP): Core"">XMPP</a>].
[<a id="ref-NOTIFY">NOTIFY</a>] specifies that a notification method MUST provide mechanisms
for avoiding notification loops. One type of notification loop can
be caused by message forwarding; however, such loops are prevented
because XMPP does not support the forwarding of messages from one
XMPP address to another. Another type of notification loop can be
caused by auto-replies to XMPP messages received by the XMPP
notification service associated with the Sieve engine; therefore,
such a service MUST NOT auto-reply to XMPP messages it receives.
A common use case might be for a user to create a script that enables
the Sieve engine to act differently if the user is currently
available at a particular type of service (e.g., send notifications
to the user's XMPP address if the user has an active session at an
XMPP service). Whether the user is currently available can be
determined by means of a notify_method_capability test for the
"online" notification-capability. In XMPP, information about current
network availability is called "presence" (see also [<a href="#ref-MODEL" title=""A Model for Presence and Instant Messaging"">MODEL</a>]). Since
[<a href="#ref-XMPP-IM" title=""Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence"">XMPP-IM</a>] requires that a user must approve a presence subscription
before an entity can gain access to the user's presence information,
a limited but reasonably safe implementation might be for the Sieve
engine to request a subscription to the user's presence. The user
would then need to approve that subscription request so that the
Sieve engine can act appropriately depending on whether the user is
online or offline. However, the Sieve engine MUST NOT use the user's
presence information when processing scripts on behalf of a script
owner other than the user, unless the Sieve engine has explicit
knowledge (e.g., via integration with an XMPP server's presence
authorization rules) that the script owner is authorized to know the
user's presence. While it would be possible to design a more
advanced approach to the delegation of presence authorization, any
such approach is left to future standards work.
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. IANA Considerations</span>
The following template provides the IANA registration of the Sieve
notification mechanism specified in this document:
To: iana@iana.org
Subject: Registration of new Sieve notification mechanism
Mechanism name: xmpp
Mechanism URI: <a href="./rfc5122">RFC 5122</a> [<a href="#ref-XMPP-URI" title=""Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP)"">XMPP-URI</a>]
Mechanism-specific options: none
Permanent and readily available reference: <a href="./rfc5437">RFC 5437</a>
Person and email address to contact for further information:
Peter Saint-Andre <registrar@xmpp.org>
This information has been added to the list of Sieve notification
mechanisms maintained at <<a href="http://www.iana.org">http://www.iana.org</a>>.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. References</span>
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. Normative References</span>
[<a id="ref-NOTIFY">NOTIFY</a>] Melnikov, A., Ed., Leiba, B., Ed., Segmuller, W., and T.
Martin, "Sieve Email Filtering: Extension for
Notifications", <a href="./rfc5435">RFC 5435</a>, January 2009.
[<a id="ref-OOB">OOB</a>] Saint-Andre, P., "Out of Band Data", XSF XEP 0066,
August 2006.
[<a id="ref-QUERIES">QUERIES</a>] Saint-Andre, P., "XMPP URI Scheme Query Components", XSF
XEP 0147, September 2006.
[<a id="ref-RFC5321">RFC5321</a>] Klensin, J., "Simple Mail Transfer Protocol", <a href="./rfc5321">RFC 5321</a>,
October 2008.
[<a id="ref-SHIM">SHIM</a>] Saint-Andre, P. and J. Hildebrand, "Stanza Headers and
Internet Metadata", XSF XEP 0131, July 2006.
[<a id="ref-SIEVE">SIEVE</a>] Guenther, P., Ed. and T. Showalter, Ed., "Sieve: An Email
Filtering Language", <a href="./rfc5228">RFC 5228</a>, January 2008.
[<a id="ref-TERMS">TERMS</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-XMPP-URI">XMPP-URI</a>] Saint-Andre, P., "Internationalized Resource Identifiers
(IRIs) and Uniform Resource Identifiers (URIs) for the
Extensible Messaging and Presence Protocol (XMPP)",
<a href="./rfc5122">RFC 5122</a>, February 2008.
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. Informative References</span>
[<a id="ref-HTTP">HTTP</a>] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", <a href="./rfc2616">RFC 2616</a>, June 1999.
[<a id="ref-IMAP">IMAP</a>] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
4rev1", <a href="./rfc3501">RFC 3501</a>, March 2003.
[<a id="ref-IMAP-URL">IMAP-URL</a>] Melnikov, A. and C. Newman, "IMAP URL Scheme", <a href="./rfc5092">RFC 5092</a>,
November 2007.
[<a id="ref-IRI">IRI</a>] Duerst, M. and M. Suignard, "Internationalized Resource
Identifiers (IRIs)", <a href="./rfc3987">RFC 3987</a>, January 2005.
[<a id="ref-MODEL">MODEL</a>] Day, M., Rosenberg, J., and H. Sugano, "A Model for
Presence and Instant Messaging", <a href="./rfc2778">RFC 2778</a>, February 2000.
[<a id="ref-POP-URL">POP-URL</a>] Gellens, R., "POP URL Scheme", <a href="./rfc2384">RFC 2384</a>, August 1998.
[<a id="ref-UNICODE">UNICODE</a>] The Unicode Consortium, "The Unicode Standard, Version
3.2.0", 2000.
The Unicode Standard, Version 3.2.0 is defined by The
Unicode Standard, Version 3.0 (Reading, MA, Addison-
Wesley, 2000. ISBN 0-201-61633-5), as amended by the
Unicode Standard Annex #27: Unicode 3.1
(<a href="http://www.unicode.org/reports/tr27/">http://www.unicode.org/reports/tr27/</a>) and by the Unicode
Standard Annex #28: Unicode 3.2
(<a href="http://www.unicode.org/reports/tr28/">http://www.unicode.org/reports/tr28/</a>).
[<a id="ref-URI">URI</a>] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66,
<a href="./rfc3986">RFC 3986</a>, January 2005.
[<a id="ref-UTF-8">UTF-8</a>] Yergeau, F., "UTF-8, a transformation format of ISO
10646", STD 63, <a href="./rfc3629">RFC 3629</a>, November 2003.
[<a id="ref-XMPP">XMPP</a>] Saint-Andre, P., "Extensible Messaging and Presence
Protocol (XMPP): Core", <a href="./rfc3920">RFC 3920</a>, October 2004.
[<a id="ref-XMPP-IM">XMPP-IM</a>] Saint-Andre, P., "Extensible Messaging and Presence
Protocol (XMPP): Instant Messaging and Presence",
<a href="./rfc3921">RFC 3921</a>, October 2004.
<span class="grey">Saint-Andre & Melnikov Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc5437">RFC 5437</a> Sieve Notify Method: XMPP January 2009</span>
Authors' Addresses
Peter Saint-Andre
Cisco
EMail: psaintan@cisco.com
Alexey Melnikov
Isode Limited
EMail: Alexey.Melnikov@isode.com
Saint-Andre & Melnikov Standards Track [Page 14]
</pre>
|