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>Internet Engineering Task Force (IETF) C. Daboo
Request for Comments: 6609 Apple, Inc.
Category: Standards Track A. Stone
ISSN: 2070-1721 Serendipity
May 2012
<span class="h1">Sieve Email Filtering: Include Extension</span>
Abstract
The Sieve Email Filtering "include" extension permits users to
include one Sieve script inside another. This can make managing
large scripts or multiple sets of scripts much easier, and allows a
site and its users to build up libraries of scripts. Users are able
to include their own personal scripts or site-wide scripts.
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/rfc6609">http://www.rfc-editor.org/info/rfc6609</a>.
Copyright Notice
Copyright (c) 2012 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.
<span class="grey">Daboo & Stone Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
Table of Contents
<a href="#section-1">1</a>. Introduction and Overview .......................................<a href="#page-2">2</a>
<a href="#section-2">2</a>. Conventions Used in This Document ...............................<a href="#page-2">2</a>
<a href="#section-3">3</a>. Include Extension ...............................................<a href="#page-3">3</a>
<a href="#section-3.1">3.1</a>. General Considerations .....................................<a href="#page-3">3</a>
<a href="#section-3.2">3.2</a>. Control Structure "include" ................................<a href="#page-4">4</a>
<a href="#section-3.3">3.3</a>. Control Structure "return" .................................<a href="#page-7">7</a>
<a href="#section-3.4">3.4</a>. Interaction with the "variables" Extension .................<a href="#page-8">8</a>
<a href="#section-3.4.1">3.4.1</a>. Control Structure "global" ..........................<a href="#page-8">8</a>
<a href="#section-3.4.2">3.4.2</a>. Variables Namespace global .........................<a href="#page-10">10</a>
<a href="#section-3.5">3.5</a>. Interaction with Other Extensions .........................<a href="#page-11">11</a>
<a href="#section-4">4</a>. Security Considerations ........................................<a href="#page-12">12</a>
<a href="#section-5">5</a>. IANA Considerations ............................................<a href="#page-12">12</a>
<a href="#section-6">6</a>. References .....................................................<a href="#page-13">13</a>
<a href="#section-6.1">6.1</a>. Normative References ......................................<a href="#page-13">13</a>
<a href="#section-6.2">6.2</a>. Informative References ....................................<a href="#page-13">13</a>
<a href="#appendix-A">Appendix A</a>. Acknowledgments .......................................<a href="#page-14">14</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction and Overview</span>
It's convenient to be able to break Sieve [<a href="./rfc5228" title=""Sieve: An Email Filtering Language"">RFC5228</a>] scripts down into
smaller components that can be reused in a variety of different
circumstances. For example, users may want to have a default script
and a special 'vacation' script, the latter being activated when the
user goes on vacation. In that case, the default actions should
continue to be run, but a vacation command should be executed first.
One option is to edit the default script to add or remove the
vacation command as needed. Another is to have a vacation script
that simply has a vacation command and then includes the default
script.
This document defines the Sieve Email Filtering "include" extension,
which permits users to include one Sieve script inside another.
<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>].
Conventions for notations are as in Sieve <a href="./rfc5228#section-1.1">[RFC5228], Section 1.1</a>.
<span class="grey">Daboo & Stone Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
The following key phrases are used to describe scripts and script
execution:
script
a valid Sieve script.
script execution
an instance of a Sieve interpreter invoked for a given message
delivery, starting with the user's active script and continuing
through any included scripts until the final disposition of the
message (e.g., delivered, forwarded, discarded, rejected, etc.).
immediate script
the individual Sieve script file being executed.
including script
the individual Sieve script file that had an include statement
that included the immediate script.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Include Extension</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. General Considerations</span>
Sieve implementations that implement the "include", "return", and
"global" commands described below have an identifier of "include" for
use with the capability mechanism. If any of the "include",
"return", or "global" commands are used in a script, the "include"
capability MUST be listed in the "require" statement in that script.
Sieve implementations need to track the use of actions in included
scripts so that implicit "keep" behavior can be properly determined
based on whether any actions have executed in any script.
Sieve implementations are allowed to limit the total number of nested
included scripts, but MUST provide for a total of at least three
levels of nested scripts including the top-level script. An error
MUST be generated either when the script is uploaded to the Sieve
repository, or when the script is executed, if any nesting limit is
exceeded. If such an error is detected whilst processing a Sieve
script, an implicit "keep" action MUST be executed to prevent loss of
any messages.
Sieve implementations MUST NOT allow recursive script inclusion.
Both direct recursion, where script A includes script A (itself), and
indirect recursion, where script A includes script B which includes
script A once again, are prohibited.
<span class="grey">Daboo & Stone Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
Sieve implementations MUST generate an error at execution time if an
included script is a recursive inclusion. Implementations MUST NOT
generate errors for recursive includes at upload time, as this would
force an upload ordering requirement upon script authors and
generators.
Sieve implementations MUST generate an error at execution time if an
included script does not exist, except when the ":optional" parameter
is specified. Implementations MUST NOT generate errors for scripts
missing at upload time, as this would force an upload ordering
requirement upon script authors and generators.
If the Sieve "variables" extension [<a href="./rfc5229" title=""Sieve Email Filtering: Variables Extension"">RFC5229</a>] is present, an issue
arises with the "scope" of variables defined in scripts that may
include each other. For example, if a script defines the variable
"${status}" with one particular meaning or usage, and another defines
"${status}" with a different meaning, then if one script includes the
other there is an issue as to which "${status}" is being referenced.
To solve this problem, Sieve implementations MUST follow the scoping
rules defined in <a href="#section-3.4">Section 3.4</a> and support the "global" command defined
there.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Control Structure "include"</span>
Usage: include [LOCATION] [":once"] [":optional"] <value: string>
LOCATION = ":personal" / ":global"
The "include" command takes an optional "location" parameter, an
optional ":once" parameter, an optional ":optional" parameter, and a
single string argument representing the name of the script to include
for processing at that point. Implementations MUST restrict script
names according to ManageSieve <a href="./rfc5804#section-1.6">[RFC5804], Section 1.6</a>. The script
name argument MUST be a constant string as defined in <a href="./rfc5229#section-3">[RFC5229],
Section 3</a>; implementations MUST NOT expand variables in the script
name argument.
The "location" parameter MUST default to ":personal" if not
specified. The "location" parameter MUST NOT be specified more than
once. The "location" has the following meanings:
:personal
Indicates that the named script is stored in the user's own
personal (private) Sieve repository.
:global
Indicates that the named script is stored in a site-wide Sieve
repository, accessible to all users of the Sieve system.
<span class="grey">Daboo & Stone Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
The ":once" parameter tells the interpreter only to include the named
script if it has not already been included at any other point during
script execution. If the script has already been included,
processing continues immediately following the "include" command.
Implementations MUST NOT generate an error if an "include :once"
command names a script whose inclusion would be recursive; in this
case, the script MUST be considered previously included, and
therefore "include :once" will not include it again.
Note: It is RECOMMENDED that script authors and generators use the
":once" parameter only when including a script that performs general
duties such as declaring global variables and making sanity checks of
the environment.
The ":optional" parameter indicates that the script may be missing.
Ordinarily, an implementation MUST generate an error during execution
if an "include" command specifies a script that does not exist. When
":optional" is specified, implementations MUST NOT generate an error
for a missing script, and MUST continue as if the "include" command
had not been present.
The included script MUST be a valid Sieve script. Implementations
MUST validate that each script has its own "require" statements for
all optional capabilities used by that script. The scope of a
"require" statement is the script in which it immediately appears,
and neither inherits nor passes on capabilities to other scripts
during the course of execution.
A "stop" command in an included script MUST stop all script
processing, including the processing of the scripts that include the
immediate one. The "return" command (described below) stops
processing of the immediate script only, and allows the scripts that
include it to continue.
The "include" command MAY appear anywhere in a script where a control
structure is legal, and MAY be used within another control structure,
e.g., an "if" block.
<span class="grey">Daboo & Stone Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
Examples:
The user has four scripts stored in their personal repository:
"default"
This is the default active script that includes several others.
require ["include"];
include :personal "always_allow";
include :global "spam_tests";
include :personal "spam_tests";
include :personal "mailing_lists";
Personal script "always_allow"
This script special-cases some correspondent email addresses and
makes sure any message containing those addresses is always kept.
if address :is "from" "boss@example.com"
{
keep;
}
elsif address :is "from" "ceo@example.com"
{
keep;
}
Personal script "spam_tests" (uses "reject" [<a href="./rfc5429" title=""Sieve Email Filtering: Reject and Extended Reject Extensions"">RFC5429</a>])
This script does some user-specific spam tests to catch spam
messages not caught by the site-wide spam tests.
require ["reject"];
if header :contains "Subject" "XXXX"
{
reject "Subject XXXX is unacceptable.";
}
elsif address :is "from" "money@example.com"
{
reject "Mail from this sender is unwelcome.";
}
<span class="grey">Daboo & Stone Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
Personal script "mailing_lists"
This script looks for messages from different mailing lists and
files each into a mailbox specific to the mailing list.
require ["fileinto"];
if header :is "List-ID" "sieve.ietf.org"
{
fileinto "lists.sieve";
}
elsif header :is "List-ID" "ietf-imapext.imc.org"
{
fileinto "lists.imapext";
}
There is one script stored in the global repository:
Site script "spam_tests" (uses "reject" [<a href="./rfc5429" title=""Sieve Email Filtering: Reject and Extended Reject Extensions"">RFC5429</a>])
This script does some site-wide spam tests that any user at the
site can include in their own scripts at a suitable point. The
script content is kept up to date by the site administrator.
require ["reject"];
if anyof (header :contains "Subject" "$$",
header :contains "Subject" "Make money")
{
reject "No thank you.";
}
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Control Structure "return"</span>
Usage: return
The "return" command stops processing of the immediately included
script only and returns processing control to the script that
includes it. If used in the main script (i.e., not in an included
script), it has the same effect as the "stop" command, including the
appropriate "keep" action if no other actions have been executed up
to that point.
<span class="grey">Daboo & Stone Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. Interaction with the "variables" Extension</span>
In order to avoid problems of variables in an included script
"overwriting" those from the script that includes it, this
specification requires that all variables defined in a script MUST be
kept "private" to the immediate script by default -- that is, they
are not "visible" to other scripts. This ensures that two script
authors cannot inadvertently cause problems by choosing the same name
for a variable.
However, sometimes there is a need to make a variable defined in one
script available to others. This specification defines the new
command "global" to declare that a variable is shared among scripts.
Effectively, two namespaces are defined: one local to the immediate
script, and another shared among all scripts. Implementations MUST
allow a non-global variable to have the same name as a global
variable but have no interaction between them.
<span class="h4"><a class="selflink" id="section-3.4.1" href="#section-3.4.1">3.4.1</a>. Control Structure "global"</span>
Usage: global <value: string-list>
The "global" command accepts a string list argument that defines one
or more names of variables to be stored in the global variable space.
Each name MUST be a constant string and conform to the syntax of
variable-name as defined in the "variables" extension document
<a href="./rfc5229#section-3">[RFC5229], Section 3</a>. Match variables cannot be specified, and
namespace prefixes are not allowed. An invalid name MUST be detected
as a syntax error.
The "global" command is only available when the script has both
"include" and "variables" in its require line. If the "global"
command appears when only "include" or only "variables" has been
required, an error MUST be generated when the script is uploaded.
If a "global" command is given the name of a variable that has
previously been defined in the immediate script with "set", an error
MUST be generated either when the script is uploaded or at execution
time.
If a "global" command lists a variable that has not been defined in
the "global" namespace, the name of the variable is now marked as
global, and any subsequent "set" command will set the value of the
variable in global scope.
<span class="grey">Daboo & Stone Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
A variable has global scope in all scripts that have declared it with
the "global" command. If a script uses that variable name without
declaring it global, the name specifies a separate, non-global
variable within that script.
Interpretation of a string containing a variable marked as global,
but without any value set, SHALL behave as any other access to an
unknown variable, as specified in the "variables" extension document
<a href="./rfc5229#section-3">[RFC5229], Section 3</a> (i.e., evaluates to an empty string).
Example:
The active script
The included script may contain repetitive code that is
effectively a subroutine that can be factored out. In this
script, the test that matches last will leave its value in the
test_mailbox variable, and the top-level script will file the
message into that mailbox. If no tests matched, the message will
be implicitly kept in the INBOX.
require ["fileinto", "include", "variables", "relational"];
global "test";
global "test_mailbox";
set "test" "$$";
include "subject_tests";
set "test" "Make money";
include "subject_tests";
if string :count "eq" "${test_mailbox}" "1"
{
fileinto "${test_mailbox}";
stop;
}
<span class="grey">Daboo & Stone Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
Personal script "subject_tests"
This script performs a number of tests against the message, sets
the global test_mailbox variable with a folder to file the message
into, and then falls back to the top-level script.
require ["include", "variables"];
global ["test", "test_mailbox"];
if header :contains "Subject" "${test}"
{
set "test_mailbox" "spam-${test}";
}
<span class="h4"><a class="selflink" id="section-3.4.2" href="#section-3.4.2">3.4.2</a>. Variables Namespace global</span>
In addition to the "global" command, this document defines the
variables namespace "global", in accordance with the "variables"
extension document <a href="./rfc5229#section-3">[RFC5229], Section 3</a>. The "global" namespace has
no sub-namespaces (e.g., 'set "global.data.from" "me@example.com";'
is not allowed). The variable-name part MUST be a valid identifier
(e.g., 'set "global.12" "value";' is not valid because "12" is not a
valid identifier).
Note that the "variables" extension document <a href="./rfc5229#section-3">[RFC5229], Section 3</a>
suggests that extensions should define a namespace that is the same
as its capability string (in this case, "include" rather than
"global"). Nevertheless, references to the "global" namespace
without a prior require statement for the "include" extension MUST
cause an error.
Example:
require ["variables", "include"];
set "global.i_am_on_vacation" "1";
Variables declared global and variables accessed via the "global"
namespace MUST each be one and the same. In the following example
script, we see the variable "i_am_on_vacation" used in a "global"
command, and again with the "global" namespace. Consider these as
two syntaxes with identical meaning.
<span class="grey">Daboo & Stone Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
Example:
require ["variables", "include", "vacation"];
global "i_am_on_vacation";
set "global.i_am_on_vacation" "1";
if string :is "${i_am_on_vacation}" "1"
{
vacation "It's true, I am on vacation.";
}
<span class="h3"><a class="selflink" id="section-3.5" href="#section-3.5">3.5</a>. Interaction with Other Extensions</span>
When "include" is used with the "editheader" extension [<a href="./rfc5293" title=""Sieve Email Filtering: Editheader Extension"">RFC5293</a>], any
changes made to headers in a script MUST be propagated both to and
from included scripts. By way of example, if a script deletes one
header and adds another, then includes a second script, the included
script MUST NOT see the removed header, and MUST see the added
header. Likewise, if the included script adds or removes a header,
upon returning to the including script, subsequent actions MUST see
the added headers and MUST NOT see the removed headers.
When "include" is used with the MIME extension [<a href="./rfc5703" title=""Sieve Email Filtering: MIME Part Tests, Iteration, Extraction, Replacement, and Enclosure"">RFC5703</a>]
"foreverypart" control structure, the included script MUST be
presented with the current MIME part as though it were the entire
message. A script SHALL NOT have any special control over the
control structure it was included from. The "break" command in an
included script is not valid on its own and may not terminate a
"foreverypart" iteration in another script. The included script can
use "return" to transfer control back to the including script. A
global variable can be used to convey results to the including
script. A "stop" in an included script, even within a "foreverypart"
loop, still halts all script execution, per <a href="#section-3.2">Section 3.2</a>.
When "include" is used with the "reject" extension [<a href="./rfc5429" title=""Sieve Email Filtering: Reject and Extended Reject Extensions"">RFC5429</a>], calling
"reject" or "ereject" at any time sets the reject action on the
message, and continues script execution. Apropos of the MIME
extension, if an included script sees only a portion of the message
and calls a reject, it is the entire message and not the single MIME
part that carries the rejection.
<span class="grey">Daboo & Stone Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Security Considerations</span>
Sieve implementations MUST ensure adequate security for the global
script repository to prevent unauthorized changes to global scripts.
For example, a site policy might enable only certain users with
administrative privileges to modify the global scripts. Sites are
advised against allowing all users to have write access to the sites'
global scripts.
Sieve implementations MUST ensure that script names are checked for
validity and proper permissions prior to inclusion, in order to
prevent a malicious user from gaining access to files accessible to
the mail server software that should not be accessible to the user.
Sieve implementations MUST ensure that script names are safe for use
with their storage system. An error MUST be generated either when
the script is uploaded or at execution time for a script including a
name that could be used as a vector to attack the storage system. By
way of example, the following include commands should be considered
hostile: 'include "./../..//etc/passwd"', 'include "foo$(`rm
star`)"'.
Beyond these, the "include" extension does not raise any security
considerations that are not discussed in the base Sieve [<a href="./rfc5228" title=""Sieve: An Email Filtering Language"">RFC5228</a>]
document and the "variables" extension document [<a href="./rfc5229" title=""Sieve Email Filtering: Variables Extension"">RFC5229</a>].
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</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 extension
Capability name: include
Description: adds the "include" command to execute other Sieve
scripts, the "return" action from an included
script, and the "global" command and "global"
variables namespace to access variables shared
among included scripts.
RFC number: this RFC
Contact address: the Sieve discussion list <sieve@ietf.org>
This information has been added to IANA's "Sieve Extensions" registry
(<a href="http://www.iana.org">http://www.iana.org</a>).
<span class="grey">Daboo & Stone Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. References</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.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-RFC5228">RFC5228</a>] Guenther, P., Ed., and T. Showalter, Ed., "Sieve: An Email
Filtering Language", <a href="./rfc5228">RFC 5228</a>, January 2008.
[<a id="ref-RFC5229">RFC5229</a>] Homme, K., "Sieve Email Filtering: Variables Extension",
<a href="./rfc5229">RFC 5229</a>, January 2008.
[<a id="ref-RFC5804">RFC5804</a>] Melnikov, A., Ed., and T. Martin, "A Protocol for Remotely
Managing Sieve Scripts", <a href="./rfc5804">RFC 5804</a>, July 2010.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Informative References</span>
[<a id="ref-RFC5293">RFC5293</a>] Degener, J. and P. Guenther, "Sieve Email Filtering:
Editheader Extension", <a href="./rfc5293">RFC 5293</a>, August 2008.
[<a id="ref-RFC5429">RFC5429</a>] Stone, A., Ed., "Sieve Email Filtering: Reject and
Extended Reject Extensions", <a href="./rfc5429">RFC 5429</a>, March 2009.
[<a id="ref-RFC5703">RFC5703</a>] Hansen, T. and C. Daboo, "Sieve Email Filtering: MIME Part
Tests, Iteration, Extraction, Replacement, and Enclosure",
<a href="./rfc5703">RFC 5703</a>, October 2009.
<span class="grey">Daboo & Stone Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc6609">RFC 6609</a> Sieve Extension: Include May 2012</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Acknowledgments</span>
Thanks to Stephan Bosch, Ned Freed, Arnt Gulbrandsen, Tony Hansen,
Kjetil Torgrim Homme, Jeffrey Hutzelman, Barry Leiba, Alexey
Melnikov, Ken Murchison, Marc Mutz, and Rob Siemborski, for comments
and corrections.
Authors' Addresses
Cyrus Daboo
Apple Inc.
1 Infinite Loop
Cupertino, CA 95014
USA
EMail: cyrus@daboo.name
URI: <a href="http://www.apple.com/">http://www.apple.com/</a>
Aaron Stone
Serendipity
1817 California St. #104
San Francisco, CA 94109
USA
EMail: aaron@serendipity.cx
Daboo & Stone Standards Track [Page 14]
</pre>
|