draft-ietf-sieve-include-08.txt   draft-ietf-sieve-include-09.txt 
Network Working Group C. Daboo Network Working Group C. Daboo
Internet-Draft A. Stone Internet-Draft A. Stone
Intended status: Standards Track July 8, 2011 Intended status: Standards Track July 8, 2011
Expires: January 9, 2012 Expires: January 9, 2012
Sieve Email Filtering: Include Extension Sieve Email Filtering: Include Extension
draft-ietf-sieve-include-08 draft-ietf-sieve-include-09
Abstract Abstract
The Sieve Email Filtering "include" extension permits users to The Sieve Email Filtering "include" extension permits users to
include one Sieve script inside another. This can make managing include one Sieve script inside another. This can make managing
large scripts or multiple sets of scripts much easier, and allows a 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 site and its users to build up libraries of scripts. Users are able
to include their own personal scripts or site-wide scripts. to include their own personal scripts or site-wide scripts.
Status of this Memo Status of this Memo
skipping to change at page 2, line 16 skipping to change at page 2, line 16
1. Introduction and Overview . . . . . . . . . . . . . . . . . . 3 1. Introduction and Overview . . . . . . . . . . . . . . . . . . 3
2. Conventions Used in This Document . . . . . . . . . . . . . . 3 2. Conventions Used in This Document . . . . . . . . . . . . . . 3
3. Include Extension . . . . . . . . . . . . . . . . . . . . . . 3 3. Include Extension . . . . . . . . . . . . . . . . . . . . . . 3
3.1. General Considerations . . . . . . . . . . . . . . . . . . 3 3.1. General Considerations . . . . . . . . . . . . . . . . . . 3
3.2. Control Structure include . . . . . . . . . . . . . . . . 5 3.2. Control Structure include . . . . . . . . . . . . . . . . 5
3.3. Control Structure return . . . . . . . . . . . . . . . . . 8 3.3. Control Structure return . . . . . . . . . . . . . . . . . 8
3.4. Interaction with Variables . . . . . . . . . . . . . . . . 8 3.4. Interaction with Variables . . . . . . . . . . . . . . . . 8
3.4.1. Control Structure global . . . . . . . . . . . . . . . 8 3.4.1. Control Structure global . . . . . . . . . . . . . . . 8
3.4.2. Variables Namespace global . . . . . . . . . . . . . . 10 3.4.2. Variables Namespace global . . . . . . . . . . . . . . 10
4. Security Considerations . . . . . . . . . . . . . . . . . . . 10 4. Security Considerations . . . . . . . . . . . . . . . . . . . 11
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
5.1. "include" Extension Registration . . . . . . . . . . . . . 11 5.1. "include" Extension Registration . . . . . . . . . . . . . 11
6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 11 6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6.1. Normative References . . . . . . . . . . . . . . . . . . . 11 6.1. Normative References . . . . . . . . . . . . . . . . . . . 11
6.2. Informative References . . . . . . . . . . . . . . . . . . 11 6.2. Informative References . . . . . . . . . . . . . . . . . . 12
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 12 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 12
Appendix B. Change History (to be removed prior to Appendix B. Change History (to be removed prior to
publication as an RFC) . . . . . . . . . . . . . . . 12 publication as an RFC) . . . . . . . . . . . . . . . 12
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 14 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 14
1. Introduction and Overview 1. Introduction and Overview
It's convenient to be able to break SIEVE [RFC5228] scripts down into It's convenient to be able to break SIEVE [RFC5228] scripts down into
smaller components which can be reused in a variety of different smaller components which can be reused in a variety of different
circumstances. For example, users may want to have a default script circumstances. For example, users may want to have a default script
skipping to change at page 8, line 38 skipping to change at page 8, line 38
command "global" to declare that a variable is shared among scripts. command "global" to declare that a variable is shared among scripts.
Effectively, two namespaces are defined: one local to the immediate Effectively, two namespaces are defined: one local to the immediate
script, and another shared among all scripts. Implementations MUST script, and another shared among all scripts. Implementations MUST
allow a non-global variable to have the same name as a global allow a non-global variable to have the same name as a global
variable but have no interaction between them. variable but have no interaction between them.
3.4.1. Control Structure global 3.4.1. Control Structure global
Usage: global <value: string-list> Usage: global <value: string-list>
The "global" command contains a string list argument that defines one The "global" command accepts a string list argument that defines one
or more names of variables to be stored in the global variable space. 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 VARIABLES [RFC5229], Section 3. 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 The "global" command is only available when the script has both
"include" and "variables" in its require line. If the "global" "include" and "variables" in its require line. If the "global"
command appears when only "include" or only "variables" has been command appears when only "include" or only "variables" has been
required, an error MUST be generated when the script is uploaded. required, an error MUST be generated when the script is uploaded.
If a "global" command is given the name of a variable that has If a "global" command is given the name of a variable that has
previously been defined in the immediate script with "set", an error previously been defined in the immediate script with "set", an error
MUST be generated either when the script is uploaded or at execution MUST be generated either when the script is uploaded or at execution
time. time.
skipping to change at page 10, line 17 skipping to change at page 10, line 21
if header :contains "Subject" "${test}" if header :contains "Subject" "${test}"
{ {
set "test_mailbox" "spam-${test}"; set "test_mailbox" "spam-${test}";
} }
3.4.2. Variables Namespace global 3.4.2. Variables Namespace global
In addition to the "global" command, this document defines the In addition to the "global" command, this document defines the
variables namespace "global", as specified in VARIABLES [RFC5229], variables namespace "global", as specified in VARIABLES [RFC5229],
Section 3. Section 3. 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).
Example: Example:
require ["variables", "include"]; require ["variables", "include"];
set "global.i_am_on_vacation" "1"; set "global.i_am_on_vacation" "1";
Variables declared global and variables accessed via the global Variables declared global and variables accessed via the global
namespace MUST be one and the same. In the following example script, namespace MUST be one and the same. In the following example script,
we see the variable "i_am_on_vacation" used in a "global" command, we see the variable "i_am_on_vacation" used in a "global" command,
skipping to change at page 12, line 17 skipping to change at page 12, line 26
Appendix A. Acknowledgments Appendix A. Acknowledgments
Thanks to Ken Murchison, Rob Siemborski, Alexey Melnikov, Marc Mutz, Thanks to Ken Murchison, Rob Siemborski, Alexey Melnikov, Marc Mutz,
Kjetil Torgrim Homme, Stephan Bosch, Arnt Gulbrandsen, Barry Leiba, Kjetil Torgrim Homme, Stephan Bosch, Arnt Gulbrandsen, Barry Leiba,
and Jeffrey Hutzelman for comments and corrections. and Jeffrey Hutzelman for comments and corrections.
Appendix B. Change History (to be removed prior to publication as an Appendix B. Change History (to be removed prior to publication as an
RFC) RFC)
Changes from ietf-08 to ietf-09:
a. Better variables language from Stephan Bosch.
Changes from ietf-07 to ietf-08: Changes from ietf-07 to ietf-08:
a. Nits from Stephan Bosch. a. Nits from Stephan Bosch.
b. Nits from Barry Leiba. b. Nits from Barry Leiba.
c. Wordsmithing and layout wrangling. c. Wordsmithing and layout wrangling.
Changes from ietf-06 to ietf-07: Changes from ietf-06 to ietf-07:
 End of changes. 7 change blocks. 
5 lines changed or deleted 16 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/