draft-ietf-sieve-variables-06.txt   draft-ietf-sieve-variables-07.txt 
Network Working Group K. T. Homme Network Working Group K. T. Homme
Updates: 3028 Updates: 3028
Document: draft-ietf-sieve-variables-06.txt University of Oslo Document: draft-ietf-sieve-variables-07.txt University of Oslo
Expires Feb 16, 2006 16 Aug 2005 Expires Apr 14, 2006 14 Oct 2005
Sieve Extension: Variables Sieve Extension: Variables
Status of this Memo Status of this Memo
This document is an Internet-Draft and is subject to all provisions This document is an Internet-Draft and is subject to all provisions
of section 3 of RFC 3978. By submitting this Internet-Draft, each of section 3 of RFC 3978. By submitting this Internet-Draft, each
author represents that any applicable patent or other IPR claims of author represents that any applicable patent or other IPR claims of
which he or she is aware have been or will be disclosed, and any of which he or she is aware have been or will be disclosed, and any of
which he or she becomes aware will be disclosed, in accordance with which he or she becomes aware will be disclosed, in accordance with
skipping to change at page 1, line 39 skipping to change at page 1, line 39
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
Distribution of this memo is unlimited. Distribution of this memo is unlimited.
Abstract Abstract
In advanced filtering rule sets, it is useful to keep state or In advanced mail filtering rule sets, it is useful to keep state or
configuration details across rules. This extension changes the configuration details across rules. This extension to the filtering
interpretation of strings, adds an action to store data in variables, language Sieve changes the interpretation of strings, adds an action
and supplies a new test so that the value of a string can be to store data in variables, and supplies a new test so that the value
examined. of a string can be examined.
0. Meta-information on this draft 0. Meta-information on this draft
This information is intended to facilitate discussion. It will be This information is intended to facilitate discussion. It will be
removed when this document leaves the Internet-Draft stage. removed when this document leaves the Internet-Draft stage.
0.1. Discussion 0.1. Discussion
This draft is intended to be an extension to the Sieve mail filtering This draft is intended to be an extension to the Sieve mail filtering
language, available from the RFC repository as language, available from the RFC repository as
skipping to change at page 5, line 46 skipping to change at page 5, line 46
f) changed name of document to align better with other extensions f) changed name of document to align better with other extensions
(uses same format at 3431 and 3894) (uses same format at 3431 and 3894)
0.2.11. Changes since -05 0.2.11. Changes since -05
a) removed "open issues" section. a) removed "open issues" section.
b) updated [RELATIONAL] reference b) updated [RELATIONAL] reference
0.2.12. Changes since -06
a) updated abstract to mention what this document extends.
b) changed default scoping behaviour in anticipation of "include"
extension.
c) updated reference to RFC 2234.
d) clarified whitespace stripping behaviour for "string" test.
1. Introduction 1. Introduction
This is an extension to the Sieve language defined by [SIEVE]. It This is an extension to the Sieve language defined by [SIEVE]. It
adds support for storing and referencing named data. The mechanisms adds support for storing and referencing named data. The mechanisms
detailed in this document will only apply to Sieve scripts that detailed in this document will only apply to Sieve scripts that
include a require clause for the "variables" extension. The require include a require clause for the "variables" extension. The require
clauses themselves are not affected by this extension. clauses themselves are not affected by this extension.
Conventions for notations are as in [SIEVE] section 1.1, including Conventions for notations are as in [SIEVE] section 1.1, including
use of [KEYWORDS] and [ABNF]. The grammar builds on the grammar of use of [KEYWORDS] and [ABNF]. The grammar builds on the grammar of
skipping to change at page 9, line 29 skipping to change at page 9, line 42
to the syntax of variable-name. Match variables can not be set. A to the syntax of variable-name. Match variables can not be set. A
namespace can not be used unless an extension explicitly allows its namespace can not be used unless an extension explicitly allows its
use in "set". An invalid name MUST be detected as a syntax error. use in "set". An invalid name MUST be detected as a syntax error.
Modifiers are applied on a value before it is stored in the variable. Modifiers are applied on a value before it is stored in the variable.
See next section for details. See next section for details.
The default comparator is "i;ascii-casemap". The comparator only The default comparator is "i;ascii-casemap". The comparator only
affects the result when certain modifiers are used. affects the result when certain modifiers are used.
All variables have global scope: they are visible until processing Variables are only visible to the currently running script. Note:
stops. Variable names are case insensitive. Future extensions may provide different scoping rules for variables.
Variable names are case insensitive.
Example: Example:
set "honorific" "Mr"; set "honorific" "Mr";
set "first_name" "Wile"; set "first_name" "Wile";
set "last_name" "Coyote"; set "last_name" "Coyote";
set "vacation" text: set "vacation" text:
Dear ${HONORIFIC} ${last_name}, Dear ${HONORIFIC} ${last_name},
I'm out, please leave a message after the meep. I'm out, please leave a message after the meep.
. .
; ;
skipping to change at page 11, line 40 skipping to change at page 12, line 13
unchanged. unchanged.
5. Test string 5. Test string
Usage: string [MATCH-TYPE] [COMPARATOR] Usage: string [MATCH-TYPE] [COMPARATOR]
<source: string-list> <key-list: string-list> <source: string-list> <key-list: string-list>
The "string" test evaluates to true if any of the source strings The "string" test evaluates to true if any of the source strings
matches any key. The type of match defaults to ":is". matches any key. The type of match defaults to ":is".
In the "string" test, both source and key-list are taken from the
script, not the message, and whitespace stripping MUST NOT be done
unless the script explicitly requests this through some future
mechanism.
Example: Example:
set "state" "${state} pending"; set "state" "${state} pending";
if string :matches " ${state} " "* pending *" { if string :matches " ${state} " "* pending *" {
# the above test always succeeds # the above test always succeeds
} }
The "relational" extension [RELATIONAL] adds a match type called The "relational" extension [RELATIONAL] adds a match type called
":count". The count of a single string is 0 if it is the empty ":count". The count of a single string is 0 if it is the empty
string, or 1 otherwise. The count of a string list is the sum of the string, or 1 otherwise. The count of a string list is the sum of the
counts of the member strings. counts of the member strings.
skipping to change at page 13, line 28 skipping to change at page 14, line 4
Thanks to Cyrus Daboo, Jutta Degener, Ned Freed, Lawrence Greenfield, Thanks to Cyrus Daboo, Jutta Degener, Ned Freed, Lawrence Greenfield,
Jeffrey Hutzelman, Mark E. Mallett, Alexey Melnikov, Peder Stray and Jeffrey Hutzelman, Mark E. Mallett, Alexey Melnikov, Peder Stray and
Nigel Swinson for valuable feedback. Nigel Swinson for valuable feedback.
10. Author's Address 10. Author's Address
Kjetil T. Homme Kjetil T. Homme
University of Oslo University of Oslo
PO Box 1080 PO Box 1080
0316 Oslo, Norway 0316 Oslo, Norway
Phone: +47 9366 0091 Phone: +47 9366 0091
E-mail: kjetilho@ifi.uio.no E-mail: kjetilho@ifi.uio.no
11. References 11. References
11.1. Normative references 11.1. Normative references
[ABNF] Crocker, D. and Overell, P., "Augmented BNF for Syntax [ABNF] Crocker, D. and Overell, P., "Augmented BNF for Syntax
Specifications: ABNF", RFC 2234, November 1997. Specifications: ABNF", Work in Progress, draft-
crocker-abnf-rfc2234bis-XX.txt
[KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", RFC 2119, March 1997. Requirement Levels", RFC 2119, March 1997.
[RELATIONAL] Leiba, B. and Segmuller, W., "Sieve Extension: [RELATIONAL] Leiba, B. and Segmuller, W., "Sieve Extension:
Relational Tests", Work in Progress, draft-ietf- Relational Tests", Work in Progress, draft-ietf-
sieve-3431bis-XX.txt sieve-3431bis-XX.txt
[SIEVE] Guenther, P. and Showalter, T., "Sieve: An Email [SIEVE] Guenther, P. and Showalter, T., "Sieve: An Email
Filtering Language", Work in Progress, draft-ietf- Filtering Language", Work in Progress, draft-ietf-
 End of changes. 7 change blocks. 
11 lines changed or deleted 29 lines changed or added

This html diff was produced by rfcdiff 1.27, available from http://www.levkowetz.com/ietf/tools/rfcdiff/