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 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837
|
<pre>Internet Engineering Task Force (IETF) N. Freed
Request for Comments: 6009 Oracle
Category: Standards Track October 2010
ISSN: 2070-1721
<span class="h1">Sieve Email Filtering:</span>
<span class="h1">Delivery Status Notifications and Deliver-By Extensions</span>
Abstract
This document describes the "envelope-dsn", "redirect-dsn",
"envelope-deliverby", and "redirect-deliverby" extensions to the
Sieve email filtering language. The "envelope-dsn" and "envelope-
deliverby" extensions provide access to additional envelope
information provided by the delivery status notification (DSN) and
Deliver-By SMTP extensions, respectively. The "redirect-dsn" and
"redirect-deliverby" extensions extend Sieve's redirect action to
provide control over delivery status notification and Deliver-By
parameters, respectively.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc6009">http://www.rfc-editor.org/info/rfc6009</a>.
<span class="grey">Freed Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
Copyright Notice
Copyright (c) 2010 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/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. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-2">2</a>. Conventions Used in This Document . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-3">3</a>. Capability Identifiers . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4">4</a>. Envelope-dsn Extension . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4.1">4.1</a>. Examples . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-5">5</a>. Envelope-deliverby Extension . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-5.1">5.1</a>. Examples . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-6">6</a>. redirect-dsn Extension . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-6.1">6.1</a>. MAIL FROM Address Selection . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-6.2">6.2</a>. Example . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-7">7</a>. redirect-deliverby Extension . . . . . . . . . . . . . . . . . <a href="#page-10">10</a>
<a href="#section-7.1">7.1</a>. MAIL FROM Address Selection . . . . . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#section-7.2">7.2</a>. Example . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#section-8">8</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#section-9">9</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-10">10</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-13">13</a>
<a href="#section-10.1">10.1</a>. Normative References . . . . . . . . . . . . . . . . . . . <a href="#page-13">13</a>
<a href="#section-10.2">10.2</a>. Informative References . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#appendix-A">Appendix A</a>. Acknowledgements . . . . . . . . . . . . . . . . . . <a href="#page-15">15</a>
<span class="grey">Freed Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
Sieve [<a href="./rfc5228" title=""Sieve: An Email Filtering Language"">RFC5228</a>] is a language for filtering email messages at or
around the time of final delivery. It is designed to be
implementable on either a mail client or mail server. It is suitable
for running on a mail server where users may not be allowed to
execute arbitrary programs, such as on black box Internet Message
Access Protocol [<a href="./rfc3501" title=""INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1"">RFC3501</a>] servers, as it has no user-controlled loops
or the ability to run external programs.
The base Sieve specification defines the envelope extension and test
to access information in the message envelope. Only information
available in regular SMTP [<a href="./rfc5321" title=""Simple Mail Transfer Protocol"">RFC5321</a>] is provided; additional
information added to the SMTP envelope by SMTP extensions cannot be
accessed.
The "envelope-dsn" extension extends the envelope test to allow
access to the additional envelope fields defined by the SMTP
extension for delivery status notifications (DSNs) specified in
<a href="./rfc3461">RFC 3461</a> [<a href="./rfc3461" title=""Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs)"">RFC3461</a>]. The "envelope-deliverby" extension extends the
envelope test to allow access to the additional envelope fields
defined by the Deliver-By SMTP extension defined in [<a href="./rfc2852" title=""Deliver By SMTP Service Extension"">RFC2852</a>].
The base Sieve specification also defines the redirect action, which
sends the message to a different address. Redirect only allows
specification of the new recipient address. The "redirect-dsn"
extension extends redirect to allow specification of some fields
defined by the delivery status notification SMTP extension.
"redirect-deliverby" in turn provides the ability to set a time limit
for delivery as specified in <a href="./rfc2852">RFC 2852</a> [<a href="./rfc2852" title=""Deliver By SMTP Service Extension"">RFC2852</a>].
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Conventions Used in This Document</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
The terms used to describe the various components of the Sieve
language are taken from <a href="./rfc5228#section-1.1">Section 1.1 of [RFC5228]</a>. The nature and
handling of Sieve errors are described in <a href="./rfc5228#section-2.10.6">Section 2.10.6 of
[RFC5228]</a>.
This document uses the ABNF notation specified in [<a href="./rfc5234" title=""Augmented BNF for Syntax Specifications: ABNF"">RFC5234</a>], and
refers to the notify-esmtp-value ABNF production defined in
<a href="./rfc3461#section-4.1">Section 4.1 of [RFC3461]</a>.
<span class="grey">Freed Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Capability Identifiers</span>
The capability strings associated with the extensions defined in this
document are "envelope-dsn", "redirect-dsn", "envelope-deliverby",
and "redirect-deliverby".
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Envelope-dsn Extension</span>
The "envelope-dsn" extension does not define any new tests or
actions; rather, it adds four values to the list of possible (case-
insensitive) envelope-part strings defined in <a href="./rfc5228#section-5.4">Section 5.4 of
[RFC5228]</a>:
notify - Match the list of notification conditions, or NOTIFY
values, associated with the TO address used in the SMTP RCPT TO
command that resulted in this message getting delivered to this
user. More than one notification condition can be in effect at
once; each condition that is in effect is tested separately, and
any match causes the test to succeed. The syntax and semantics of
the NOTIFY parameter are defined in <a href="./rfc3461#section-4.1">Section 4.1 of RFC 3461</a>
[<a href="./rfc3461" title=""Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs)"">RFC3461</a>] . Currently, the possible notification condition values
are "NEVER", "SUCCESS", "FAILURE", and "DELAY". Note that the
value "NEVER" is never combined with any other value.
orcpt - Match the original recipient, or ORCPT, value associated
with the TO address used in the SMTP RCPT TO command that resulted
in this message getting delivered to this user, with xtext
encoding removed. The syntax and semantics of the ORCPT parameter
are defined in <a href="./rfc3461#section-4.2">Section 4.2 of RFC 3461</a> [<a href="./rfc3461" title=""Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs)"">RFC3461</a>].
ret - Match the return of content, or RET, value given in the SMTP
MAIL FROM command. The syntax and semantics of the RET parameter
are defined in <a href="./rfc3461#section-4.3">Section 4.3 of RFC 3461</a> [<a href="./rfc3461" title=""Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs)"">RFC3461</a>]. The possible
return of content values are "FULL" and "HDRS".
envid - Match the envelope identifier, or ENVID, value in decoded
form given in the SMTP MAIL FROM command. The syntax and
semantics of the ENVID parameter are defined in <a href="./rfc3461#section-4.4">Section 4.4 of
RFC 3461</a> [<a href="./rfc3461" title=""Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs)"">RFC3461</a>].
The envelope test fails unconditionally for each of these envelope-
part strings if the specified envelope parameter does not exist for
the current message or recipient.
<span class="grey">Freed Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
The envelope test's ADDRESS-PART argument assumes the string being
tested has the syntax of an email address. None of the new envelope
parts defined here have address syntax; accordingly, it is an error
to specify an ADDRESS-PART argument in conjunction with these new
envelope parts.
The "relational" extension [<a href="./rfc5231" title=""Sieve Email Filtering: Relational Extension"">RFC5231</a>] adds a match type called
":count". The count of an envelope test with an envelope-part of
"orcpt", "ret", and "envid" is 1 if the corresponding SMTP parameter
is present and 0 otherwise. The count of an envelope test with an
envelope-part of "notify" is equal to the number of notification
conditions specified and 0 if the NOTIFY parameter is not present.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Examples</span>
The fact that the NOTIFY envelope parameter is multivalued and the
notify envelope-part turns this into a list of values makes it easy
to check to see if a given value is present without having to worry
about other values:
require ["envelope", "envelope-dsn"];
# Check whether SUCCESS notifications were requested,
# irrespective of any other requests that were made
if envelope "notify" "SUCCESS"
{
# do whatever
}
Checking to see if a given request is the only one present is a
little trickier, however:
require ["envelope", "envelope-dsn", "relational",
"comparator-i;ascii-numeric"];
# Check whether only FAILURE notifications were requested
if allof ( envelope "notify" "FAILURE",
envelope :comparator "i;ascii-numeric"
:count "eq" "notify" "1"
)
{
# do whatever
}
The orcpt envelope-part always contains an address type indicator
prefix in addition to an address, which must be taken into account in
any tests:
<span class="grey">Freed Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
require ["envelope", "envelope-dsn"];
# See if the orcpt is an <a href="./rfc822">RFC822</a> address in the example.com
# domain
if envelope :matches "orcpt" "<a href="./rfc822">rfc822</a>;*@example.com"
{
# do whatever
}
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Envelope-deliverby Extension</span>
The "envelope-deliverby" extension does not define any new tests or
actions; rather, it adds four values to the list of possible (case-
insensitive) envelope-part strings defined in <a href="./rfc5228#section-5.4">Section 5.4 of
[RFC5228]</a> and an optional :zone tagged argument. This updates the
usage description for envelope to:
Usage: envelope [COMPARATOR] [ADDRESS-PART]
[MATCH-TYPE] [:zone <time-zone: string>]
<envelope-part: string-list>
<key-list: string-list>
These new envelope parts correspond to the new MAIL FROM parameters
defined in <a href="./rfc2852#section-4">Section 4 of [RFC2852]</a>. They are:
bytimeabsolute - Match the current value of the initial integer part
of the Deliver-By extension's BY parameter on the SMTP MAIL FROM
command, converted into an absolute time represented in restricted
ISO 8601 format. The restricted ISO 8601 format is specified by
the date-time ABNF production given in <a href="./rfc3339#section-5.6">[RFC3339], Section 5.6</a>,
with the added restrictions that the letters "T" and "Z" MUST be
in upper case, and a time zone offset of zero MUST be represented
by "Z" and not "+00:00".
bytimerelative - Match the current value of the initial integer part
of the Deliver-By extension's BY parameter specified in the SMTP
MAIL FROM command.
bymode - Match a string computed from the by-mode part of the
Deliver-By extension's BY parameter. The possible values are
"notify" and "return", which correspond to the BY parameter mode
specifier characters "N" and "R", respectively.
bytrace - Match the trace modifier computed from the by-trace
modifier on the Deliver-By extension's BY parameter. The possible
values are "trace" and "" (the empty string). These values
correspond to the presence or absence of the by-trace "T"
modifier, respectively.
<span class="grey">Freed Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
The envelope test fails unconditionally for each of these envelope-
part strings if the BY SMTP MAIL FROM parameter does not exist for
the current message or recipient.
The new :zone argument specifies a time zone offset string that any
bytimeabsolute value is to be shifted to prior to testing. :zone has
no effect on envelope-parts other than bytimeabsolute. The value of
the time zone offset string MUST be an offset relative to UTC with
the following syntax:
time-zone = ( "+" / "-" ) 4DIGIT
The "+" or "-" indicates whether the time-of-day is ahead of (i.e.,
east of) or behind (i.e., west of) UTC. The first two digits
indicate the number of hours difference from Universal Time, and the
last two digits indicate the number of minutes difference from
Universal Time. Note that this agrees with the [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] format for
time zone offsets, not the ISO 8601 format. The local time zone MUST
be used for bytimeabsolute if the :zone argument is omitted.
The envelope test's ADDRESS-PART argument assumes the string being
tested has the syntax of an email address. None of the new envelope
parts defined here have address syntax; accordingly, it is an error
to specify an ADDRESS-PART argument in conjunction with these new
envelope parts.
The "relational" extension [<a href="./rfc5231" title=""Sieve Email Filtering: Relational Extension"">RFC5231</a>] adds a match type called
":count". The count of an envelope test with an envelope-part of
"bytime", "bymode", and "bytrace" is 1 if the BY parameter is present
and 0 otherwise.
It is important to note that the Deliver-By by-time is decremented as
the message passes through the transport infrastructure.
Accordingly, it is not possible to tell what the message originator
set the value to; only the amount of time remaining at the moment the
sieve is run can be determined. Additionally, note that
bytimerelative values can be negative, making it necessary to either
perform additional checks or else use a comparator that, unlike
i;ascii-numeric, is capable of handling signed integers.
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Examples</span>
As noted above, this extension does not provide access to the
originator's initial by-time setting for the simple reason that this
information is not part of the envelope. It can, however, be used to
check and see if the message was delivered within the allotted time.
Note the additional check to see if the value is negative:
<span class="grey">Freed Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
require ["envelope", "envelope-deliverby", "relational",
"comparator-i;ascii-numeric"];
# Check to see if this message didn't make it in the time allotted by
# the originator.
if anyof (envelope :contains "bytimerelative" "-",
envelope :value "eq" :comparator "i;ascii-numeric"
"bytimerelative" "0")
{
# do whatever
}
This operation can be done more simply if the date [<a href="./rfc5260" title=""Sieve Email Filtering: Date and Index Extensions"">RFC5260</a>] and
variables [<a href="./rfc5229" title=""Sieve Email Filtering: Variables Extension"">RFC5229</a>] extensions are available:
require ["envelope", "envelope-deliverby", "relational", "date",
"variables"];
# Check to see if this message didn't make it in the time allotted by
# the originator.
if currentdate :matches "iso8601" "*" {
set "cdate" "${0}";
if envelope :value "ge" "bytimeabsolute" "${cdate}" {
# do whatever
}
}
Note that there is no need to force the use of a particular time zone
since both currentdate and the bytimeabsolute value are required to
default to the local time zone. A similar check could be written
using :zone if the action taken depends on having the by-time
represented in a particular zone:
require ["envelope", "envelope-deliverby", "relational", "date",
"variables"];
# If the message didn't make it in time, file it according to when it
# should have been received
if envelope :matches :zone "+0000" "bytimeabsolute" "*T*:*:*" {
set "bdate" "${0}";
set "bhour" "${2}";
if currentdate :zone "+0000" :value "lt" "iso8601" "${bdate}")
fileinto "missed-${bhour}";
}
}
<span class="grey">Freed Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. redirect-dsn Extension</span>
The "redirect-dsn" extension does not define any new tests or
actions; rather, it adds two new arguments, NOTIFY and RET, to the
redirect action defined in <a href="./rfc5228#section-4.2">Section 4.2 of [RFC5228]</a>. This updates
the usage description for redirect to:
Usage: redirect [:notify "value"] [:ret "FULL"|"HDRS"]
<address: string>
The syntax for the NOTIFY and RET arguments are:
NOTIFY = ":notify" notify-value
notify-value = DQUOTE ("NEVER" / notify-esmtp-list) DQUOTE
notify-esmtp-list = notify-list-element *("," notify-list-element)
RET = ":ret" ret-value
ret-value = DQUOTE ("FULL" / "HDRS") DQUOTE
The notify-list-element ABNF production is defined in <a href="./rfc3461#section-4.1">Section 4.1 of
[RFC3461]</a>.
When these arguments are specified, they set the corresponding NOTIFY
ESMTP RCPT TO and RET ESMTP MAIL FROM parameters, respectively.
These arguments are only honored if the delivery status notification
(DSN) ESMTP extension is available. When the DSN extension is not
available, these arguments MUST be ignored and MUST NOT cause an
error.
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. MAIL FROM Address Selection</span>
<a href="./rfc5228">RFC 5228</a> does not require that any particular envelope sender address
be associated with redirected messages. However, the redirect-dsn
extension isn't terribly useful if the place where the delivery
status notifications are sent isn't known. Accordingly, when either
:notify or :ret is specified and the envelope sender address isn't
empty, implementations MUST set the envelope sender address to the
address of the sieve owner.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Example</span>
One possible use of :notify on redirect is to combine the copy
extension [<a href="./rfc3894" title=""Sieve Extension: Copying Without Side Effects"">RFC3894</a>] with the ability to suppress nondelivery
notifications to generate a private copy of selected messages with no
side effects or error notifications:
<span class="grey">Freed Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
require ["copy", "redirect-dsn"];
# Make a private copy of messages from user@example.com
if address "from" "user@example.com"
{
redirect :copy :notify "NEVER" "elsewhere@example.com";
}
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. redirect-deliverby Extension</span>
The "redirect-deliverby" extension does not define any new tests or
actions; rather, it adds three new arguments, BYTIME, BYMODE, and
BYTRACE, to the redirect action defined in <a href="./rfc5228#section-4.2">Section 4.2 of [RFC5228]</a>.
This updates the usage description for redirect to:
Usage: redirect [:bytimerelative <rlimit: number> /
:bytimeabsolute <alimit:string>
[:bymode "notify"|"return"] [:bytrace]]
<address: string>
:bytimerelative specifies the number of seconds within which the
message should be delivered. This parameter does not allow
specification of negative values; it should not be necessary to
specify such values in this context. :bytimeabsolute specifies an
absolute time limit on delivery. The limit in this case is specified
in the restricted ISO 8601 format specified by the date-time ABNF
production given in [<a href="./rfc3339" title=""Date and Time on the Internet: Timestamps"">RFC3339</a>].
:bymode specifies whether a notification should be sent or the
message simply returned if the time limit is exceeded. The default
is "return" if :bymode is not specified. :bytrace, if specified,
activates message tracing.
The semantics of delivery time limits and these parameters are
specified and discussed at length in [<a href="./rfc2852" title=""Deliver By SMTP Service Extension"">RFC2852</a>].
It is an error to specify either :bymode or :bytrace without either
:bytimeabsolute or :bytimerelative.
When these arguments are specified, they are used to construct the
corresponding BY ESMTP MAIL FROM parameter. The :bytimeabsolute or
:bytimerelative value becomes the by-time, the :bymode becomes the
by-mode value, and :bytrace sets the by-trace modifier. If the
Deliver-By extension is unavailable, the handling of the redirected
message MUST conform to the semantics specified in <a href="./rfc2852#section-4.1.4">[RFC2852],
Section 4.1.4</a> for relaying to a server that does not support the
Deliver-By SMTP extension.
<span class="grey">Freed Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. MAIL FROM Address Selection</span>
<a href="./rfc5228">RFC 5228</a> does not require that any particular envelope sender address
be associated with redirected messages. However, the redirect-
deliverby extension, like the redirect-dsn extension, isn't terribly
useful if the place where any delivery status notifications are sent
isn't known. Accordingly, when either :bytimeabsolute or
:bytimerelative is specified and the envelope sender address isn't
empty, implementations MUST set the envelope sender address to the
address of the sieve owner.
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. Example</span>
The obvious use of "redirect-deliverby" is to specify a limit on
delivery attempts for a redirected message:
require ["copy", "redirect-deliverby"];
# Send a copy to my cell phone, time out after 10 minutes
if address "from" "user@example.com"
{
redirect :copy :bytimerelative 600 "cellphone@example.com";
}
Limits on delivery after a particular time of day may also be
constructed:
require ["copy", "redirect-deliverby", "date", "variables",
"relational", "comparator-i;ascii-numeric"];
# Send a copy to my cell phone to be delivered before 10PM
if currentdate :value "lt"
:comparator "i;ascii-numeric" "hour" "22"
{
if currentdate :matches "date" "*" {set "date" "${0}";}
if currentdate :matches "zone" "*" {set "zone" "${0}";}
redirect :copy :bytimeabsolute "${date}T20:00:00${zone}"
:bymode "return" "cellphone@example.com";
}
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Security Considerations</span>
The envelope-dsn and envelope-deliverby extensions provide access to
additional message envelope information. This is not believed to
raise any additional security issues beyond those for the Sieve
"envelope" test.
<span class="grey">Freed Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
The redirect-dsn extension allows specification of the delivery
status notification's NOTIFY parameter, which can cause the
generation of notification messages that might otherwise not be
generated, especially if notification in the event of successful
delivery is required. Sites that limit the ability to request
success notifications will also need to restrict the ability to
request them using the redirect-dsn extension.
Similarly, the redirect-deliverby extension is used to control how
long the transport infrastructure will continue to attempt to deliver
a message before giving up, which could result in the generation of
additional notification messages. While the underlying Deliver-By
extension does have a minimum by-time limit, sites may wish to impose
additional limits on the minimum by-time allowed in a redirect
action.
All of the security considerations given in the base Sieve
specification also apply to this extension.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. IANA Considerations</span>
The following template specifies the IANA registration of the Sieve
extension specified in this document:
To: iana@iana.org
Subject: Registration of new Sieve extensions
Capability name: envelope-dsn
Description: The "envelope-dsn" extension extends the envelope
test to allow checking of information associated
with the DSN ESMTP extension defined in <a href="./rfc3461">RFC 3461</a>.
RFC number: <a href="./rfc6009">RFC 6009</a>
Contact address: Sieve discussion list <sieve@ietf.org>
Capability name: envelope-deliverby
Description: The "envelope-deliverby" extension extends the
envelope test to allow checking of information
associated with the Deliver-By ESMTP extension
defined in <a href="./rfc2852">RFC 2852</a>.
RFC number: <a href="./rfc6009">RFC 6009</a>
Contact address: Sieve discussion list <sieve@ietf.org>
<span class="grey">Freed Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
Capability name: redirect-dsn
Description: The "redirect-dsn" extension extends the redirect
action to allow specification of the NOTIFY and
RET ESMTP parameters associated with the DSN SMTP
extension defined in <a href="./rfc3461">RFC 3461</a>.
RFC number: <a href="./rfc6009">RFC 6009</a>
Contact address: Sieve discussion list <sieve@ietf.org>
Capability name: redirect-deliverby
Description: The "redirect-deliverby" extension extends the
redirect action to allow specification of the BY
ESMTP parameter associated with the Deliver-By SMTP
extension defined in <a href="./rfc2852">RFC 2852</a>.
RFC number: <a href="./rfc6009">RFC 6009</a>
Contact address: Sieve discussion list <sieve@ietf.org>
This information has been added to the list of Sieve extensions
available from <a href="http://www.iana.org">http://www.iana.org</a>.
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. References</span>
<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</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-RFC2852">RFC2852</a>] Newman, D., "Deliver By SMTP Service Extension", <a href="./rfc2852">RFC 2852</a>,
June 2000.
[<a id="ref-RFC3339">RFC3339</a>] Klyne, G., Ed. and C. Newman, "Date and Time on the
Internet: Timestamps", <a href="./rfc3339">RFC 3339</a>, July 2002.
[<a id="ref-RFC3461">RFC3461</a>] Moore, K., "Simple Mail Transfer Protocol (SMTP) Service
Extension for Delivery Status Notifications (DSNs)",
<a href="./rfc3461">RFC 3461</a>, January 2003.
[<a id="ref-RFC5228">RFC5228</a>] Guenther, P. and T. Showalter, "Sieve: An Email Filtering
Language", <a href="./rfc5228">RFC 5228</a>, January 2008.
[<a id="ref-RFC5231">RFC5231</a>] Segmuller, W. and B. Leiba, "Sieve Email Filtering:
Relational Extension", <a href="./rfc5231">RFC 5231</a>, January 2008.
[<a id="ref-RFC5234">RFC5234</a>] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, <a href="./rfc5234">RFC 5234</a>, January 2008.
[<a id="ref-RFC5321">RFC5321</a>] Klensin, J., "Simple Mail Transfer Protocol", <a href="./rfc5321">RFC 5321</a>,
October 2008.
<span class="grey">Freed Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
[<a id="ref-RFC5322">RFC5322</a>] Resnick, P., Ed., "Internet Message Format", <a href="./rfc5322">RFC 5322</a>,
October 2008.
<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>. Informative References</span>
[<a id="ref-RFC3501">RFC3501</a>] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
4rev1", <a href="./rfc3501">RFC 3501</a>, March 2003.
[<a id="ref-RFC3894">RFC3894</a>] Degener, J., "Sieve Extension: Copying Without Side
Effects", <a href="./rfc3894">RFC 3894</a>, October 2004.
[<a id="ref-RFC5229">RFC5229</a>] Homme, K., "Sieve Email Filtering: Variables Extension",
<a href="./rfc5229">RFC 5229</a>, January 2008.
[<a id="ref-RFC5260">RFC5260</a>] Freed, N., "Sieve Email Filtering: Date and Index
Extensions", <a href="./rfc5260">RFC 5260</a>, July 2008.
<span class="grey">Freed Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc6009">RFC 6009</a> Sieve DSNs and Deliver-By Extensions October 2010</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Acknowledgements</span>
Cyrus Daboo, Derek Diget, Philip Guenther, Arnt Gulbrandsen, Tero
Kivinen, Barry Leiba, Andrew McKeon, Alexey Melnikov, Chris Newman,
Aaron Stone, and Alexandros Vellis provided helpful suggestions and
corrections.
Author's Address
Ned Freed
Oracle
800 Royal Oaks
Monrovia, CA 91016-6347
USA
EMail: ned.freed@mrochek.com
Freed Standards Track [Page 15]
</pre>
|