draft-ietf-sieve-3028bis-07.txt   draft-ietf-sieve-3028bis-08.txt 
Network Working Group P. Guenther Network Working Group P. Guenther
Internet-Draft Sendmail, Inc. Internet-Draft Sendmail, Inc.
Expires: December 2006 T. Showalter Expires: January 2007 T. Showalter
Obsoletes: 3028 (if approved) Editors Obsoletes: 3028 (if approved) Editors
Sieve: An Email Filtering Language Sieve: An Email Filtering Language
draft-ietf-sieve-3028bis-07.txt draft-ietf-sieve-3028bis-08.txt
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware 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 becomes have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79. aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
skipping to change at page 2, line 15 skipping to change at page 2, line 15
system. It is suitable for running on a mail server where users may system. It is suitable for running on a mail server where users may
not be allowed to execute arbitrary programs, such as on black box not be allowed to execute arbitrary programs, such as on black box
Internet Message Access Protocol (IMAP) servers, as it has no Internet Message Access Protocol (IMAP) servers, as it has no
variables, loops, or ability to shell out to external programs. variables, loops, or ability to shell out to external programs.
Table of Contents Table of Contents
1. Introduction ........................................... 3 1. Introduction ........................................... 3
1.1. Conventions Used in This Document ..................... 4 1.1. Conventions Used in This Document ..................... 4
1.2. Example mail messages ................................. 5 1.2. Example mail messages ................................. 5
2. Design ................................................. 5 2. Design ................................................. 6
2.1. Form of the Language .................................. 6 2.1. Form of the Language .................................. 6
2.2. Whitespace ............................................ 6 2.2. Whitespace ............................................ 6
2.3. Comments .............................................. 6 2.3. Comments .............................................. 6
2.4. Literal Data .......................................... 6 2.4. Literal Data .......................................... 6
2.4.1. Numbers ............................................... 6 2.4.1. Numbers ............................................... 7
2.4.2. Strings ............................................... 7 2.4.2. Strings ............................................... 7
2.4.2.1. String Lists .......................................... 8 2.4.2.1. String Lists .......................................... 8
2.4.2.2. Headers ............................................... 8 2.4.2.2. Headers ............................................... 8
2.4.2.3. Addresses ............................................. 8 2.4.2.3. Addresses ............................................. 9
2.5. Tests ................................................. 9 2.5. Tests ................................................. 9
2.5.1. Test Lists ............................................ 9 2.5.1. Test Lists ............................................ 9
2.6. Arguments ............................................. 9 2.6. Arguments ............................................. 9
2.6.1. Positional Arguments .................................. 9 2.6.1. Positional Arguments .................................. 9
2.6.2. Tagged Arguments ...................................... 10 2.6.2. Tagged Arguments ...................................... 10
2.6.3. Optional Arguments .................................... 10 2.6.3. Optional Arguments .................................... 10
2.6.4. Types of Arguments .................................... 10 2.6.4. Types of Arguments .................................... 10
2.7. String Comparison ..................................... 11 2.7. String Comparison ..................................... 11
2.7.1. Match Type ............................................ 11 2.7.1. Match Type ............................................ 11
2.7.2. Comparisons Across Character Sets ..................... 12 2.7.2. Comparisons Across Character Sets ..................... 12
2.7.3. Comparators ........................................... 12 2.7.3. Comparators ........................................... 13
2.7.4. Comparisons Against Addresses ......................... 14 2.7.4. Comparisons Against Addresses ......................... 14
2.8. Blocks ................................................ 14 2.8. Blocks ................................................ 14
2.9. Commands .............................................. 14 2.9. Commands .............................................. 15
2.10. Evaluation ............................................ 15 2.10. Evaluation ............................................ 15
2.10.1. Action Interaction .................................... 15 2.10.1. Action Interaction .................................... 15
2.10.2. Implicit Keep ......................................... 15 2.10.2. Implicit Keep ......................................... 15
2.10.3. Message Uniqueness in a Mailbox ....................... 16 2.10.3. Message Uniqueness in a Mailbox ....................... 16
2.10.4. Limits on Numbers of Actions .......................... 16 2.10.4. Limits on Numbers of Actions .......................... 16
2.10.5. Extensions and Optional Features ...................... 16 2.10.5. Extensions and Optional Features ...................... 16
2.10.6. Errors ................................................ 17 2.10.6. Errors ................................................ 17
2.10.7. Limits on Execution ................................... 17 2.10.7. Limits on Execution ................................... 17
3. Control Commands ....................................... 17 3. Control Commands ....................................... 18
3.1. Control If ............................................ 18 3.1. Control If ............................................ 18
3.2. Control Require ....................................... 19 3.2. Control Require ....................................... 19
3.3. Control Stop .......................................... 19 3.3. Control Stop .......................................... 19
4. Action Commands ........................................ 19 4. Action Commands ........................................ 19
4.1. Action fileinto ....................................... 20 4.1. Action fileinto ....................................... 20
4.2. Action redirect ....................................... 20 4.2. Action redirect ....................................... 20
4.3. Action keep ........................................... 20 4.3. Action keep ........................................... 21
4.4. Action discard ........................................ 21 4.4. Action discard ........................................ 21
5. Test Commands .......................................... 21 5. Test Commands .......................................... 22
5.1. Test address .......................................... 22 5.1. Test address .......................................... 22
5.2. Test allof ............................................ 22 5.2. Test allof ............................................ 23
5.3. Test anyof ............................................ 23 5.3. Test anyof ............................................ 23
5.4. Test envelope ......................................... 23 5.4. Test envelope ......................................... 23
5.5. Test exists ........................................... 24 5.5. Test exists ........................................... 24
5.6. Test false ............................................ 24 5.6. Test false ............................................ 25
5.7. Test header ........................................... 24 5.7. Test header ........................................... 25
5.8. Test not .............................................. 25 5.8. Test not .............................................. 25
5.9. Test size ............................................. 25 5.9. Test size ............................................. 26
5.10. Test true ............................................. 25 5.10. Test true ............................................. 26
6. Extensibility .......................................... 25 6. Extensibility .......................................... 26
6.1. Capability String ..................................... 26 6.1. Capability String ..................................... 27
6.2. IANA Considerations ................................... 26 6.2. IANA Considerations ................................... 27
6.2.1. Template for Capability Registrations ................. 27 6.2.1. Template for Capability Registrations ................. 27
6.2.2. Initial Capability Registrations ...................... 27 6.2.2. Handling of Existing Capability Registrations ......... 28
6.2.3. Initial Capability Registrations ...................... 28
6.3. Capability Transport .................................. 28 6.3. Capability Transport .................................. 28
7. Transmission ........................................... 28 7. Transmission ........................................... 29
8. Parsing ................................................ 29 8. Parsing ................................................ 29
8.1. Lexical Tokens ........................................ 29 8.1. Lexical Tokens ........................................ 29
8.2. Grammar ............................................... 31 8.2. Grammar ............................................... 32
9. Extended Example ....................................... 31 9. Extended Example ....................................... 32
10. Security Considerations ................................ 32 10. Security Considerations ................................ 33
11. Acknowledgments ........................................ 33 11. Acknowledgments ........................................ 34
12. Editor's Address ....................................... 33 12. Editor's Address ....................................... 34
13. Normative References ................................... 33 13. Normative References ................................... 34
14. Informative References ................................. 34 14. Informative References ................................. 35
14. Full Copyright Statement ............................... 34 15. Changes from RFC 3028 .................................. 35
16. Full Copyright Statement ............................... 35
1. Introduction 1. Introduction
This memo documents a language that can be used to create filters for This memo documents a language that can be used to create filters for
electronic mail. It is not tied to any particular operating system electronic mail. It is not tied to any particular operating system
or mail architecture. It requires the use of [IMAIL]-compliant or mail architecture. It requires the use of [IMAIL]-compliant
messages, but should otherwise generalize to many systems. messages, but should otherwise generalize to many systems.
The language is powerful enough to be useful but limited in order to The language is powerful enough to be useful but limited in order to
allow for a safe server-side filtering system. The intention is to allow for a safe server-side filtering system. The intention is to
skipping to change at page 6, line 13 skipping to change at page 6, line 15
2. Design 2. Design
2.1. Form of the Language 2.1. Form of the Language
The language consists of a set of commands. Each command consists of The language consists of a set of commands. Each command consists of
a set of tokens delimited by whitespace. The command identifier is a set of tokens delimited by whitespace. The command identifier is
the first token and it is followed by zero or more argument tokens. the first token and it is followed by zero or more argument tokens.
Arguments may be literal data, tags, blocks of commands, or test Arguments may be literal data, tags, blocks of commands, or test
commands. commands.
The language is represented in UTF-8, as specified in [UTF-8]. With the exceptions of strings and comments, the language is limited
to US-ASCII characters. Strings and comments may contain octets
outside the US-ASCII range. Specifically, they will normally be in
UTF-8, as specified in [UTF-8]. NUL (US-ASCII 0) is never permitted
in scripts, while CR and LF can only appear as the CRLF line ending.
Tokens in the US-ASCII range are considered case-insensitive. Tokens other than strings are considered case-insensitive.
2.2. Whitespace 2.2. Whitespace
Whitespace is used to separate tokens. Whitespace is made up of Whitespace is used to separate tokens. Whitespace is made up of
tabs, newlines (CRLF, never just CR or LF), and the space character. tabs, newlines (CRLF, never just CR or LF), and the space character.
The amount of whitespace used is not significant. The amount of whitespace used is not significant.
2.3. Comments 2.3. Comments
Two types of comments are offered. Comments are semantically Two types of comments are offered. Comments are semantically
skipping to change at page 7, line 36 skipping to change at page 7, line 42
A quoted string starts and ends with a single double quote (the <"> A quoted string starts and ends with a single double quote (the <">
character, US-ASCII 34). A backslash ("\", ASCII 92) inside of a character, US-ASCII 34). A backslash ("\", ASCII 92) inside of a
quoted string is followed by either another backslash or a double quoted string is followed by either another backslash or a double
quote. This two-character sequence represents a single backslash or quote. This two-character sequence represents a single backslash or
double- quote within the string, respectively. double- quote within the string, respectively.
Scripts SHOULD NOT escape other characters with a backslash. Scripts SHOULD NOT escape other characters with a backslash.
An undefined escape sequence (such as "\a" in a context where "a" has An undefined escape sequence (such as "\a" in a context where "a" has
no special meaning) is interpreted as if there were no backslash (in no special meaning) is interpreted as if there were no backslash (in
this case, "\a" is just "a"). this case, "\a" is just "a"), though that may be changed by
extensions.
Non-printing characters such as tabs, CR and LF, and control Non-printing characters such as tabs, CRLF, and control characters
characters are permitted in quoted strings. Quoted strings MAY span are permitted in quoted strings. Quoted strings MAY span multiple
multiple lines. NUL (US-ASCII 0) is not allowed in strings. lines. NUL (US-ASCII 0) is not allowed in strings.
As messages header data is converted to [UTF-8] for comparison (see
section 2.7.2), most strings will use the UTF-8 encoding. However,
implementations MUST accept all strings that match the grammar in
section 8. The ability to use non-UTF-8 encoded strings matches
existing practice and has proven to be useful both in tests for
invalid data and in arguments containing raw MIME parts for extension
actions that generate outgoing messages.
For entering larger amounts of text, such as an email message, a For entering larger amounts of text, such as an email message, a
multi-line form is allowed. It starts with the keyword "text:", multi-line form is allowed. It starts with the keyword "text:",
followed by a CRLF, and ends with the sequence of a CRLF, a single followed by a CRLF, and ends with the sequence of a CRLF, a single
period, and another CRLF. In order to allow the message to contain period, and another CRLF. In order to allow the message to contain
lines with a single-dot, lines are dot-stuffed. That is, when lines with a single-dot, lines are dot-stuffed. That is, when
composing a message body, an extra `.' is added before each line composing a message body, an extra `.' is added before each line
which begins with a `.'. When the server interprets the script, which begins with a `.'. When the server interprets the script,
these extra dots are removed. Note that a line that begins with a these extra dots are removed. Note that a line that begins with a
dot followed by a non-dot character is not interpreted dot-stuffed; dot followed by a non-dot character is not interpreted dot-stuffed;
skipping to change at page 9, line 44 skipping to change at page 10, line 11
Example: if anyof (not exists ["From", "Date"], Example: if anyof (not exists ["From", "Date"],
header :contains "from" "fool@example.edu") { header :contains "from" "fool@example.edu") {
discard; discard;
} }
2.6. Arguments 2.6. Arguments
In order to specify what to do, most commands take arguments. There In order to specify what to do, most commands take arguments. There
are three types of arguments: positional, tagged, and optional. are three types of arguments: positional, tagged, and optional.
It is an error for a script, on a single command, to use conflicting
arguments or to use a tagged or optional argument more than once.
2.6.1. Positional Arguments 2.6.1. Positional Arguments
Positional arguments are given to a command which discerns their Positional arguments are given to a command which discerns their
meaning based on their order. When a command takes positional meaning based on their order. When a command takes positional
arguments, all positional arguments must be supplied and must be in arguments, all positional arguments must be supplied and must be in
the order prescribed. the order prescribed.
2.6.2. Tagged Arguments 2.6.2. Tagged Arguments
This document provides for tagged arguments in the style of This document provides for tagged arguments in the style of
CommonLISP. These are also similar to flags given to commands in CommonLISP. These are also similar to flags given to commands in
most command-line systems. most command-line systems.
A tagged argument is an argument for a command that begins with ":" A tagged argument is an argument for a command that begins with ":"
followed by a tag naming the argument, such as ":contains". This followed by a tag naming the argument, such as ":contains". This
argument means that zero or more of the next tokens have some argument means that zero or more of the next tokens have some
particular meaning depending on the argument. These next tokens may particular meaning depending on the argument. These next tokens may
be numbers or strings but they are never blocks. be numbers or strings but they are never blocks.
skipping to change at page 11, line 31 skipping to change at page 11, line 50
comparisons, because this is the way things are defined in the comparisons, because this is the way things are defined in the
message specification [IMAIL]. message specification [IMAIL].
2.7.1. Match Type 2.7.1. Match Type
There are three match types describing the matching used in this There are three match types describing the matching used in this
specification: ":is", ":contains", and ":matches". Match type specification: ":is", ":contains", and ":matches". Match type
arguments are supplied to those commands which allow them to specify arguments are supplied to those commands which allow them to specify
what kind of match is to be performed. what kind of match is to be performed.
These are used as tagged arguments to tests that perform string These are used as optional arguments to tests that perform string
comparison. comparison.
The ":contains" match type describes a substring match. If the value The ":contains" match type describes a substring match. If the value
argument contains the key argument as a substring, the match is true. argument contains the key argument as a substring, the match is true.
For instance, the string "frobnitzm" contains "frob" and "nit", but For instance, the string "frobnitzm" contains "frob" and "nit", but
not "fbm". The empty key ("") is contained in all values. not "fbm". The empty key ("") is contained in all values.
The ":is" match type describes an absolute match; if the contents of The ":is" match type describes an absolute match; if the contents of
the first string are absolutely the same as the contents of the the first string are absolutely the same as the contents of the
second string, they match. Only the string "frobnitzm" is the string second string, they match. Only the string "frobnitzm" is the string
skipping to change at page 12, line 13 skipping to change at page 12, line 32
in use. In contrast, the comparator "i;basic;uca=3.1.1;uv=3.2" in use. In contrast, the comparator "i;basic;uca=3.1.1;uv=3.2"
defines a character to be any UTF-8 octet sequence encoding one defines a character to be any UTF-8 octet sequence encoding one
Unicode character and thus "?" may match more than one octet. "?" Unicode character and thus "?" may match more than one octet. "?"
and "*" may be escaped as "\\?" and "\\*" in strings to match against and "*" may be escaped as "\\?" and "\\*" in strings to match against
themselves. The first backslash escapes the second backslash; themselves. The first backslash escapes the second backslash;
together, they escape the "*". This is awkward, but it is together, they escape the "*". This is awkward, but it is
commonplace in several programming languages that use globs and commonplace in several programming languages that use globs and
regular expressions. regular expressions.
In order to specify what type of match is supposed to happen, In order to specify what type of match is supposed to happen,
commands that support matching take optional tagged arguments commands that support matching take optional arguments ":matches",
":matches", ":is", and ":contains". Commands default to using ":is" ":is", and ":contains". Commands default to using ":is" matching if
matching if no match type argument is supplied. Note that these no match type argument is supplied. Note that these modifiers
modifiers interact with comparators; in particular, only comparators interact with comparators; in particular, only comparators that
that support the "substring match" operation are suitable for support the "substring match" operation are suitable for matching
matching with ":contains" or ":matches". It is an error to use a with ":contains" or ":matches". It is an error to use a comparator
comparator with ":contains" or ":matches" that is not compatible with with ":contains" or ":matches" that is not compatible with it.
it.
It is an error to give more than one of these arguments to a given It is an error to give more than one of these arguments to a given
command. command.
For convenience, the "MATCH-TYPE" syntax element is defined here as For convenience, the "MATCH-TYPE" syntax element is defined here as
follows: follows:
Syntax: ":is" / ":contains" / ":matches" Syntax: ":is" / ":contains" / ":matches"
2.7.2. Comparisons Across Character Sets 2.7.2. Comparisons Across Character Sets
All Sieve scripts are represented in UTF-8, but messages may involve Messages may involve a number of character sets. In order for
a number of character sets. In order for comparisons to work across comparisons to work across character sets, implementations SHOULD
character sets, implementations SHOULD implement the following implement the following behavior:
behavior:
Comparisons are performed on octets. Implementations convert text Comparisons are performed on octets. Implementations convert text
from header fields in all charsets [MIME3] to Unicode, encoded as from header fields in all charsets [MIME3] to Unicode, encoded as
UTF-8, as input to the comparator (see 2.7.3). Implementations UTF-8, as input to the comparator (see 2.7.3). Implementations
MUST be capable of converting US-ASCII, ISO-8859-1, the US-ASCII MUST be capable of converting US-ASCII, ISO-8859-1, the US-ASCII
subset of ISO-8859-* character sets, and UTF-8. Text that the subset of ISO-8859-* character sets, and UTF-8. Text that the
implementation cannot convert to Unicode for any reason MAY be implementation cannot convert to Unicode for any reason MAY be
treated as plain US-ASCII (including any [MIME3] syntax) or treated as plain US-ASCII (including any [MIME3] syntax) or
processed according to local conventions. An encoded NUL octet processed according to local conventions. An encoded NUL octet
(character zero) SHOULD NOT cause early termination of the header (character zero) SHOULD NOT cause early termination of the header
skipping to change at page 28, line 13 skipping to change at page 28, line 25
To: iana@iana.org To: iana@iana.org
Subject: Registration of new Sieve extension Subject: Registration of new Sieve extension
Capability name: [the string for use in the 'require' statement] Capability name: [the string for use in the 'require' statement]
Description: [a brief description of what the extension adds Description: [a brief description of what the extension adds
or changes] or changes]
RFC number: [for extensions published as RFCs] RFC number: [for extensions published as RFCs]
Contact address: [email and/or physical address to contact for Contact address: [email and/or physical address to contact for
additional information] additional information]
6.2.2. Initial Capability Registrations 6.2.2. Handling of Existing Capability Registrations
In order to bring the existing capability registrations in line with
the new template, IANA is asked to modify each as follows:
1. The "capability name" and "capability arguments" fields
should be eliminated
2. The "capability keyword" field should be renamed to "Capability
name"
3. An empty "Description" field should be added
4. The "Standards Track/IESG-approved experimental RFC number" field
should be renamed to "RFC number"
5. The "Person and email address to contact for further information"
field should be renamed to "Contact address"
6.2.3. Initial Capability Registrations
This RFC updates the the following entries in the IANA registry for This RFC updates the the following entries in the IANA registry for
Sieve extensions. Sieve extensions.
Capability name: fileinto Capability name: fileinto
Description: adds the 'fileinto' action Description: adds the 'fileinto' action for delivering to a
folder other than the default
RFC number: this RFC (Sieve base spec) RFC number: this RFC (Sieve base spec)
Contact address: The Sieve discussion list <ietf-mta-filters@imc.org> Contact address: The Sieve discussion list <ietf-mta-filters@imc.org>
Capability name: envelope Capability name: envelope
Description: adds the 'envelope' test Description: adds the 'envelope' test for testing the message
transport sender and recipient address
RFC number: this RFC (Sieve base spec) RFC number: this RFC (Sieve base spec)
Contact address: The Sieve discussion list <ietf-mta-filters@imc.org> Contact address: The Sieve discussion list <ietf-mta-filters@imc.org>
Capability name: comparator-* (anything starting with "comparator-") Capability name: comparator-* (anything starting with "comparator-")
Description: adds the indication comparator for use with the Description: adds the indicated comparator for use with the
:comparator argument :comparator argument
RFC number: this RFC (Sieve base spec) RFC number: this RFC (Sieve base spec)
Contact address: The Sieve discussion list <ietf-mta-filters@imc.org> Contact address: The Sieve discussion list <ietf-mta-filters@imc.org>
6.3. Capability Transport 6.3. Capability Transport
As the range of mail systems that this document is intended to apply As the range of mail systems that this document is intended to apply
to is quite varied, a method of advertising which capabilities an to is quite varied, a method of advertising which capabilities an
implementation supports is difficult due to the wide range of implementation supports is difficult due to the wide range of
possible implementations. Such a mechanism, however, should have the possible implementations. Such a mechanism, however, should have the
skipping to change at page 30, line 20 skipping to change at page 30, line 50
bracket-comment = "/*" *not-star 1*STAR bracket-comment = "/*" *not-star 1*STAR
*(not-star-slash *not-star 1*STAR) "/" *(not-star-slash *not-star 1*STAR) "/"
; No */ allowed inside a comment. ; No */ allowed inside a comment.
; (No * is allowed unless it is the last ; (No * is allowed unless it is the last
; character, or unless it is followed by a ; character, or unless it is followed by a
; character that isn't a slash.) ; character that isn't a slash.)
comment = bracket-comment / hash-comment comment = bracket-comment / hash-comment
hash-comment = "#" *not-crlf CRLF hash-comment = "#" *octet-not-crlf CRLF
identifier = (ALPHA / "_") *(ALPHA / DIGIT / "_") identifier = (ALPHA / "_") *(ALPHA / DIGIT / "_")
multi-line = "text:" *(SP / HTAB) (hash-comment / CRLF) multi-line = "text:" *(SP / HTAB) (hash-comment / CRLF)
*(multiline-literal / multiline-dotstuff) *(multiline-literal / multiline-dotstuff)
"." CRLF "." CRLF
multiline-literal = [octet-not-period *octet-not-crlf] CRLF multiline-literal = [octet-not-period *octet-not-crlf] CRLF
multiline-dotstuff = "." 1*octet-not-crlf CRLF multiline-dotstuff = "." 1*octet-not-crlf CRLF
; A line containing only "." ends the ; A line containing only "." ends the
; multi-line. Remove a leading '.' if ; multi-line. Remove a leading '.' if
; followed by another '.'. ; followed by another '.'.
skipping to change at page 30, line 35 skipping to change at page 31, line 15
*(multiline-literal / multiline-dotstuff) *(multiline-literal / multiline-dotstuff)
"." CRLF "." CRLF
multiline-literal = [octet-not-period *octet-not-crlf] CRLF multiline-literal = [octet-not-period *octet-not-crlf] CRLF
multiline-dotstuff = "." 1*octet-not-crlf CRLF multiline-dotstuff = "." 1*octet-not-crlf CRLF
; A line containing only "." ends the ; A line containing only "." ends the
; multi-line. Remove a leading '.' if ; multi-line. Remove a leading '.' if
; followed by another '.'. ; followed by another '.'.
not-crlf = %x01-09 / %x0B-0C / %x0E-7F / not-star = CRLF / %x01-09 / %x0B-0C / %x0E-29 / %x2B-FF /
UTF8-2 / UTF8-3 / UTF8-4 ; either a CRLF pair, OR a single octet
; a single UTF-8 character other than NUL, ; other than NUL, CR, LF, or star
; CR, or LF
not-star = CRLF / %x01-09 / %x0B-0C / %x0E-29 / %x2B-7F /
UTF8-2 / UTF8-3 / UTF8-4
; either a CRLF pair, OR a single UTF-8
; character other than NUL, CR, LF, or star
not-star-or-slash = CRLF / %x01-09 / %x0B-0C / %x0E-29 / %x2B-2E / not-star-slash = CRLF / %x01-09 / %x0B-0C / %x0E-29 / %x2B-2E /
%x30-7F / UTF8-2 / UTF8-3 / UTF8-4 %x30-FF
; either a CRLF pair, OR a single UTF-8 ; either a CRLF pair, OR a single octet
; character other than NUL, CR, LF, star, ; other than NUL, CR, LF, star, or slash
; or slash
number = 1*DIGIT [ QUANTIFIER ] number = 1*DIGIT [ QUANTIFIER ]
octet-not-crlf = %x01-09 / %x0B-0C / %x0E-FF octet-not-crlf = %x01-09 / %x0B-0C / %x0E-FF
; a single octet other than NUL, CR, or LF ; a single octet other than NUL, CR, or LF
octet-not-period = %x01-09 / %x0B-0C / %x0E-2D / %x2F-FF octet-not-period = %x01-09 / %x0B-0C / %x0E-2D / %x2F-FF
; a single octet other than NUL, ; a single octet other than NUL,
; CR, LF, or period ; CR, LF, or period
octet-not-qspecial = %x01-09 / %x0B-0C / %x0E-21 / %x23-5B / %x5D-FF octet-not-qspecial = %x01-09 / %x0B-0C / %x0E-21 / %x23-5B / %x5D-FF
; a single octet other than NUL, ; a single octet other than NUL,
; CR, LF, double-quote, or backslash ; CR, LF, double-quote, or backslash
skipping to change at page 31, line 22 skipping to change at page 31, line 44
; a single octet other than NUL, ; a single octet other than NUL,
; CR, LF, double-quote, or backslash ; CR, LF, double-quote, or backslash
QUANTIFIER = "K" / "M" / "G" QUANTIFIER = "K" / "M" / "G"
quoted-other = "\" octet-not-qspecial quoted-other = "\" octet-not-qspecial
; represents just the octet-no-qspecial ; represents just the octet-no-qspecial
; character. SHOULD NOT be used ; character. SHOULD NOT be used
quoted-safe = CRLF / octet-not-qspecial quoted-safe = CRLF / octet-not-qspecial
; either a CRLF pair, OR a single UTF-8 ; either a CRLF pair, OR a single octet other
; character other than NUL, CR, LF, ; than NUL, CR, LF, double-quote, or backslash
; double-quote, or backslash
quoted-special = "\" ( DQUOTE / "\" ) quoted-special = "\" ( DQUOTE / "\" )
; represents just a double-quote or backslash ; represents just a double-quote or backslash
quoted-string = DQUOTE quoted-text DQUOTE quoted-string = DQUOTE quoted-text DQUOTE
quoted-text = *(quoted-safe / quoted-special / quoted-other) quoted-text = *(quoted-safe / quoted-special / quoted-other)
STAR = "*" STAR = "*"
tag = ":" identifier tag = ":" identifier
white-space = 1*(SP / CRLF / HTAB) / comment white-space = 1*(SP / CRLF / HTAB) / comment
8.2. Grammar 8.2. Grammar
skipping to change at page 35, line 6 skipping to change at page 35, line 28
Extensions (MIME) Part One: Format of Internet Extensions (MIME) Part One: Format of Internet
Message Bodies", RFC 2045, November 1996. Message Bodies", RFC 2045, November 1996.
[MIME3] Moore, K., "MIME (Multipurpose Internet Mail Extensions) [MIME3] Moore, K., "MIME (Multipurpose Internet Mail Extensions)
Part Three: Message Header Extensions for Non-ASCII Part Three: Message Header Extensions for Non-ASCII
Text", RFC 2047, November 1996 Text", RFC 2047, November 1996
[MDN] T. Hansen, Ed., G. Vaudreuil, Ed., "Message Disposition [MDN] T. Hansen, Ed., G. Vaudreuil, Ed., "Message Disposition
Notification", RFC 3798, May 2004. Notification", RFC 3798, May 2004.
[RFC3028] Showalter, T., "Sieve: A Mail Filtering Language", RFC
3028, January 2001.
[SMTP] J. Klensin, Ed., "Simple Mail Transfer Protocol", RFC [SMTP] J. Klensin, Ed., "Simple Mail Transfer Protocol", RFC
2821, April 2001. 2821, April 2001.
[UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO
10646", RFC 3629, November 2003. 10646", RFC 3629, November 2003.
14. Informative References 14. Informative References
[BINARY-SI] "Standard IEC 60027-2: Letter symbols to be used in [BINARY-SI] "Standard IEC 60027-2: Letter symbols to be used in
electrical technology - Part 2: Telecommunications and electrical technology - Part 2: Telecommunications and
skipping to change at page 35, line 34 skipping to change at page 36, line 11
System", Int. J. of Man-Machine Studies, April, 1991. System", Int. J. of Man-Machine Studies, April, 1991.
Reprinted in Computer-Supported Cooperative Work and Reprinted in Computer-Supported Cooperative Work and
Groupware, Saul Greenberg, editor, Harcourt Brace Groupware, Saul Greenberg, editor, Harcourt Brace
Jovanovich, 1991. Reprinted in Readings in Groupware and Jovanovich, 1991. Reprinted in Readings in Groupware and
Computer-Supported Cooperative Work, Ronald Baecker, Computer-Supported Cooperative Work, Ronald Baecker,
editor, Morgan Kaufmann, 1993. editor, Morgan Kaufmann, 1993.
[IMAP] Crispin, M., "Internet Message Access Protocol - version [IMAP] Crispin, M., "Internet Message Access Protocol - version
4rev1", RFC 3501, March 2003. 4rev1", RFC 3501, March 2003.
14. Full Copyright Statement 15. Changes from RFC 3028
This following list is a summary of the changes that have been made
in the Sieve language base specification from [RFC3028].
1. Removed ban on tests having side-effects
2. Removed reject extension (will be specified in a separate RFC)
3. Clarified description of comparators to match [COLLATION], the
new base specification for them
4. Require stripping of leading and trailing whitespace in
"header" test
5. Clarified or tightened handling of many minor items, including:
- invalid [MIME3] encoding
- invalid addresses in headers
- invalid header field names in tests
- 'undefined' comparator result
16. Full Copyright Statement
Copyright (C) The Internet Society (2006). Copyright (C) The Internet Society (2006).
This document is subject to the rights, licenses and restrictions This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors contained in BCP 78, and except as set forth therein, the authors
retain all their rights. retain all their rights.
This document and the information contained herein are provided on an This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
skipping to change at page 36, line 33 skipping to change at page 37, line 27
this standard. Please address the information to the IETF at ietf- this standard. Please address the information to the IETF at ietf-
ipr@ietf.org. ipr@ietf.org.
Acknowledgement Acknowledgement
Funding for the RFC Editor function is currently provided by the Funding for the RFC Editor function is currently provided by the
Internet Society. Internet Society.
Append A. Change History Append A. Change History
This section will be replaced with a summary of the changes since RFC This section will be removed when this document leaves the Internet-
3028 when this document leaves the Internet-Draft stage. Draft stage.
Open Issues: Changes from draft-ietf-sieve-3028bis-07.txt
- all existing IANA registrations need to be updated to match the 1. Improve description in the extension registrations
modified template; just list them all here? 2. Give IANA directions on how to massage existing registrations
- does the MIME registration for application/sieve need to be into the new form
updated? 3. Added "Changes from RFC 3028" section
4. Updated pages numbers in table of contents
5. Permit non-UTF-8 octet sequences in comments
6. It's an error to use conflicting or repeated tagged and optional
arguments
7. Update description of script encoding
Changes from draft-ietf-sieve-3028bis-06.txt Changes from draft-ietf-sieve-3028bis-06.txt
1. Tweak wording of how :matches uses character definition 1. Tweak wording of how :matches uses character definition
of comparator of comparator
2. Add security consideration regarding "redirect" as a notification 2. Add security consideration regarding "redirect" as a notification
method method
3. fileinto SHOULD reencode; mention IMAP's mUTF-7 3. fileinto SHOULD reencode; mention IMAP's mUTF-7
4. en;ascii-casemap is gone; switch back to i;ascii-casemap 4. en;ascii-casemap is gone; switch back to i;ascii-casemap
5. Permit non-UTF-8 octet sequences in strings 5. Permit non-UTF-8 octet sequences in strings
6. Sort grammar non-terminals 6. Sort grammar non-terminals
 End of changes. 40 change blocks. 
79 lines changed or deleted 129 lines changed or added

This html diff was produced by rfcdiff 1.32. The latest version is available from http://www.levkowetz.com/ietf/tools/rfcdiff/