draft-ietf-sieve-3028bis-09.txt   draft-ietf-sieve-3028bis-10.txt 
Network Working Group P. Guenther Network Working Group P. Guenther
Internet-Draft Sendmail, Inc. Internet-Draft Sendmail, Inc.
Expires: February 2007 T. Showalter Intended status: Standards Track T. Showalter
Obsoletes: 3028 (if approved) Editors Expires: August 2007 Editors
August 2006 Obsoletes: 3028 (if approved) February 2007
Sieve: An Email Filtering Language Sieve: An Email Filtering Language
draft-ietf-sieve-3028bis-09.txt draft-ietf-sieve-3028bis-10.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 1, line 43 skipping to change at page 1, line 43
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
A revised version of this draft document will be submitted to the RFC A revised version of this draft document will be submitted to the RFC
editor as a Standard Track RFC for the Internet Community. editor as a Standard Track RFC for the Internet Community.
Discussion and suggestions for improvement are requested, and should Discussion and suggestions for improvement are requested, and should
be sent to ietf-mta-filters@imc.org. Distribution of this memo is be sent to ietf-mta-filters@imc.org. Distribution of this memo is
unlimited. unlimited.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2006). Copyright (C) The IETF Trust (2007).
Abstract Abstract
This document describes a language for filtering email messages at This document describes a language for filtering email messages at
time of final delivery. It is designed to be implementable on either time of final delivery. It is designed to be implementable on either
a mail client or mail server. It is meant to be extensible, simple, a mail client or mail server. It is meant to be extensible, simple,
and independent of access protocol, mail architecture, and operating and independent of access protocol, mail architecture, and operating
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 the base language
variables, loops, or ability to shell out to external programs. has no 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 ................................................. 6 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 .......................................... 7
2.4.1. Numbers ............................................... 7 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 ............................................... 9
2.4.2.3. Addresses ............................................. 9 2.4.2.3. Addresses ............................................. 9
2.5. Tests ................................................. 9 2.4.2.4. Encoding characters using "encoded-character" ......... 9
2.5.1. Test Lists ............................................ 9 2.5. Tests ................................................. 10
2.6. Arguments ............................................. 9 2.5.1. Test Lists ............................................ 10
2.6.1. Positional Arguments .................................. 9 2.6. Arguments ............................................. 11
2.6.2. Tagged Arguments ...................................... 10 2.6.1. Positional Arguments .................................. 11
2.6.3. Optional Arguments .................................... 10 2.6.2. Tagged Arguments ...................................... 11
2.6.4. Types of Arguments .................................... 10 2.6.3. Optional Arguments .................................... 12
2.7. String Comparison ..................................... 11 2.6.4. Types of Arguments .................................... 12
2.7.1. Match Type ............................................ 11 2.7. String Comparison ..................................... 12
2.7.2. Comparisons Across Character Sets ..................... 12 2.7.1. Match Type ............................................ 12
2.7.3. Comparators ........................................... 13 2.7.2. Comparisons Across Character Sets ..................... 14
2.7.4. Comparisons Against Addresses ......................... 14 2.7.3. Comparators ........................................... 14
2.8. Blocks ................................................ 14 2.7.4. Comparisons Against Addresses ......................... 15
2.9. Commands .............................................. 15 2.8. Blocks ................................................ 16
2.10. Evaluation ............................................ 15 2.9. Commands .............................................. 16
2.10.1. Action Interaction .................................... 15 2.10. Evaluation ............................................ 17
2.10.2. Implicit Keep ......................................... 15 2.10.1. Action Interaction .................................... 17
2.10.3. Message Uniqueness in a Mailbox ....................... 16 2.10.2. Implicit Keep ......................................... 17
2.10.4. Limits on Numbers of Actions .......................... 16 2.10.3. Message Uniqueness in a Mailbox ....................... 17
2.10.5. Extensions and Optional Features ...................... 16 2.10.4. Limits on Numbers of Actions .......................... 18
2.10.6. Errors ................................................ 17 2.10.5. Extensions and Optional Features ...................... 18
2.10.7. Limits on Execution ................................... 17 2.10.6. Errors ................................................ 18
3. Control Commands ....................................... 18 2.10.7. Limits on Execution ................................... 19
3.1. Control If ............................................ 18 3. Control Commands ....................................... 19
3.2. Control Require ....................................... 19 3.1. Control if ............................................ 19
3.3. Control Stop .......................................... 19 3.2. Control require ....................................... 21
4. Action Commands ........................................ 19 3.3. Control stop .......................................... 21
4.1. Action fileinto ....................................... 20 4. Action Commands ........................................ 21
4.2. Action redirect ....................................... 20 4.1. Action fileinto ....................................... 21
4.3. Action keep ........................................... 21 4.2. Action redirect ....................................... 22
4.4. Action discard ........................................ 21 4.3. Action keep ........................................... 23
5. Test Commands .......................................... 22 4.4. Action discard ........................................ 23
5.1. Test address .......................................... 22 5. Test Commands .......................................... 24
5.2. Test allof ............................................ 23 5.1. Test address .......................................... 24
5.3. Test anyof ............................................ 23 5.2. Test allof ............................................ 25
5.4. Test envelope ......................................... 23 5.3. Test anyof ............................................ 25
5.5. Test exists ........................................... 24 5.4. Test envelope ......................................... 25
5.6. Test false ............................................ 25 5.5. Test exists ........................................... 26
5.7. Test header ........................................... 25 5.6. Test false ............................................ 26
5.8. Test not .............................................. 25 5.7. Test header ........................................... 27
5.9. Test size ............................................. 26 5.8. Test not .............................................. 27
5.10. Test true ............................................. 26 5.9. Test size ............................................. 27
6. Extensibility .......................................... 26 5.10. Test true ............................................. 28
6.1. Capability String ..................................... 27 6. Extensibility .......................................... 28
6.2. IANA Considerations ................................... 27 6.1. Capability String ..................................... 29
6.2.1. Template for Capability Registrations ................. 27 6.2. IANA Considerations ................................... 29
6.2.2. Handling of Existing Capability Registrations ......... 28 6.2.1. Template for Capability Registrations ................. 30
6.2.3. Initial Capability Registrations ...................... 28 6.2.2. Handling of Existing Capability Registrations ......... 30
6.3. Capability Transport .................................. 28 6.2.3. Initial Capability Registrations ...................... 30
7. Transmission ........................................... 29 6.3. Capability Transport .................................. 31
8. Parsing ................................................ 29 7. Transmission ........................................... 31
8.1. Lexical Tokens ........................................ 29 8. Parsing ................................................ 32
8.2. Grammar ............................................... 32 8.1. Lexical Tokens ........................................ 32
9. Extended Example ....................................... 32 8.2. Grammar ............................................... 34
10. Security Considerations ................................ 33 9. Extended Example ....................................... 35
11. Acknowledgments ........................................ 34 10. Security Considerations ................................ 36
12. Editor's Address ....................................... 34 11. Acknowledgments ........................................ 36
13. Normative References ................................... 34 12. Editors' Addresses ..................................... 37
14. Informative References ................................. 35 13. Normative References ................................... 37
15. Changes from RFC 3028 .................................. 35 14. Informative References ................................. 38
16. Full Copyright Statement ............................... 35 15. Changes from RFC 3028 .................................. 39
16. Full Copyright Statement ............................... 40
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
make it impossible for users to do anything more complex (and make it impossible for users to do anything more complex (and
dangerous) than write simple mail filters, along with facilitating dangerous) than write simple mail filters, along with facilitating
the use of GUIs for filter creation and manipulation. The language the use of GUIs for filter creation and manipulation. The base
is not Turing-complete: it provides no way to write a loop or a language is intentionally not Turing-complete: it provides no way to
function and variables are not provided. write a loop or a function and variables are not provided.
Scripts written in Sieve are executed during final delivery, when the Scripts written in Sieve are executed during final delivery, when the
message is moved to the user-accessible mailbox. In systems where message is moved to the user-accessible mailbox. In systems where
the MTA does final delivery, such as traditional Unix mail, it is the Mail Transfer Agent (MTA) does final delivery, such as
reasonable to sort when the MTA deposits mail into the user's traditional Unix mail, it is reasonable to sort when the MTA deposits
mailbox. mail into the user's mailbox.
There are a number of reasons to use a filtering system. Mail There are a number of reasons to use a filtering system. Mail
traffic for most users has been increasing due to increased usage of traffic for most users has been increasing due to increased usage of
email, the emergence of unsolicited email as a form of advertising, email, the emergence of unsolicited email as a form of advertising,
and increased usage of mailing lists. and increased usage of mailing lists.
Experience at Carnegie Mellon has shown that if a filtering system is Experience at Carnegie Mellon has shown that if a filtering system is
made available to users, many will make use of it in order to file made available to users, many will make use of it in order to file
messages from specific users or mailing lists. However, many others messages from specific users or mailing lists. However, many others
did not make use of the Andrew system's FLAMES filtering language did not make use of the Andrew system's FLAMES filtering language
skipping to change at page 4, line 36 skipping to change at page 4, line 38
can be used productively. However, it is expected that GUI-based can be used productively. However, it is expected that GUI-based
editors will be the preferred way of editing filters for a large editors will be the preferred way of editing filters for a large
number of users. number of users.
1.1. Conventions Used in This Document 1.1. Conventions Used in This Document
In the sections of this document that discuss the requirements of In the sections of this document that discuss the requirements of
various keywords and operators, the following conventions have been various keywords and operators, the following conventions have been
adopted. adopted.
The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
in this document are to be interpreted as described in [KEYWORDS]. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [KEYWORDS].
Each section on a command (test, action, or control) has a line Each section on a command (test, action, or control) has a line
labeled "Usage:". This line describes the usage of the command, labeled "Usage:". This line describes the usage of the command,
including its name and its arguments. Required arguments are listed including its name and its arguments. Required arguments are listed
inside angle brackets ("<" and ">"). Optional arguments are listed inside angle brackets ("<" and ">"). Optional arguments are listed
inside square brackets ("[" and "]"). Each argument is followed by inside square brackets ("[" and "]"). Each argument is followed by
its type, so "<key: string>" represents an argument called "key" that its type, so "<key: string>" represents an argument called "key" that
is a string. Literal strings are represented with double-quoted is a string. Literal strings are represented with double-quoted
strings. Alternatives are separated with slashes, and parenthesis strings. Alternatives are separated with slashes, and parenthesis
are used for grouping, similar to [ABNF]. are used for grouping, similar to [ABNF].
In the "Usage:" line, there are three special pieces of syntax that In the "Usage:" line, there are three special pieces of syntax that
are frequently repeated, MATCH-TYPE, COMPARATOR, and ADDRESS-PART. are frequently repeated, MATCH-TYPE, COMPARATOR, and ADDRESS-PART.
These are discussed in sections 2.7.1, 2.7.3, and 2.7.4, These are discussed in sections 2.7.1, 2.7.3, and 2.7.4,
respectively. respectively.
The formal grammar for these commands in section 10 and is the The formal grammar for these commands is defined in section 10 and is
authoritative reference on how to construct commands, but the formal the authoritative reference on how to construct commands, but the
grammar does not specify the order, semantics, number or types of formal grammar does not specify the order, semantics, number or types
arguments to commands, nor the legal command names. The intent is to of arguments to commands, nor the legal command names. The intent is
allow for extension without changing the grammar. to allow for extension without changing the grammar.
1.2. Example mail messages 1.2. Example mail messages
The following mail messages will be used throughout this document in The following mail messages will be used throughout this document in
examples. examples.
Message A Message A
----------------------------------------------------------- -----------------------------------------------------------
Date: Tue, 1 Apr 1997 09:06:31 -0800 (PST) Date: Tue, 1 Apr 1997 09:06:31 -0800 (PST)
From: coyote@desert.example.org From: coyote@desert.example.org
skipping to change at page 5, line 39 skipping to change at page 5, line 43
for you. I'm really sorry for all the problems I've caused for you. I'm really sorry for all the problems I've caused
for you over the years, but I know we can work this out. for you over the years, but I know we can work this out.
-- --
Wile E. Coyote "Super Genius" coyote@desert.example.org Wile E. Coyote "Super Genius" coyote@desert.example.org
----------------------------------------------------------- -----------------------------------------------------------
Message B Message B
----------------------------------------------------------- -----------------------------------------------------------
From: youcouldberich!@reply-by-postal-mail.invalid From: youcouldberich!@reply-by-postal-mail.invalid
Sender: b1ff@de.res.example.com Sender: b1ff@de.res.example.com
To: rube@landru.example.edu To: rube@landru.example.com
Date: Mon, 31 Mar 1997 18:26:10 -0800 Date: Mon, 31 Mar 1997 18:26:10 -0800
Subject: $$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ Subject: $$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$
YOU MAY HAVE ALREADY WON TEN MILLION DOLLARS, BUT I DOUBT YOU MAY HAVE ALREADY WON TEN MILLION DOLLARS, BUT I DOUBT
IT! SO JUST POST THIS TO SIX HUNDRED NEWSGROUPS! IT WILL IT! SO JUST POST THIS TO SIX HUNDRED NEWSGROUPS! IT WILL
GUARANTEE THAT YOU GET AT LEAST FIVE RESPONSES WITH MONEY! GUARANTEE THAT YOU GET AT LEAST FIVE RESPONSES WITH MONEY!
MONEY! MONEY! COLD HARD CASH! YOU WILL RECEIVE OVER MONEY! MONEY! COLD HARD CASH! YOU WILL RECEIVE OVER
$20,000 IN LESS THAN TWO MONTHS! AND IT'S LEGAL!!!!!!!!! $20,000 IN LESS THAN TWO MONTHS! AND IT'S LEGAL!!!!!!!!!
!!!!!!!!!!!!!!!!!!111111111!!!!!!!11111111111!!1 JUST !!!!!!!!!!!!!!!!!!111111111!!!!!!!11111111111!!1 JUST
SEND $5 IN SMALL, UNMARKED BILLS TO THE ADDRESSES BELOW! SEND $5 IN SMALL, UNMARKED BILLS TO THE ADDRESSES BELOW!
skipping to change at page 6, line 21 skipping to change at page 6, line 23
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.
With the exceptions of strings and comments, the language is limited With the exceptions of strings and comments, the language is limited
to US-ASCII characters. Strings and comments may contain octets to US-ASCII characters. Strings and comments may contain octets
outside the US-ASCII range. Specifically, they will normally be in 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 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. in scripts, while CR and LF can only appear as the CRLF line ending.
While this specification permits arbitrary octets to appear in
sieve scripts inside strings and comments, this has made it
difficult to robustly handle sieve scripts in programs that are
sensitive to the encodings used. The "encoded-character"
capability (section 2.4.2.4) provides an alternative means of
representing such octets in strings using just US-ASCII
characters. As such, the use of non-UTF-8 text in scripts should
be considered a deprecated feature that may be abandoned.
Tokens other than strings 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
equivalent to whitespace and can be used anyplace that whitespace is equivalent to whitespace and can be used anyplace that whitespace is
(with one exception in multi-line strings, as described in the (with one exception in multi-line strings, as described in the
grammar). grammar).
Hash comments begin with a "#" character that is not contained within Hash comments begin with a "#" character that is not contained within
a string and continue until the next CRLF. a string and continue until the next CRLF.
Example: if size :over 100K { # this is a comment Example: if size :over 100k { # this is a comment
discard; discard;
} }
Bracketed comments begin with the token "/*" and end with "*/" Bracketed comments begin with the token "/*" and end with "*/"
outside of a string. Bracketed comments may span multiple lines. outside of a string. Bracketed comments may span multiple lines.
Bracketed comments do not nest. Bracketed comments do not nest.
Example: if size :over 100K { /* this is a comment Example: if size :over 100K { /* this is a comment
this is still a comment */ discard /* this is a comment this is still a comment */ discard /* this is a comment
*/ ; */ ;
skipping to change at page 7, line 4 skipping to change at page 7, line 16
Bracketed comments begin with the token "/*" and end with "*/" Bracketed comments begin with the token "/*" and end with "*/"
outside of a string. Bracketed comments may span multiple lines. outside of a string. Bracketed comments may span multiple lines.
Bracketed comments do not nest. Bracketed comments do not nest.
Example: if size :over 100K { /* this is a comment Example: if size :over 100K { /* this is a comment
this is still a comment */ discard /* this is a comment this is still a comment */ discard /* this is a comment
*/ ; */ ;
} }
2.4. Literal Data 2.4. Literal Data
Literal data means data that is not executed, merely evaluated "as Literal data means data that is not executed, merely evaluated "as
is", to be used as arguments to commands. Literal data is limited to is", to be used as arguments to commands. Literal data is limited to
numbers, strings, and string lists. numbers, strings, and string lists.
2.4.1. Numbers 2.4.1. Numbers
Numbers are given as ordinary decimal numbers. However, those Numbers are given as ordinary decimal numbers. As a shorthand for
numbers that have a tendency to be fairly large, such as message expressing larger values, such as message sizes, a suffix of "K",
sizes, MAY have a "K", "M", or "G" appended to indicate a multiple of "M", or "G" MAY be appended to indicate a multiple of a power of two.
a power of two. To be comparable with the power-of-two-based To be comparable with the power-of-two-based versions of SI units
versions of SI units that computers frequently use, K specifies that computers frequently use, "K" specifies kibi-, or 1,024 (2^10)
kibi-, or 1,024 (2^10) times the value of the number; M specifies times the value of the number; "M" specifies mebi-, or 1,048,576
mebi-, or 1,048,576 (2^20) times the value of the number; and G (2^20) times the value of the number; and "G" specifies gibi-, or
specifies gibi-, or 1,073,741,824 (2^30) times the value of the 1,073,741,824 (2^30) times the value of the number [BINARY-SI].
number [BINARY-SI].
Implementations MUST provide 31 bits of magnitude in numbers, but MAY Implementations MUST support integer values in the inclusive range
provide more. zero to 2,147,483,647 (2^31 - 1), but MAY support larger values.
Only positive integers are permitted by this specification. Only non-negative integers are permitted by this specification.
2.4.2. Strings 2.4.2. Strings
Scripts involve large numbers of strings as they are used for pattern Scripts involve large numbers of string values as they are used for
matching, addresses, textual bodies, etc. Typically, short quoted pattern matching, addresses, textual bodies, etc. Typically, short
strings suffice for most uses, but a more convenient form is provided quoted strings suffice for most uses, but a more convenient form is
for longer strings such as bodies of messages. provided for longer strings such as bodies of messages.
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 ("\", US-ASCII 92) inside of a character, US-ASCII 34). A backslash ("\", US-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. These two-character sequences represent a single backslash or
double- quote within the string, respectively. double quote within the value, 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"), though that may be changed by this case, "\a" is just "a"), though that may be changed by
extensions. extensions.
Non-printing characters such as tabs, CRLF, and control characters Non-printing characters such as tabs, CRLF, and control characters
are permitted in quoted strings. Quoted strings MAY span multiple are permitted in quoted strings. Quoted strings MAY span multiple
lines. NUL (US-ASCII 0) is not allowed in strings. lines. NUL (US-ASCII 0) is not allowed in strings.
As message header data is converted to [UTF-8] for comparison (see As message header data is converted to [UTF-8] for comparison (see
section 2.7.2), most strings will use the UTF-8 encoding. However, section 2.7.2), most string values will use the UTF-8 encoding.
implementations MUST accept all strings that match the grammar in However, implementations MUST accept all strings that match the
section 8. The ability to use non-UTF-8 encoded strings matches grammar in section 8. The ability to use non-UTF-8 encoded strings
existing practice and has proven to be useful both in tests for matches existing practice and has proven to be useful both in tests
invalid data and in arguments containing raw MIME parts for extension for invalid data and in arguments containing raw MIME parts for
actions that generate outgoing messages. 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. The CRLF before the final period is period, and another CRLF. The CRLF before the final period is
considered part of the string. In order to allow the message to considered part of the value. In order to allow the message to
contain lines with a single-dot, lines are dot-stuffed. That is, contain lines with a single-dot, lines are dot-stuffed. That is,
when composing a message body, an extra `.' is added before each line when 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;
that is, ".foo" is interpreted as ".foo". However, because this is that is, ".foo" is interpreted as ".foo". However, because this is
potentially ambiguous, scripts SHOULD be properly dot-stuffed so such potentially ambiguous, scripts SHOULD be properly dot-stuffed so such
lines do not appear. lines do not appear.
Note that a hashed comment or whitespace may occur in between the Note that a hashed comment or whitespace may occur in between the
"text:" and the CRLF, but not within the string itself. Bracketed "text:" and the CRLF, but not within the string itself. Bracketed
comments are not allowed here. comments are not allowed here.
2.4.2.1. String Lists 2.4.2.1. String Lists
When matching patterns, it is frequently convenient to match against When matching patterns, it is frequently convenient to match against
groups of strings instead of single strings. For this reason, a list groups of strings instead of single strings. For this reason, a list
of strings is allowed in many tests, implying that if the test is of strings is allowed in many tests, implying that if the test is
true using any one of the strings, then the test is true. true using any one of the strings, then the test is true.
Implementations are encouraged to use short-circuit evaluation in
these cases.
For instance, the test `header :contains ["To", "Cc"] For instance, the test `header :contains ["To", "Cc"]
["me@example.com", "me00@landru.example.edu"]' is true if either a To ["me@example.com", "me00@landru.example.com"]' is true if either a To
header or Cc header of the input message contains either of the email header or Cc header of the input message contains either of the email
addresses "me@example.com" or "me00@landru.example.edu". addresses "me@example.com" or "me00@landru.example.com".
Conversely, in any case where a list of strings is appropriate, a Conversely, in any case where a list of strings is appropriate, a
single string is allowed without being a member of a list: it is single string is allowed without being a member of a list: it is
equivalent to a list with a single member. This means that the test equivalent to a list with a single member. This means that the test
`exists "To"' is equivalent to the test `exists ["To"]'. `exists "To"' is equivalent to the test `exists ["To"]'.
2.4.2.2. Headers 2.4.2.2. Headers
Headers are a subset of strings. In the Internet Message Headers are a subset of strings. In the Internet Message
Specification [IMAIL], each header line is allowed to have whitespace Specification [IMAIL], each header line is allowed to have whitespace
nearly anywhere in the line, including after the field name and nearly anywhere in the line, including after the field name and
before the subsequent colon. Extra spaces between the header name before the subsequent colon. Extra spaces between the header name
and the ":" in a header field are ignored. and the ":" in a header field are ignored.
A header name never contains a colon. The "From" header refers to a A header name never contains a colon. The "From" header refers to a
line beginning "From:" (or "From :", etc.). No header will match line beginning "From:" (or "From :", etc.). No header will match
the string "From:" due to the trailing colon. the string "From:" due to the trailing colon.
Similarly, synactically invalid header names cause the same result as Similarly, no header will match a syntactically invalid header name.
syntactically valid header names that are not present in the message. An implementation MUST NOT cause an error for syntactically invalid
In particular, an implementation MUST NOT cause an error for header names in tests.
synactically invalid header names in tests.
Header lines are unfolded as described in [IMAIL] section 2.2.3. Header lines are unfolded as described in [IMAIL] section 2.2.3.
Interpretation of header data SHOULD be done according to [MIME3] Interpretation of header data SHOULD be done according to [MIME3]
section 6.2 (see 2.7.2 below for details). section 6.2 (see 2.7.2 below for details).
2.4.2.3. Addresses 2.4.2.3. Addresses
A number of commands call for email addresses, which are also a A number of commands call for email addresses, which are also a
subset of strings. When these addresses are used in outbound subset of strings. When these addresses are used in outbound
contexts, addresses must be compliant with [IMAIL], but are further contexts, addresses must be compliant with [IMAIL], but are further
constrained. Using the symbols defined in [IMAIL], section 3, the constrained within this document. Using the symbols defined in
syntax of an address is: [IMAIL], section 3, the syntax of an address is:
sieve-address = addr-spec ; simple address sieve-address = addr-spec ; simple address
/ phrase "<" addr-spec ">" ; name & addr-spec / phrase "<" addr-spec ">" ; name & addr-spec
That is, routes and group syntax are not permitted. If multiple That is, routes and group syntax are not permitted. If multiple
addresses are required, use a string list. Named groups are not used addresses are required, use a string list. Named groups are not used
here. here.
Implementations MUST ensure that the addresses are syntactically Implementations MUST ensure that the addresses are syntactically
valid, but need not ensure that they actually identify an email valid, but need not ensure that they actually identify an email
recipient. recipient.
2.4.2.4. Encoding characters using "encoded-character"
When the "encoded-character" extension is in effect, certain
character sequences in strings are replaced by their decoded value.
This happens after escape sequences are interpreted and dot-
unstuffing has been done. Implementations SHOULD support "encoded-
character".
Arbitrary octets can be embedded in strings by using the syntax
encoded-arb-octets. The sequence is replaced by the octets with the
hexadecimal values given by each hex-pair.
encoded-arb-octets = "${hex:" hex-pair-seq "}"
hex-pair-seq = hex-pair *(WSP hex-pair)
hex-pair = 1*2HEXDIG
It may be inconvenient or undesirable to enter Unicode characters
verbatim and for these cases the syntax encoded-unicode-char can be
used. The sequence is replaced by the UTF-8 encoding of the
specified Unicode characters, which are identified by the hexadecimal
value of unicode-hex.
encoded-unicode-char = "${unicode:" unicode-hex-seq "}"
unicode-hex-seq = unicode-hex *(WSP unicode-hex)
unicode-hex = 1*6HEXDIG
It is an error for a script to use a hexadecimal value that isn't in
either the range 0 to D7FF or the range E000 to 10FFFF. (The range
D800 to DFFF is excluded as those character numbers are only used as
part of the UTF-16 encoding form and are not applicable to the UTF-8
encoding that the syntax here represents.)
The capability string for use with the require command is "encoded-
character".
In the following script, message A is discarded, since the specified
test string is equivalent to "$$$".
Example: require "encoded-character";
if header :contains "Subject" "$${hex:24 24}" {
discard;
}
2.5. Tests 2.5. Tests
Tests are given as arguments to commands in order to control their Tests are given as arguments to commands in order to control their
actions. In this document, tests are given to if/elsif/else to actions. In this document, tests are given to if/elsif/else to
decide which block of code is run. decide which block of code is run.
2.5.1. Test Lists 2.5.1. Test Lists
Some tests ("allof" and "anyof", which implement logical "and" and Some tests ("allof" and "anyof", which implement logical "and" and
logical "or", respectively) may require more than a single test as an logical "or", respectively) may require more than a single test as an
argument. The test-list syntax element provides a way of grouping argument. The test-list syntax element provides a way of grouping
tests. tests as a comma separated list in parens.
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.com") {
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 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. arguments or to use a tagged or optional argument more than once.
skipping to change at page 15, line 15 skipping to change at page 16, line 18
For convenience, the "ADDRESS-PART" syntax element is defined here as For convenience, the "ADDRESS-PART" syntax element is defined here as
follows: follows:
Syntax: ":localpart" / ":domain" / ":all" Syntax: ":localpart" / ":domain" / ":all"
2.8. Blocks 2.8. Blocks
Blocks are sets of commands enclosed within curly braces and supplied Blocks are sets of commands enclosed within curly braces and supplied
as the final argument to a command. Such a command is a control as the final argument to a command. Such a command is a control
structure: when executed it has control over the number of times the structure: when executed it has control over the number of times the
commands in the block are executed. and how commands in the block are executed.
With the commands supplied in this memo, there are no loops. The With the commands supplied in this memo, there are no loops. The
control structures supplied--if, elsif, and else--run a block either control structures supplied--if, elsif, and else--run a block either
once or not at all. once or not at all.
2.9. Commands 2.9. Commands
Sieve scripts are sequences of commands. Commands can take any of Sieve scripts are sequences of commands. Commands can take any of
the tokens above as arguments, and arguments may be either tagged or the tokens above as arguments, and arguments may be either tagged or
positional arguments. Not all commands take all arguments. positional arguments. Not all commands take all arguments.
There are three kinds of commands: test commands, action commands, There are three kinds of commands: test commands, action commands,
and control commands. and control commands.
The simplest is an action command. An action command is an The simplest is an action command. An action command is an
identifier followed by zero or more arguments, terminated by a identifier followed by zero or more arguments, terminated by a
semicolon. Action commands do not take tests or blocks as arguments. semicolon. Action commands do not take tests or blocks as arguments.
The actions referenced in this document are:
- keep, to save the message in the default location
- fileinto, to save the message in a specific mailbox
- redirect, to forward the message to another address,
- discard, to silently throw away the message
A control command is a command that affects the parsing or the flow A control command is a command that affects the parsing or the flow
of execution of the Sieve script in some way. A control structure is of execution of the Sieve script in some way. A control structure is
a control command which ends with a block instead of a semicolon. a control command which ends with a block instead of a semicolon.
A test command is used as part of a control command. It is used to A test command is used as part of a control command. It is used to
specify whether or not the block of code given to the control command specify whether or not the block of code given to the control command
is executed. is executed.
2.10. Evaluation 2.10. Evaluation
skipping to change at page 16, line 19 skipping to change at page 17, line 32
any action that cancels the implicit keep. any action that cancels the implicit keep.
An implicit keep is performed if a message is not written to a An implicit keep is performed if a message is not written to a
mailbox, redirected to a new address, or explicitly thrown out. That mailbox, redirected to a new address, or explicitly thrown out. That
is, if a fileinto, a keep, a redirect, or a discard is performed, an is, if a fileinto, a keep, a redirect, or a discard is performed, an
implicit keep is not. implicit keep is not.
Some actions may be defined to not cancel the implicit keep. These Some actions may be defined to not cancel the implicit keep. These
actions may not directly affect the delivery of a message, and are actions may not directly affect the delivery of a message, and are
used for their side effects. None of the actions specified in this used for their side effects. None of the actions specified in this
document meet that criteria, but extension actions will. document meet that criteria, but extension actions may.
For instance, with any of the short messages offered above, the For instance, with any of the short messages offered above, the
following script produces no actions. following script produces no actions.
Example: if size :over 500K { discard; } Example: if size :over 500K { discard; }
As a result, the implicit keep is taken. As a result, the implicit keep is taken.
2.10.3. Message Uniqueness in a Mailbox 2.10.3. Message Uniqueness in a Mailbox
skipping to change at page 17, line 4 skipping to change at page 18, line 17
Site policy MAY limit numbers of actions taken and MAY impose Site policy MAY limit numbers of actions taken and MAY impose
restrictions on which actions can be used together. In the event restrictions on which actions can be used together. In the event
that a script hits a policy limit on the number of actions taken for that a script hits a policy limit on the number of actions taken for
a particular message, an error occurs. a particular message, an error occurs.
Implementations MUST allow at least one keep or one fileinto. If Implementations MUST allow at least one keep or one fileinto. If
fileinto is not implemented, implementations MUST allow at least one fileinto is not implemented, implementations MUST allow at least one
keep. keep.
2.10.5. Extensions and Optional Features 2.10.5. Extensions and Optional Features
Because of the differing capabilities of many mail systems, several Because of the differing capabilities of many mail systems, several
features of this specification are optional. Before any of these features of this specification are optional. Before any of these
extensions can be executed, they must be declared with the "require" extensions can be executed, they must be declared with the "require"
action. action.
If an extension is not enabled with "require", implementations MUST If an extension is not enabled with "require", implementations MUST
treat it as if they did not support it at all. treat it as if they did not support it at all. This protects scripts
from having their behavior altered by extensions which the script
author might not have even been aware of.
If a script does not understand an extension declared with require, Implementations MUST NOT execute at all any script which requires an
the script must not be used at all. Implementations MUST NOT execute unknown capability name.
scripts which require unknown capability names.
Note: The reason for this restriction is that prior experiences with Note: The reason for this restriction is that prior experiences with
languages such as LISP and Tcl suggest that this is a workable languages such as LISP and Tcl suggest that this is a workable
way of noting that a given script uses an extension. way of noting that a given script uses an extension.
Experience with PostScript suggests that mechanisms that allow Experience with PostScript suggests that mechanisms that allow
a script to work around missing extensions are not used in a script to work around missing extensions are not used in
practice. practice.
Extensions which define actions MUST state how they interact with Extensions which define actions MUST state how they interact with
skipping to change at page 17, line 50 skipping to change at page 19, line 16
Implementations MAY choose to do a full parse, then evaluate the Implementations MAY choose to do a full parse, then evaluate the
script, then do all actions. Implementations might even go so far as script, then do all actions. Implementations might even go so far as
to ensure that execution is atomic (either all actions are executed to ensure that execution is atomic (either all actions are executed
or none are executed). or none are executed).
Other implementations may choose to parse and run at the same time. Other implementations may choose to parse and run at the same time.
Such implementations are simpler, but have issues with partial Such implementations are simpler, but have issues with partial
failure (some actions happen, others don't). failure (some actions happen, others don't).
Implementations might even go so far as to ensure that scripts can
never execute an invalid set of actions before execution, although
this could involve solving the Halting Problem.
This specification allows any of these approaches. Solving the
Halting Problem is considered extra credit.
Implementations MUST perform syntactic, semantic, and run-time checks Implementations MUST perform syntactic, semantic, and run-time checks
on code that is actually executed. Implementations MAY perform those on code that is actually executed. Implementations MAY perform those
checks or any part of them on code that is not reached during checks or any part of them on code that is not reached during
execution. execution.
When an error happens, implementations MUST notify the user that an When an error happens, implementations MUST notify the user that an
error occurred, which actions (if any) were taken, and do an implicit error occurred, which actions (if any) were taken, and do an implicit
keep. keep.
2.10.7. Limits on Execution 2.10.7. Limits on Execution
skipping to change at page 18, line 32 skipping to change at page 19, line 39
Implementations MUST support fifteen levels of nested blocks. Implementations MUST support fifteen levels of nested blocks.
Implementations MUST support fifteen levels of nested test lists. Implementations MUST support fifteen levels of nested test lists.
3. Control Commands 3. Control Commands
Control structures are needed to allow for multiple and conditional Control structures are needed to allow for multiple and conditional
actions. actions.
3.1. Control If 3.1. Control if
There are three pieces to if: "if", "elsif", and "else". Each is There are three pieces to if: "if", "elsif", and "else". Each is
actually a separate command in terms of the grammar. However, an actually a separate command in terms of the grammar. However, an
elsif or else MUST only follow an if or elsif. An error occurs if elsif or else MUST only follow an if or elsif. An error occurs if
these conditions are not met. these conditions are not met.
Usage: if <test1: test> <block1: block> Usage: if <test1: test> <block1: block>
Usage: elsif <test2: test> <block2: block> Usage: elsif <test2: test> <block2: block>
skipping to change at page 19, line 9 skipping to change at page 20, line 15
interpreter sees an "if", it evaluates the test associated with it. interpreter sees an "if", it evaluates the test associated with it.
If the test is true, it executes the block associated with it. If the test is true, it executes the block associated with it.
If the test of the "if" is false, it evaluates the test of the first If the test of the "if" is false, it evaluates the test of the first
"elsif" (if any). If the test of "elsif" is true, it runs the "elsif" (if any). If the test of "elsif" is true, it runs the
elsif's block. An elsif may be followed by an elsif, in which case, elsif's block. An elsif may be followed by an elsif, in which case,
the interpreter repeats this process until it runs out of elsifs. the interpreter repeats this process until it runs out of elsifs.
When the interpreter runs out of elsifs, there may be an "else" case. When the interpreter runs out of elsifs, there may be an "else" case.
If there is, and none of the if or elsif tests were true, the If there is, and none of the if or elsif tests were true, the
interpreter runs the else case. interpreter runs the else's block.
This provides a way of performing exactly one of the blocks in the This provides a way of performing exactly one of the blocks in the
chain. chain.
In the following example, both Message A and B are dropped. In the following example, both Message A and B are dropped.
Example: require "fileinto"; Example: require "fileinto";
if header :contains "from" "coyote" { if header :contains "from" "coyote" {
discard; discard;
} elsif header :contains ["subject"] ["$$$"] { } elsif header :contains ["subject"] ["$$$"] {
discard; discard;
} else { } else {
fileinto "INBOX"; fileinto "INBOX";
} }
When the script below is run over message A, it redirects the message When the script below is run over message A, it redirects the message
to acm@example.edu; message B, to postmaster@example.edu; any other to acm@example.com; message B, to postmaster@example.com; any other
message is redirected to field@example.edu. message is redirected to field@example.com.
Example: if header :contains ["From"] ["coyote"] { Example: if header :contains ["From"] ["coyote"] {
redirect "acm@example.edu"; redirect "acm@example.com";
} elsif header :contains "Subject" "$$$" { } elsif header :contains "Subject" "$$$" {
redirect "postmaster@example.edu"; redirect "postmaster@example.com";
} else { } else {
redirect "field@example.edu"; redirect "field@example.com";
} }
Note that this definition prohibits the "... else if ..." sequence Note that this definition prohibits the "... else if ..." sequence
used by C. This is intentional, because this construct produces a used by C. This is intentional, because this construct produces a
shift-reduce conflict. shift-reduce conflict.
3.2. Control Require 3.2. Control require
Usage: require <capabilities: string-list> Usage: require <capabilities: string-list>
The require action notes that a script makes use of a certain The require action notes that a script makes use of a certain
extension. Such a declaration is required to use the extension, as extension. Such a declaration is required to use the extension, as
discussed in section 2.10.5. Multiple capabilities can be declared discussed in section 2.10.5. Multiple capabilities can be declared
with a single require. with a single require.
The require command, if present, MUST be used before anything other The require command, if present, MUST be used before anything other
than a require can be used. An error occurs if a require appears than a require can be used. An error occurs if a require appears
after a command other than require. after a command other than require.
Example: require ["fileinto", "reject"]; Example: require ["fileinto", "reject"];
Example: require "fileinto"; Example: require "fileinto";
require "vacation"; require "vacation";
3.3. Control Stop 3.3. Control stop
Usage: stop Usage: stop
The "stop" action ends all processing. If no actions have been The "stop" action ends all processing. If the implicit keep has not
executed, then the keep action is taken. been cancelled, then it is taken.
4. Action Commands 4. Action Commands
This document supplies four actions that may be taken on a message: This document supplies four actions that may be taken on a message:
keep, fileinto, redirect, and discard. keep, fileinto, redirect, and discard.
Implementations MUST support the "keep", "discard", and "redirect" Implementations MUST support the "keep", "discard", and "redirect"
actions. actions.
Implementations SHOULD support "fileinto". Implementations SHOULD support "fileinto".
skipping to change at page 20, line 41 skipping to change at page 21, line 52
4.1. Action fileinto 4.1. Action fileinto
Usage: fileinto <mailbox: string> Usage: fileinto <mailbox: string>
The "fileinto" action delivers the message into the specified The "fileinto" action delivers the message into the specified
mailbox. Implementations SHOULD support fileinto, but in some mailbox. Implementations SHOULD support fileinto, but in some
environments this may be impossible. Implementations MAY place environments this may be impossible. Implementations MAY place
restrictions on mailbox names; use of an invalid mailbox name MAY be restrictions on mailbox names; use of an invalid mailbox name MAY be
treated as an error or result in delivery to an implementation- treated as an error or result in delivery to an implementation-
defined mailbox. If the implementation uses a different encoding defined mailbox. If the specified mailbox doesn't exist, the
scheme than UTF-8 for mailbox names, it SHOULD reencode the mailbox implementation MAY treat it as an error, create the mailbox, or
name from UTF-8 to its encoding scheme. For example, the Internet deliver the message to an implementation-defined mailbox. If the
Message Access Protocol [IMAP] uses modified UTF-7, such that a implementation uses a different encoding scheme than UTF-8 for
mailbox argument of "odds & ends" would appear in IMAP as "odds &- mailbox names, it SHOULD reencode the mailbox name from UTF-8 to its
ends". encoding scheme. For example, the Internet Message Access Protocol
[IMAP] uses modified UTF-7, such that a mailbox argument of "odds &
ends" would appear in IMAP as "odds &- ends".
The capability string for use with the require command is "fileinto". The capability string for use with the require command is "fileinto".
In the following script, message A is filed into mailbox In the following script, message A is filed into mailbox
"INBOX.harassment". "INBOX.harassment".
Example: require "fileinto"; Example: require "fileinto";
if header :contains ["from"] "coyote" { if header :contains ["from"] "coyote" {
fileinto "INBOX.harassment"; fileinto "INBOX.harassment";
} }
4.2. Action redirect 4.2. Action redirect
Usage: redirect <address: string> Usage: redirect <address: string>
The "redirect" action is used to send the message to another user at The "redirect" action is used to send the message to another user at
a supplied address, as a mail forwarding feature does. The a supplied address, as a mail forwarding feature does. The
"redirect" action makes no changes to the message body or existing "redirect" action makes no changes to the message body or existing
headers, but it may add new headers. The "redirect" modifies the headers, but it may add new headers. In particular, existing
envelope recipient. Received headers MUST be preserved and the count of Received headers
in the outgoing message MUST be larger than the same count on the
message as received by the implementation. (An implementation that
adds a Received header before processing the message does not need to
add another when redirecting.)
The redirect command performs an MTA-style "forward"--that is, what The redirect command performs an MTA-style "forward"--that is, what
you get from a .forward file using sendmail under UNIX. The address you get from a .forward file using sendmail under UNIX. The address
on the [SMTP] envelope is replaced with the one on the redirect on the [SMTP] envelope is replaced with the one on the redirect
command and the message is sent back out. (This is not an MUA-style command and the message is sent back out. (This is not an MUA-style
forward, which creates a new message with a different sender and forward, which creates a new message with a different sender and
message ID, wrapping the old message in a new one.) message ID, wrapping the old message in a new one.)
The envelope sender address on the outgoing message is chosen by the The envelope sender address on the outgoing message is chosen by the
sieve implementation. It MAY be copied from the original message. sieve implementation. It MAY be copied from the original message.
A simple script can be used for redirecting all mail: A simple script can be used for redirecting all mail:
Example: redirect "bart@example.edu"; Example: redirect "bart@example.com";
Implementations SHOULD take measures to implement loop control, Implementations SHOULD take measures to implement loop control,
possibly including adding headers to the message or counting received possibly including adding headers to the message or counting Received
headers. If an implementation detects a loop, it causes an error. headers. If an implementation detects a loop, it causes an error.
4.3. Action keep 4.3. Action keep
Usage: keep Usage: keep
The "keep" action is whatever action is taken in lieu of all other The "keep" action is whatever action is taken in lieu of all other
actions, if no filtering happens at all; generally, this simply means actions, if no filtering happens at all; generally, this simply means
to file the message into the user's main mailbox. This command to file the message into the user's main mailbox. This command
provides a way to execute this action without needing to know the provides a way to execute this action without needing to know the
skipping to change at page 22, line 24 skipping to change at page 23, line 41
Discard is used to silently throw away the message. It does so by Discard is used to silently throw away the message. It does so by
simply canceling the implicit keep. If discard is used with other simply canceling the implicit keep. If discard is used with other
actions, the other actions still happen. Discard is compatible with actions, the other actions still happen. Discard is compatible with
all other actions. (For instance fileinto+discard is equivalent to all other actions. (For instance fileinto+discard is equivalent to
fileinto.) fileinto.)
Discard MUST be silent; that is, it MUST NOT return a non-delivery Discard MUST be silent; that is, it MUST NOT return a non-delivery
notification of any kind ([DSN], [MDN], or otherwise). notification of any kind ([DSN], [MDN], or otherwise).
In the following script, any mail from "idiot@example.edu" is thrown In the following script, any mail from "idiot@example.com" is thrown
out. out.
Example: if header :contains ["from"] ["idiot@example.edu"] { Example: if header :contains ["from"] ["idiot@example.com"] {
discard; discard;
} }
While an important part of this language, "discard" has the potential While an important part of this language, "discard" has the potential
to create serious problems for users: Students who leave themselves to create serious problems for users: Students who leave themselves
logged in to an unattended machine in a public computer lab may find logged in to an unattended machine in a public computer lab may find
their script changed to just "discard". In order to protect users in their script changed to just "discard". In order to protect users in
this situation (along with similar situations), implementations MAY this situation (along with similar situations), implementations MAY
keep messages destroyed by a script for an indefinite period, and MAY keep messages destroyed by a script for an indefinite period, and MAY
disallow scripts that throw out all mail. disallow scripts that throw out all mail.
skipping to change at page 24, line 51 skipping to change at page 26, line 23
All tests against envelopes MUST drop source routes. All tests against envelopes MUST drop source routes.
If the SMTP transaction involved several RCPT commands, only the data If the SMTP transaction involved several RCPT commands, only the data
from the RCPT command that caused delivery to this user is available from the RCPT command that caused delivery to this user is available
in the "to" part of the envelope. in the "to" part of the envelope.
If a protocol other than SMTP is used for message transport, If a protocol other than SMTP is used for message transport,
implementations are expected to adapt this command appropriately. implementations are expected to adapt this command appropriately.
The envelope command is optional. Implementations SHOULD support it, The envelope command is optional. Implementations SHOULD support it,
but the necessary information may not be available in all cases. but the necessary information may not be available in all cases. The
capability string for use with the require command is "envelope".
Example: require "envelope"; Example: require "envelope";
if envelope :all :is "from" "tim@example.com" { if envelope :all :is "from" "tim@example.com" {
discard; discard;
} }
5.5. Test exists 5.5. Test exists
Usage: exists <header-names: string-list> Usage: exists <header-names: string-list>
skipping to change at page 26, line 39 skipping to change at page 28, line 14
If the argument is ":over", and the size of the message is greater If the argument is ":over", and the size of the message is greater
than the number provided, the test is true; otherwise, it is false. than the number provided, the test is true; otherwise, it is false.
If the argument is ":under", and the size of the message is less than If the argument is ":under", and the size of the message is less than
the number provided, the test is true; otherwise, it is false. the number provided, the test is true; otherwise, it is false.
Exactly one of ":over" or ":under" must be specified, and anything Exactly one of ":over" or ":under" must be specified, and anything
else is an error. else is an error.
The size of a message is defined to be the number of octets from the The size of a message is defined to be the number of octets in the
initial header until the last character in the message body. [IMAIL] representation of the message.
Note that for a message that is exactly 4,000 octets, the message is Note that for a message that is exactly 4,000 octets, the message is
neither ":over" 4000 octets or ":under" 4000 octets. neither ":over" 4000 octets or ":under" 4000 octets.
5.10. Test true 5.10. Test true
Usage: true Usage: true
The "true" test always evaluates to true. The "true" test always evaluates to true.
skipping to change at page 27, line 14 skipping to change at page 28, line 38
New control commands, actions, and tests can be added to the New control commands, actions, and tests can be added to the
language. Sites must make these features known to their users; this language. Sites must make these features known to their users; this
document does not define a way to discover the list of extensions document does not define a way to discover the list of extensions
supported by the server. supported by the server.
Any extensions to this language MUST define a capability string that Any extensions to this language MUST define a capability string that
uniquely identifies that extension. Capability string are case- uniquely identifies that extension. Capability string are case-
sensitive; for example, "foo" and "FOO" are different capabilities. sensitive; for example, "foo" and "FOO" are different capabilities.
If a new version of an extension changes the functionality of a If a new version of an extension changes the functionality of a
previously defined extension, it MUST use a different name. previously defined extension, it MUST use a different name.
Extensions may register a set of related capabilities by registering
just a unique prefix for them. The "comparator-" prefix is an
example of this. The prefix MUST end with a "-" and MUST NOT overlap
any existing registrations.
In a situation where there is a submission protocol and an extension In a situation where there is a script submission protocol and an
advertisement mechanism aware of the details of this language, extension advertisement mechanism aware of the details of this
scripts submitted can be checked against the mail server to prevent language, scripts submitted can be checked against the mail server to
use of an extension that the server does not support. prevent use of an extension that the server does not support.
Extensions MUST state how they interact with constraints defined in Extensions MUST state how they interact with constraints defined in
section 2.10, e.g., whether they cancel the implicit keep, and which section 2.10, e.g., whether they cancel the implicit keep, and which
actions they are compatible and incompatible with. actions they are compatible and incompatible with. Extensions MUST
NOT change the behavior of the "require" control command or alter the
interpretation of the argument to the "require" control.
Extensions that can submit new email messages or otherwise generate
new protocol requests MUST consider loop suppression, at least to
document any security considerations.
6.1. Capability String 6.1. Capability String
Capability strings are typically short strings describing what Capability strings are typically short strings describing what
capabilities are supported by the server. capabilities are supported by the server.
Capability strings beginning with "vnd." represent vendor-defined Capability strings beginning with "vnd." represent vendor-defined
extensions. Such extensions are not defined by Internet standards or extensions. Such extensions are not defined by Internet standards or
RFCs, but are still registered with IANA in order to prevent RFCs, but are still registered with IANA in order to prevent
conflicts. Extensions starting with "vnd." SHOULD be followed by the conflicts. Extensions starting with "vnd." SHOULD be followed by the
name of the vendor and product, such as "vnd.acme.rocket-sled". name of the vendor and product, such as "vnd.acme.rocket-sled".
The following capability strings are defined by this document: The following capability strings are defined by this document:
encoded-character
The string "encoded-character" indicates that the
implementation supports the interpretation of "${hex:...}"
and "${unicode:...}" in strings.
envelope The string "envelope" indicates that the implementation envelope The string "envelope" indicates that the implementation
supports the "envelope" command. supports the "envelope" command.
fileinto The string "fileinto" indicates that the implementation fileinto The string "fileinto" indicates that the implementation
supports the "fileinto" command. supports the "fileinto" command.
comparator- The string "comparator-elbonia" is provided if the comparator- The string "comparator-elbonia" is provided if the
implementation supports the "elbonia" comparator. implementation supports the "elbonia" comparator.
Therefore, all implementations have at least the Therefore, all implementations have at least the
"comparator-i;octet" "comparator-i;octet"
skipping to change at page 28, line 4 skipping to change at page 29, line 42
comparator- The string "comparator-elbonia" is provided if the comparator- The string "comparator-elbonia" is provided if the
implementation supports the "elbonia" comparator. implementation supports the "elbonia" comparator.
Therefore, all implementations have at least the Therefore, all implementations have at least the
"comparator-i;octet" "comparator-i;octet"
and "comparator-i;ascii-casemap" capabilities. However, and "comparator-i;ascii-casemap" capabilities. However,
these comparators may be used without being declared these comparators may be used without being declared
with require. with require.
6.2. IANA Considerations 6.2. IANA Considerations
In order to provide a standard set of extensions, a registry is In order to provide a standard set of extensions, a registry is
provided by IANA. Capability names may be registered on a first- provided by IANA. Capability names may be registered on a first-
come, first-served basis. Extensions designed for interoperable use come, first-served basis. Extensions designed for interoperable use
SHOULD be defined as standards track or IESG approved experimental SHOULD be defined as standards track or IESG approved experimental
RFCs. RFCs. Registration of capability prefixes that do not begin with
"vnd." REQUIRES a standards track or IESG approved experimental RFC.
6.2.1. Template for Capability Registrations 6.2.1. Template for Capability Registrations
The following template is to be used for registering new Sieve The following template is to be used for registering new Sieve
extensions with IANA. extensions with IANA.
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]
skipping to change at page 28, line 45 skipping to change at page 30, line 40
4. The "Standards Track/IESG-approved experimental RFC number" field 4. The "Standards Track/IESG-approved experimental RFC number" field
should be renamed to "RFC number" should be renamed to "RFC number"
5. The "Person and email address to contact for further information" 5. The "Person and email address to contact for further information"
field should be renamed to "Contact address" field should be renamed to "Contact address"
6.2.3. Initial Capability Registrations 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: encoded-character
Description: changes the interpretation of strings to allow
arbitrary octets and Unicode characters to be
represented using US-ASCII
RFC number: this RFC (Sieve base spec)
Contact address: The Sieve discussion list <ietf-mta-filters@imc.org>
Capability name: fileinto Capability name: fileinto
Description: adds the 'fileinto' action for delivering to a Description: adds the 'fileinto' action for delivering to a
mailbox other than the default mailbox 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 for testing the message Description: adds the 'envelope' test for testing the message
transport sender and recipient address 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 indicated 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) and [COLLATION]
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
property that the implementation can advertise the complete set of property that the implementation can advertise the complete set of
extensions that it supports. extensions that it supports.
skipping to change at page 29, line 46 skipping to change at page 31, line 47
Optional parameters: none Optional parameters: none
Encoding considerations: Most sieve scripts will be textual, Encoding considerations: Most sieve scripts will be textual,
written in UTF-8. When non-7bit characters are used, written in UTF-8. When non-7bit characters are used,
quoted-printable is appropriate for transport systems quoted-printable is appropriate for transport systems
that require 7bit encoding. that require 7bit encoding.
Security considerations: Discussed in section 10 of this RFC. Security considerations: Discussed in section 10 of this RFC.
Interoperability considerations: Discussed in section 2.10.5 Interoperability considerations: Discussed in section 2.10.5
of this RFC. of this RFC.
Published specification: this RFC. Published specification: this RFC.
Applications which use this media type: sieve-enabled mail servers Applications which use this media type: sieve-enabled mail
servers and clients
Additional information: Additional information:
Magic number(s): Magic number(s):
File extension(s): .siv File extension(s): .siv .sieve
Macintosh File Type Code(s): Macintosh File Type Code(s):
Person & email address to contact for further information: Person & email address to contact for further information:
See the discussion list at ietf-mta-filters@imc.org. See the discussion list at ietf-mta-filters@imc.org.
Intended usage: Intended usage:
COMMON COMMON
Author/Change controller: Author/Change controller:
See Editor information in this RFC. See Editor information in this RFC.
8. Parsing 8. Parsing
The Sieve grammar is separated into tokens and a separate grammar as The Sieve grammar is separated into tokens and a separate grammar as
most programming languages are. most programming languages are.
skipping to change at page 30, line 30 skipping to change at page 32, line 31
The following are tokens in Sieve: The following are tokens in Sieve:
- identifiers - identifiers
- tags - tags
- numbers - numbers
- quoted strings - quoted strings
- multi-line strings - multi-line strings
- other separators - other separators
Identifiers, tags, and numbers are case-insensitive, while quoted
strings and multi-line strings are case-sensitive.
Blanks, horizontal tabs, CRLFs, and comments ("white space") are Blanks, horizontal tabs, CRLFs, and comments ("white space") are
ignored except as they separate tokens. Some white space is required ignored except as they separate tokens. Some white space is required
to separate otherwise adjacent tokens and in specific places in the to separate otherwise adjacent tokens and in specific places in the
multi-line strings. CR and LF can only appear in CRLF pairs. multi-line strings. CR and LF can only appear in CRLF pairs.
The other separators are single individual characters, and are The other separators are single individual characters, and are
mentioned explicitly in the grammar. mentioned explicitly in the grammar.
The lexical structure of sieve is defined in the following grammar The lexical structure of sieve is defined in the following grammar
(as described in [ABNF]): (as described in [ABNF]):
skipping to change at page 31, line 15 skipping to change at page 33, line 21
*(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-star = CRLF / %x01-09 / %x0B-0C / %x0E-29 / %x2B-FF / not-star = CRLF / %x01-09 / %x0B-0C / %x0E-29 / %x2B-FF
; either a CRLF pair, OR a single octet ; either a CRLF pair, OR a single octet
; other than NUL, CR, LF, or star ; other than NUL, CR, LF, or star
not-star-slash = CRLF / %x01-09 / %x0B-0C / %x0E-29 / %x2B-2E / not-star-slash = CRLF / %x01-09 / %x0B-0C / %x0E-29 / %x2B-2E /
%x30-FF %x30-FF
; either a CRLF pair, OR a single octet ; either a CRLF pair, OR a single octet
; other than NUL, CR, LF, star, or slash ; other than NUL, CR, LF, star, or slash
number = 1*DIGIT [ QUANTIFIER ] number = 1*DIGIT [ QUANTIFIER ]
skipping to change at page 33, line 22 skipping to change at page 35, line 27
# Handle messages from known mailing lists # Handle messages from known mailing lists
# Move messages from IETF filter discussion list to filter mailbox # Move messages from IETF filter discussion list to filter mailbox
# #
if header :is "Sender" "owner-ietf-mta-filters@imc.org" if header :is "Sender" "owner-ietf-mta-filters@imc.org"
{ {
fileinto "filter"; # move to "filter" mailbox fileinto "filter"; # move to "filter" mailbox
} }
# #
# Keep all messages to or from people in my company # Keep all messages to or from people in my company
# #
elsif address :domain :is ["From", "To"] "example.com" elsif address :DOMAIN :is ["From", "To"] "example.com"
{ {
keep; # keep in "In" mailbox keep; # keep in "In" mailbox
} }
# #
# Try and catch unsolicited email. If a message is not to me, # Try and catch unsolicited email. If a message is not to me,
# or it contains a subject known to be spam, file it away. # or it contains a subject known to be spam, file it away.
# #
elsif anyof (not address :all :contains elsif anyof (NOT address :all :contains
["To", "Cc", "Bcc"] "me@example.com", ["To", "Cc", "Bcc"] "me@example.com",
header :matches "subject" header :matches "subject"
["*make*money*fast*", "*university*dipl*mas*"]) ["*make*money*fast*", "*university*dipl*mas*"])
{ {
# If message header does not contain my address,
# it's from a list.
fileinto "spam"; # move to "spam" mailbox fileinto "spam"; # move to "spam" mailbox
} }
else else
{ {
# Move all other (non-company) mail to "personal" # Move all other (non-company) mail to "personal"
# mailbox. # mailbox.
fileinto "personal"; fileinto "personal";
} }
10. Security Considerations 10. Security Considerations
skipping to change at page 34, line 15 skipping to change at page 36, line 21
It is equally important that implementations sanity-check the user's It is equally important that implementations sanity-check the user's
scripts, and not allow users to create on-demand mailbombs. For scripts, and not allow users to create on-demand mailbombs. For
instance, an implementation that allows a user to redirect a message instance, an implementation that allows a user to redirect a message
multiple times might also allow a user to create a mailbomb triggered multiple times might also allow a user to create a mailbomb triggered
by mail from a specific user. Site- or implementation-defined limits by mail from a specific user. Site- or implementation-defined limits
on actions are useful for this. on actions are useful for this.
Several commands, such as "discard", "redirect", and "fileinto" allow Several commands, such as "discard", "redirect", and "fileinto" allow
for actions to be taken that are potentially very dangerous. for actions to be taken that are potentially very dangerous.
The "redirect" command has considerations regarding loop prevention;
see the command description for recommendations.
Use of the "redirect" command to generate notifications may easily Use of the "redirect" command to generate notifications may easily
overwhelm the target address, especially if it was not designed to overwhelm the target address, especially if it was not designed to
handle large messages. handle large messages.
Implementations SHOULD take measures to prevent languages from Implementations SHOULD take measures to prevent scripts from looping.
looping.
As with any filter on a message stream, if the sieve implementation As with any filter on a message stream, if the sieve implementation
and the mail agents 'behind' sieve in the message stream differ in and the mail agents 'behind' sieve in the message stream differ in
their interpretation of the messages, it may be possible for an their interpretation of the messages, it may be possible for an
attacker to subvert the filter. Of particular note are differences attacker to subvert the filter. Of particular note are differences
in the interpretation of malformed messages (e.g., missing or extra in the interpretation of malformed messages (e.g., missing or extra
syntax characters) or those that exhibit corner cases (e.g., NUL syntax characters) or those that exhibit corner cases (e.g., NUL
octets encoded via [MIME3]). octets encoded via [MIME3]).
11. Acknowledgments 11. Acknowledgments
This document has been revised in part based on comments and This document has been revised in part based on comments and
discussions that took place on and off the SIEVE mailing list. discussions that took place on and off the SIEVE mailing list.
Thanks to Cyrus Daboo, Ned Freed, Michael Haardt, Kjetil Torgrim Thanks to Sharon Chisholm, Cyrus Daboo, Ned Freed, Arnt Gulbrandsen,
Homme, Barry Leiba, Mark E. Mallett, Alexey Melnikov, Rob Siemborski, Michael Haardt, Kjetil Torgrim Homme, Barry Leiba, Mark E. Mallett,
and Nigel Swinson for reviews and suggestions. Alexey Melnikov, Eric Rescorla, Rob Siemborski, and Nigel Swinson for
reviews and suggestions.
12. Editors' Addresses 12. Editors' Addresses
Philip Guenther Philip Guenther
Sendmail, Inc. Sendmail, Inc.
6425 Christie St. Ste 400 6425 Christie St. Ste 400
Emeryville, CA 94608 Emeryville, CA 94608
Email: guenther@sendmail.com Email: guenther@sendmail.com
Tim Showalter Tim Showalter
skipping to change at page 35, line 25 skipping to change at page 37, line 40
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail [MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
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
Notification", RFC 3798, May 2004.
[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 36, line 8 skipping to change at page 38, line 27
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.
[MDN] T. Hansen, Ed., G. Vaudreuil, Ed., "Message Disposition
Notification", RFC 3798, May 2004.
[RFC3028] Showalter, T., "Sieve: A Mail Filtering Language", RFC [RFC3028] Showalter, T., "Sieve: A Mail Filtering Language", RFC
3028, January 2001. 3028, January 2001.
15. Changes from RFC 3028 15. Changes from RFC 3028
This following list is a summary of the changes that have been made This following list is a summary of the changes that have been made
in the Sieve language base specification from [RFC3028]. in the Sieve language base specification from [RFC3028].
1. Removed ban on tests having side-effects 1. Removed ban on tests having side-effects
2. Removed reject extension (will be specified in a separate RFC) 2. Removed reject extension (will be specified in a separate RFC)
skipping to change at page 36, line 38 skipping to change at page 40, line 7
- null return-path in "envelope" test - null return-path in "envelope" test
6. Capability strings are case-sensitive 6. Capability strings are case-sensitive
7. Clarified that fileinto should reencode non-ASCII mailbox 7. Clarified that fileinto should reencode non-ASCII mailbox
names to match the mailstore's conventions names to match the mailstore's conventions
8. Errors in the ABNF were corrected 8. Errors in the ABNF were corrected
9. The references were updated and split into normative and 9. The references were updated and split into normative and
informative informative
16. Full Copyright Statement 16. Full Copyright Statement
Copyright (C) The Internet Society (2006). Copyright (C) The IETF Trust (2007).
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, THE IETF TRUST,
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE.
Intellectual Property Intellectual Property
The IETF takes no position regarding the validity or scope of any The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79. found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any Copies of IPR disclosures made to the IETF Secretariat and any
skipping to change at page 37, line 28 skipping to change at page 40, line 48
http://www.ietf.org/ipr. http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement rights that may cover technology that may be required to implement
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 IETF
Internet Society. Administrative Support Activity (IASA).
Append A. Change History Appendix A. Change History
This section will be removed when this document leaves the Internet- This section will be removed when this document leaves the Internet-
Draft stage. Draft stage.
Changes from draft-ietf-sieve-3028bis-09.txt
1. [MDN] reference is merely informative
2. Whitespace tweaks in the ABNF
3. Extensions can't change "require"
4. fileinto a nonexistent mailbox is implementation defined behavior
5. Clarify the definition of the size of a message
6. Make the KEYWORDS boilerplate match expectations
7. Add the encoded-character extension
8. Remove duplication in text regarding unknown extensions
9. Address security concerns about looping with redirect or other
extensions
10. Valid numbers include zero
11. Various changes suggested by the gen-art reviewer
12. Removed references to the Halting Problem. Humor is dead
13. Clarify which tokens are case-insensitive and which are
case-sensitive; use the 'unexpected' case in several examples
14. Add .sieve as an extension for the application/sieve MIME type
15. Permit registration of capability prefixes (like "comparator-"),
but require an IESG approved RFC when they're outside the
"vnd." 'namespace'
16. Replace "example.edu" with "example.com"
17. Update boilerplate
18. Updated pages numbers in table of contents
Changes from draft-ietf-sieve-3028bis-08.txt Changes from draft-ietf-sieve-3028bis-08.txt
1. [RFC3028] reference is merely informative 1. [RFC3028] reference is merely informative
2. String lists are literal data 2. String lists are literal data
3. Tagged and optional arguments can take any sort of literal data 3. Tagged and optional arguments can take any sort of literal data
as arguments as arguments
4. Change "folder" to "mailbox" throughout 4. Change "folder" to "mailbox" throughout
5. Added more items to the "Changes from RFC 3028" list 5. Added more items to the "Changes from RFC 3028" list
6. A multi-line string includes the CRLF before the final dot 6. A multi-line string includes the CRLF before the final dot
Changes from draft-ietf-sieve-3028bis-07.txt Changes from draft-ietf-sieve-3028bis-07.txt
 End of changes. 82 change blocks. 
194 lines changed or deleted 306 lines changed or added

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