draft-ietf-sieve-managesieve-09.txt   rfc5804.txt 
Sieve Working Group A. Melnikov, Ed. Internet Engineering Task Force (IETF) A. Melnikov, Ed.
Internet-Draft Isode Limited Request for Comments: 5804 Isode Limited
Intended status: Standards Track T. Martin Category: Standards Track T. Martin
Expires: July 21, 2009 BeThereBeSquare Inc. ISSN: 2070-1721 BeThereBeSquare, Inc.
January 17, 2009 July 2010
A Protocol for Remotely Managing Sieve Scripts
draft-ietf-sieve-managesieve-09
Status of this Memo
This Internet-Draft is submitted to IETF in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
This Internet-Draft will expire on July 21, 2009.
Copyright Notice
Copyright (c) 2009 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal A Protocol for Remotely Managing Sieve Scripts
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document.
Abstract Abstract
Sieve scripts allow users to filter incoming email. Message stores Sieve scripts allow users to filter incoming email. Message stores
are commonly sealed servers so users cannot log into them, yet users are commonly sealed servers so users cannot log into them, yet users
must be able to update their scripts on them. This document must be able to update their scripts on them. This document
describes a protocol "ManageSieve" for securely managing Sieve describes a protocol "ManageSieve" for securely managing Sieve
scripts on a remote server. This protocol allows a user to have scripts on a remote server. This protocol allows a user to have
multiple scripts, and also alerts a user to syntactically flawed multiple scripts, and also alerts a user to syntactically flawed
scripts. scripts.
Table of Contents Status of This Memo
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 5
1.1. Conventions used in this document . . . . . . . . . . . . 5
1.2. Commands and Responses . . . . . . . . . . . . . . . . . . 5
1.3. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4. Response Codes . . . . . . . . . . . . . . . . . . . . . . 6
1.5. Active Script . . . . . . . . . . . . . . . . . . . . . . 8
1.6. Quotas . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.7. Script Names . . . . . . . . . . . . . . . . . . . . . . . 9
1.8. Capabilities . . . . . . . . . . . . . . . . . . . . . . . 9
1.9. Transport . . . . . . . . . . . . . . . . . . . . . . . . 11
2. Commands . . . . . . . . . . . . . . . . . . . . . . . . . 12 This is an Internet Standards Track document.
2.1. AUTHENTICATE Command . . . . . . . . . . . . . . . . . . . 12
2.1.1. Use of SASL PLAIN mechanism over TLS . . . . . . . . . . . 17
2.2. STARTTLS Command . . . . . . . . . . . . . . . . . . . . . 17
2.2.1. Server Identity Check . . . . . . . . . . . . . . . . . . 18
2.3. LOGOUT Command . . . . . . . . . . . . . . . . . . . . . . 21
2.4. CAPABILITY Command . . . . . . . . . . . . . . . . . . . . 21
2.5. HAVESPACE Command . . . . . . . . . . . . . . . . . . . . 21
2.6. PUTSCRIPT Command . . . . . . . . . . . . . . . . . . . . 22
2.7. LISTSCRIPTS Command . . . . . . . . . . . . . . . . . . . 24
2.8. SETACTIVE Command . . . . . . . . . . . . . . . . . . . . 25
2.9. GETSCRIPT Command . . . . . . . . . . . . . . . . . . . . 25
2.10. DELETESCRIPT Command . . . . . . . . . . . . . . . . . . . 26
2.11. RENAMESCRIPT Command . . . . . . . . . . . . . . . . . . . 26
2.12. CHECKSCRIPT Command . . . . . . . . . . . . . . . . . . . 27
2.13. NOOP Command . . . . . . . . . . . . . . . . . . . . . . . 28
2.14. Recommended extensions . . . . . . . . . . . . . . . . . . 29
2.14.1. UNAUTHENTICATE Command . . . . . . . . . . . . . . . . . . 29
3. Sieve URL Scheme . . . . . . . . . . . . . . . . . . . . . 29 This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
4. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . 32 Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc5804.
5. Security Considerations . . . . . . . . . . . . . . . . . 38 Copyright Notice
6. IANA Considerations . . . . . . . . . . . . . . . . . . . 39 Copyright (c) 2010 IETF Trust and the persons identified as the
6.1. ManageSieve Capability Registration Template . . . . . . . 39 document authors. All rights reserved.
6.2. Registration of Initial ManageSieve capabilities . . . . . 40
6.3. ManageSieve Response Code Registration Template . . . . . 42
6.4. Registration of Initial ManageSieve Response Codes . . . . 43
7. Internationalization Considerations . . . . . . . . . . . 48 This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 49 Table of Contents
9. References . . . . . . . . . . . . . . . . . . . . . . . . 49
9.1. Normative References . . . . . . . . . . . . . . . . . . . 49
9.2. Informative References . . . . . . . . . . . . . . . . . . 51
Authors' Addresses . . . . . . . . . . . . . . . . . . . . 51 1. Introduction ....................................................3
1.1. Commands and Responses .....................................3
1.2. Syntax .....................................................3
1.3. Response Codes .............................................3
1.4. Active Script ..............................................6
1.5. Quotas .....................................................6
1.6. Script Names ...............................................6
1.7. Capabilities ...............................................7
1.8. Transport ..................................................9
1.9. Conventions Used in This Document .........................10
2. Commands .......................................................10
2.1. AUTHENTICATE Command ......................................11
2.1.1. Use of SASL PLAIN Mechanism over TLS ...............16
2.2. STARTTLS Command ..........................................16
2.2.1. Server Identity Check ..............................17
2.3. LOGOUT Command ............................................20
2.4. CAPABILITY Command ........................................20
2.5. HAVESPACE Command .........................................20
2.6. PUTSCRIPT Command .........................................21
2.7. LISTSCRIPTS Command .......................................23
2.8. SETACTIVE Command .........................................24
2.9. GETSCRIPT Command .........................................25
2.10. DELETESCRIPT Command .....................................25
2.11. RENAMESCRIPT Command .....................................26
2.12. CHECKSCRIPT Command ......................................27
2.13. NOOP Command .............................................28
2.14. Recommended Extensions ...................................28
2.14.1. UNAUTHENTICATE Command ............................28
3. Sieve URL Scheme ...............................................29
4. Formal Syntax ..................................................31
5. Security Considerations ........................................37
6. IANA Considerations ............................................38
6.1. ManageSieve Capability Registration Template ..............39
6.2. Registration of Initial ManageSieve Capabilities ..........39
6.3. ManageSieve Response Code Registration Template ...........41
6.4. Registration of Initial ManageSieve Response Codes ........41
7. Internationalization Considerations ............................46
8. Acknowledgements ...............................................46
9. References .....................................................47
9.1. Normative References ......................................47
9.2. Informative References ....................................48
1. Introduction 1. Introduction
1.1. Conventions used in this document 1.1. Commands and Responses
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [KEYWORDS].
In examples, "C:" and "S:" indicate lines sent by the client and
server respectively. Line breaks that do not start a new "C:" or
"S:" exist for editorial reasons.
1.2. Commands and Responses
A ManageSieve connection consists of the establishment of a client/ A ManageSieve connection consists of the establishment of a client/
server network connection, an initial greeting from the server, and server network connection, an initial greeting from the server, and
client/server interactions. These client/server interactions consist client/server interactions. These client/server interactions consist
of a client command, server data, and a server completion result of a client command, server data, and a server completion result
response. response.
All interactions transmitted by client and server are in the form of All interactions transmitted by client and server are in the form of
lines, that is, strings that end with a CRLF. The protocol receiver lines, that is, strings that end with a CRLF. The protocol receiver
of a ManageSieve client or server is either reading a line, or is of a ManageSieve client or server is either reading a line or reading
reading a sequence of octets with a known count followed by a line. a sequence of octets with a known count followed by a line.
1.3. Syntax 1.2. Syntax
ManageSieve is a line oriented protocol much like [IMAP] or [ACAP], ManageSieve is a line-oriented protocol much like [IMAP] or [ACAP],
which runs over TCP. There are three data types: atoms, numbers and which runs over TCP. There are three data types: atoms, numbers and
strings. Strings may be quoted or literal. See [ACAP] for detailed strings. Strings may be quoted or literal. See [ACAP] for detailed
descriptions of these types. descriptions of these types.
Each command consists of an atom (the command name) followed by zero Each command consists of an atom (the command name) followed by zero
or more strings and numbers terminated by CRLF. or more strings and numbers terminated by CRLF.
All client queries are replied to with either an OK, NO, or BYE All client queries are replied to with either an OK, NO, or BYE
response. Each response may be followed by a response code (see response. Each response may be followed by a response code (see
Section 1.4) and by a string consisting of human readable text in the Section 1.3) and by a string consisting of human-readable text in the
local language (as returned by the LANGUAGE capability, see local language (as returned by the LANGUAGE capability; see
Section 1.8), encoded in [UTF-8]. The contents of the string SHOULD Section 1.7), encoded in UTF-8 [UTF-8]. The contents of the string
be shown to the user and implementations MUST NOT attempt to parse SHOULD be shown to the user ,and implementations MUST NOT attempt to
the message for meaning. parse the message for meaning.
The BYE response SHOULD be used if the server wishes to close the The BYE response SHOULD be used if the server wishes to close the
connection. A server may wish to do this because the client was idle connection. A server may wish to do this because the client was idle
for too long or there were too many failed authentication attempts. for too long or there were too many failed authentication attempts.
This response can be issued at any time and should be immediately This response can be issued at any time and should be immediately
followed by a server hang-up of the connection. If a server has an followed by a server hang-up of the connection. If a server has an
inactivity timeout resulting in client autologout it MUST be no less inactivity timeout resulting in client autologout, it MUST be no less
than 30 minutes after successful authentication. The inactivity than 30 minutes after successful authentication. The inactivity
timeout MAY be less before authentication. timeout MAY be less before authentication.
1.4. Response Codes 1.3. Response Codes
An OK, NO, or BYE response from the server MAY contain a response An OK, NO, or BYE response from the server MAY contain a response
code to describe the event in a more detailed machine parsable code to describe the event in a more detailed machine-parsable
fashion. A response code consists of data inside parentheses in the fashion. A response code consists of data inside parentheses in the
form of an atom, possibly followed by a space and arguments. form of an atom, possibly followed by a space and arguments.
Response codes are defined when there is a specific action that a Response codes are defined when there is a specific action that a
client can take based upon the additional information. In order to client can take based upon the additional information. In order to
support future extension, the response code is represented as a support future extension, the response code is represented as a
slash-separated (Solidus, %x2F) hierarchy with each level of slash-separated (Solidus, %x2F) hierarchy with each level of
hierarchy representing increasing detail about the error. Response hierarchy representing increasing detail about the error. Response
codes MUST NOT start with the Solidus character. Clients MUST codes MUST NOT start with the Solidus character. Clients MUST
tolerate additional hierarchical response code detail which they tolerate additional hierarchical response code detail that they don't
don't understand. For example, if the client supports the "QUOTA" understand. For example, if the client supports the "QUOTA" response
response code, but doesn't understand the "QUOTA/MAXSCRIPTS" response code, but doesn't understand the "QUOTA/MAXSCRIPTS" response code, it
code, it should treat "QUOTA/MAXSCRIPTS" as "QUOTA". should treat "QUOTA/MAXSCRIPTS" as "QUOTA".
Client implementations MUST tolerate (ignore) response codes that Client implementations MUST tolerate (ignore) response codes that
they do not recognize. they do not recognize.
The currently defined response codes are: The currently defined response codes are the following:
AUTH-TOO-WEAK AUTH-TOO-WEAK
This response code is returned in the NO or BYE response from an This response code is returned in the NO or BYE response from an
AUTHENTICATE command. It indicates that site security policy forbids AUTHENTICATE command. It indicates that site security policy forbids
the use of the requested mechanism for the specified authentication the use of the requested mechanism for the specified authentication
identity. identity.
ENCRYPT-NEEDED ENCRYPT-NEEDED
skipping to change at page 6, line 50 skipping to change at page 4, line 41
AUTHENTICATE command. It indicates that site security policy AUTHENTICATE command. It indicates that site security policy
requires the use of a strong encryption mechanism for the specified requires the use of a strong encryption mechanism for the specified
authentication identity and mechanism. authentication identity and mechanism.
QUOTA QUOTA
If this response code is returned in the NO/BYE response, it means If this response code is returned in the NO/BYE response, it means
that the command would have placed the user above the site-defined that the command would have placed the user above the site-defined
quota constraints. If this response code is returned in the OK quota constraints. If this response code is returned in the OK
response, it can mean that the user's storage is near its quota, or response, it can mean that the user's storage is near its quota, or
it can mean that the account exceeded its quota but that that it can mean that the account exceeded its quota but that the
condition is being allowed by the server (the server supports so condition is being allowed by the server (the server supports
called "soft quotas"). The QUOTA response code has 2 more detailed so-called soft quotas). The QUOTA response code has two more
variants: "QUOTA/MAXSCRIPTS" (the maximum number of per-user scripts) detailed variants: "QUOTA/MAXSCRIPTS" (the maximum number of per-user
and "QUOTA/MAXSIZE" (the maximum script size). scripts) and "QUOTA/MAXSIZE" (the maximum script size).
REFERRAL REFERRAL
This response code may be returned with a BYE result from any This response code may be returned with a BYE result from any
command, and includes a mandatory parameter that indicates what command, and includes a mandatory parameter that indicates what
server to access to manage this user's sieve scripts. The server server to access to manage this user's Sieve scripts. The server
will be specified by a Sieve URL (see Section 3). The scriptname will be specified by a Sieve URL (see Section 3). The scriptname
portion of the URL MUST NOT be specified. The client should portion of the URL MUST NOT be specified. The client should
authenticate to the specified server and use it for all further authenticate to the specified server and use it for all further
commands in the current session. commands in the current session.
SASL SASL
This response code can occur in the OK response to a successful This response code can occur in the OK response to a successful
AUTHENTICATE command and includes the optional final server response AUTHENTICATE command and includes the optional final server response
data from the server as specified by [SASL]. data from the server as specified by [SASL].
skipping to change at page 7, line 47 skipping to change at page 5, line 37
credentials suitable for use by the specified mechanism. credentials suitable for use by the specified mechanism.
TRYLATER TRYLATER
A command failed due to a temporary server failure. The client MAY A command failed due to a temporary server failure. The client MAY
continue using local information and try the command later. This continue using local information and try the command later. This
response code only makes sense when returned in a NO/BYE response. response code only makes sense when returned in a NO/BYE response.
ACTIVE ACTIVE
A command failed because it is not allowed on the active script. For A command failed because it is not allowed on the active script, for
example DELETESCRIPT on the active script. This response code only example, DELETESCRIPT on the active script. This response code only
makes sense when returned in a NO/BYE response. makes sense when returned in a NO/BYE response.
NONEXISTENT NONEXISTENT
A command failed because the referenced script name doesn't exist. A command failed because the referenced script name doesn't exist.
This response code only makes sense when returned in a NO/BYE This response code only makes sense when returned in a NO/BYE
response. response.
ALREADYEXISTS ALREADYEXISTS
A command failed because the referenced script name already exists. A command failed because the referenced script name already exists.
This response code only makes sense when returned in a NO/BYE This response code only makes sense when returned in a NO/BYE
response. response.
skipping to change at page 8, line 29 skipping to change at page 6, line 20
WARNINGS WARNINGS
This response code MAY be returned by the server in the OK response This response code MAY be returned by the server in the OK response
(but it might be returned with the NO/BYE response as well) and (but it might be returned with the NO/BYE response as well) and
signals the client that even though the script is syntactically signals the client that even though the script is syntactically
valid, it might contain errors not intended by the script writer. valid, it might contain errors not intended by the script writer.
This response code is typically returned in response to PUTSCRIPT This response code is typically returned in response to PUTSCRIPT
and/or CHECKSCRIPT commands. A client seeing such response code and/or CHECKSCRIPT commands. A client seeing such response code
SHOULD present the returned warning text to the user. SHOULD present the returned warning text to the user.
1.5. Active Script 1.4. Active Script
A user may have multiple Sieve scripts on the server, yet only one A user may have multiple Sieve scripts on the server, yet only one
script may be used for filtering of incoming messages. This is the script may be used for filtering of incoming messages. This is the
active script. Users may have zero or one active scripts and MUST active script. Users may have zero or one active script and MUST use
use the SETACTIVE command described below for changing the active the SETACTIVE command described below for changing the active script
script or disabling Sieve processing. For example, a user may have or disabling Sieve processing. For example, users may have an
an everyday script they normally use and a special script they use everyday script they normally use and a special script they use when
when they go on vacation. Users can change which script is being they go on vacation. Users can change which script is being used
used without having to download and upload a script stored somewhere without having to download and upload a script stored somewhere else.
else.
1.6. Quotas 1.5. Quotas
Servers SHOULD impose quotas to prevent malicious users from Servers SHOULD impose quotas to prevent malicious users from
overflowing available storage. If a command would place a user over overflowing available storage. If a command would place a user over
a quota setting, servers that impose such quotas MUST reply with a NO a quota setting, servers that impose such quotas MUST reply with a NO
response containing the QUOTA response code. Client implementations response containing the QUOTA response code. Client implementations
MUST be able to handle commands failing because of quota MUST be able to handle commands failing because of quota
restrictions. restrictions.
1.7. Script Names 1.6. Script Names
A Sieve script name is a sequence of Unicode characters encoded in A Sieve script name is a sequence of Unicode characters encoded in
UTF-8 [UTF-8]. A script name MUST comply with Net-Unicode Definition UTF-8 [UTF-8]. A script name MUST comply with Net-Unicode Definition
(Section 2 of [NET-UNICODE]), with the additional restriction of (Section 2 of [NET-UNICODE]), with the additional restriction of
prohibiting the following Unicode characters: prohibiting the following Unicode characters:
o 0000-001F; [CONTROL CHARACTERS] o 0000-001F; [CONTROL CHARACTERS]
o 007F; DELETE o 007F; DELETE
skipping to change at page 9, line 17 skipping to change at page 7, line 4
A Sieve script name is a sequence of Unicode characters encoded in A Sieve script name is a sequence of Unicode characters encoded in
UTF-8 [UTF-8]. A script name MUST comply with Net-Unicode Definition UTF-8 [UTF-8]. A script name MUST comply with Net-Unicode Definition
(Section 2 of [NET-UNICODE]), with the additional restriction of (Section 2 of [NET-UNICODE]), with the additional restriction of
prohibiting the following Unicode characters: prohibiting the following Unicode characters:
o 0000-001F; [CONTROL CHARACTERS] o 0000-001F; [CONTROL CHARACTERS]
o 007F; DELETE o 007F; DELETE
o 0080-009F; [CONTROL CHARACTERS] o 0080-009F; [CONTROL CHARACTERS]
o 2028; LINE SEPARATOR o 2028; LINE SEPARATOR
o 2029; PARAGRAPH SEPARATOR o 2029; PARAGRAPH SEPARATOR
Sieve script names MUST be at least one octet (and hense Unicode Sieve script names MUST be at least one octet (and hence Unicode
character) long. Zero octets script name has a special meaning (see character) long. Zero octets script name has a special meaning (see
Section 2.8). Servers MUST allow names of up to 128 Unicode Section 2.8). Servers MUST allow names of up to 128 Unicode
characters in length (which can take up to 512 bytes when encoded in characters in length (which can take up to 512 bytes when encoded in
UTF-8, not counting the terminating NUL), and MAY allow longer names. UTF-8, not counting the terminating NUL), and MAY allow longer names.
A server that receives a script name longer than its internal limit A server that receives a script name longer than its internal limit
MUST reject the corresponding operation, in particular it MUST NOT MUST reject the corresponding operation, in particular it MUST NOT
truncate the script name. truncate the script name.
1.8. Capabilities 1.7. Capabilities
Server capabilities are sent automatically by the server upon a Server capabilities are sent automatically by the server upon a
client connection, or after successful STARTTLS and AUTHENTICATE client connection, or after successful STARTTLS and AUTHENTICATE
(which establishes a SASL security layer) commands. Capabilities may (which establishes a Simple Authentication and Security Layer (SASL))
change immediately after a successfully completed STARTTLS command, commands. Capabilities may change immediately after a successfully
and/or immediately after a successfully completed AUTHENTICATE completed STARTTLS command, and/or immediately after a successfully
command, and/or after a successfully completed UNAUTHENTICATE command completed AUTHENTICATE command, and/or after a successfully completed
(see Section 2.14.1). Capabilities MUST remain static at all other UNAUTHENTICATE command (see Section 2.14.1). Capabilities MUST
times. remain static at all other times.
Clients MAY request the capabilities at a later time by issuing the Clients MAY request the capabilities at a later time by issuing the
CAPABILITY command described later. The capabilities consist of a CAPABILITY command described later. The capabilities consist of a
series of lines each with one or two strings. The first string is series of lines each with one or two strings. The first string is
the name of the capability, which is case-insensitive. The second the name of the capability, which is case-insensitive. The second
optional string is the value associated with that capability. Order optional string is the value associated with that capability. Order
of capabilities is arbitrary, but each capability name can appear at of capabilities is arbitrary, but each capability name can appear at
most once. most once.
The following capabilities are defined in this document: The following capabilities are defined in this document:
IMPLEMENTATION - Name of implementation and version. This capability IMPLEMENTATION - Name of implementation and version. This capability
MUST always be returned by the server. MUST always be returned by the server.
SASL - List of SASL mechanisms supported by the server, each SASL - List of SASL mechanisms supported by the server, each
separated by a space. This list can be empty if and only if STARTTLS separated by a space. This list can be empty if and only if STARTTLS
is also advertised. This means that the client must negotiate TLS is also advertised. This means that the client must negotiate TLS
encryption with STARTTLS first, at which point the SASL capability encryption with STARTTLS first, at which point the SASL capability
will list a non empty list of SASL mechanisms. will list a non-empty list of SASL mechanisms.
SIEVE - List of space separated Sieve extensions (as listed in Sieve SIEVE - List of space-separated Sieve extensions (as listed in Sieve
"require" action [SIEVE]) supported by the Sieve engine. This "require" action [SIEVE]) supported by the Sieve engine. This
capability MUST always be returned by the server. capability MUST always be returned by the server.
STARTTLS - If TLS [TLS] is supported by this implementation. Before STARTTLS - If TLS [TLS] is supported by this implementation. Before
advertising this capability a server MUST verify to the best of its advertising this capability a server MUST verify to the best of its
ability that TLS can be successfully negotiated by a client with ability that TLS can be successfully negotiated by a client with
common cipher suites. Specifically, a server should verify that a common cipher suites. Specifically, a server should verify that a
server certificate has been installed and that the TLS subsystem has server certificate has been installed and that the TLS subsystem has
successfully initialized. This capability SHOULD NOT be advertised successfully initialized. This capability SHOULD NOT be advertised
once STARTTLS or AUTHENTICATE command completes successfully. Client once STARTTLS or AUTHENTICATE command completes successfully. Client
and server implementations MUST implement the STARTTLS extension. and server implementations MUST implement the STARTTLS extension.
MAXREDIRECTS - Specifies the limit on the number of Sieve "redirect" MAXREDIRECTS - Specifies the limit on the number of Sieve "redirect"
actions a script can perform during a single evaluation. Note, that actions a script can perform during a single evaluation. Note that
this is different from the total number of "redirect" actions a this is different from the total number of "redirect" actions a
script can contain. The value is a non-negative number represented script can contain. The value is a non-negative number represented
as a ManageSieve string. as a ManageSieve string.
NOTIFY - A space separated list of URI schema parts for supported NOTIFY - A space-separated list of URI schema parts for supported
notification methods. This capability MUST be specified if the Sieve notification methods. This capability MUST be specified if the Sieve
implementation supports the "enotify" extension [NOTIFY]. implementation supports the "enotify" extension [NOTIFY].
LANGUAGE - The language (<Language-Tag> from [RFC4646]) currently LANGUAGE - The language (<Language-Tag> from [RFC5646]) currently
used for human readable error messages. If this capability is not used for human-readable error messages. If this capability is not
returned, the "i-default" [RFC2277] language is assumed. Note that returned, the "i-default" [RFC2277] language is assumed. Note that
the current language MAY be per-user configurable (i.e. it MAY change the current language MAY be per-user configurable (i.e., it MAY
after authentication). change after authentication).
OWNER - The canonical name of the logged in user (SASL "authorization OWNER - The canonical name of the logged-in user (SASL "authorization
identity") encoded in UTF-8. This capability MUST NOT be returned in identity") encoded in UTF-8. This capability MUST NOT be returned in
unauthenticated state and SHOULD be returned once the AUTHENTICATE unauthenticated state and SHOULD be returned once the AUTHENTICATE
command succeeds. command succeeds.
VERSION - This capability MUST be returned by servers compliant with VERSION - This capability MUST be returned by servers compliant with
this document or its successor. For servers compliant with this this document or its successor. For servers compliant with this
document the capability value is the string "1.0". Lack of this document, the capability value is the string "1.0". Lack of this
capability means that the server predates this specification and thus capability means that the server predates this specification and thus
doesn't support the following commands: RENAMESCRIPT, CHECKSCRIPT and doesn't support the following commands: RENAMESCRIPT, CHECKSCRIPT,
NOOP. and NOOP.
Section 2.14 defines some additional ManageSieve extensions and their Section 2.14 defines some additional ManageSieve extensions and their
respective capabilities. respective capabilities.
A server implementation MUST return SIEVE, IMPLEMENTATION and VERSION A server implementation MUST return SIEVE, IMPLEMENTATION, and
capabilities. VERSION capabilities.
A client implementation MUST ignore any listed capabilities that it A client implementation MUST ignore any listed capabilities that it
does not understand. does not understand.
Example: Example:
S: "IMPlemENTATION" "Example1 ManageSieved v001" S: "IMPlemENTATION" "Example1 ManageSieved v001"
S: "SASl" "DIGEST-MD5 GSSAPI" S: "SASl" "DIGEST-MD5 GSSAPI"
S: "SIeVE" "fileinto vacation" S: "SIeVE" "fileinto vacation"
S: "StaRTTLS" S: "StaRTTLS"
S: "NOTIFY" "xmpp mailto" S: "NOTIFY" "xmpp mailto"
S: "MAXREdIRECTS" "5" S: "MAXREdIRECTS" "5"
S: "VERSION" "1.0" S: "VERSION" "1.0"
S: OK S: OK
After successful authentication this might look like this: After successful authentication, this might look like this:
Example: Example:
S: "IMPlemENTATION" "Example1 ManageSieved v001" S: "IMPlemENTATION" "Example1 ManageSieved v001"
S: "SASl" "DIGEST-MD5 GSSAPI" S: "SASl" "DIGEST-MD5 GSSAPI"
S: "SIeVE" "fileinto vacation" S: "SIeVE" "fileinto vacation"
S: "NOTIFY" "xmpp mailto" S: "NOTIFY" "xmpp mailto"
S: "OWNER" "alexey@example.com" S: "OWNER" "alexey@example.com"
S: "MAXREdIRECTS" "5" S: "MAXREdIRECTS" "5"
S: "VERSION" "1.0" S: "VERSION" "1.0"
S: OK S: OK
1.9. Transport 1.8. Transport
The ManageSieve protocol assumes a reliable data stream such as that The ManageSieve protocol assumes a reliable data stream such as that
provided by TCP. When TCP is used, a ManageSieve server typically provided by TCP. When TCP is used, a ManageSieve server typically
listens on port [[anchor7: To-be-assigned by IANA]]. listens on port 4190.
Before opening the TCP connection, the ManageSieve client first MUST Before opening the TCP connection, the ManageSieve client first MUST
resolve the Domain Name System (DNS) hostname associated with the resolve the Domain Name System (DNS) hostname associated with the
receiving entity and determine the appropriate TCP port for receiving entity and determine the appropriate TCP port for
communication with the receiving entity. The process is as follows: communication with the receiving entity. The process is as follows:
1. Attempt to resolve the hostname using a [DNS-SRV] Service of 1. Attempt to resolve the hostname using a [DNS-SRV] Service of
"sieve" and a Proto of "tcp" for the target domain (e.g. "sieve" and a Proto of "tcp" for the target domain (e.g.,
"example.net"), resulting in resource records such as "example.net"), resulting in resource records such as
"_sieve._tcp.example.net.". The result of the SRV lookup, if "_sieve._tcp.example.net.". The result of the SRV lookup, if
successful, will be one or more combinations of a port and successful, will be one or more combinations of a port and
hostname; the ManageSieve client MUST resolve the returned hostname; the ManageSieve client MUST resolve the returned
hostnames to IPv4/IPv6 addresses according to returned SRV record hostnames to IPv4/IPv6 addresses according to returned SRV record
weight. IP addresses from the first successfully resolved weight. IP addresses from the first successfully resolved
hostname (with the corresponding port number returned by SRV hostname (with the corresponding port number returned by SRV
lookup) are used to connect to the server. If connection using lookup) are used to connect to the server. If connection using
one of the IP addresses fails, the next resolved IP address is one of the IP addresses fails, the next resolved IP address is
used to connect. If connection to all resolved IP addresses used to connect. If connection to all resolved IP addresses
fails, then the resolution/connect is repeated for the next fails, then the resolution/connect is repeated for the next
hostname returned by SRV lookup. hostname returned by SRV lookup.
2. If the SRV lookup fails, the fallback SHOULD be a normal IPv4 or 2. If the SRV lookup fails, the fallback SHOULD be a normal IPv4 or
IPv6 address record resolution to determine the IP address, where IPv6 address record resolution to determine the IP address, where
the port used is the default ManageSieve port of [[anchor8: To- the port used is the default ManageSieve port of 4190.
be-assigned by IANA]].
1.9. Conventions Used in This Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [KEYWORDS].
In examples, "C:" and "S:" indicate lines sent by the client and
server respectively. Line breaks that do not start a new "C:" or
"S:" exist for editorial reasons.
Examples of authentication in this document are using DIGEST-MD5
[DIGEST-MD5] and GSSAPI [GSSAPI] SASL mechanisms.
2. Commands 2. Commands
This section and its subsections describes valid ManageSieve This section and its subsections describe valid ManageSieve commands.
commands. Upon initial connection to the server the client's session Upon initial connection to the server, the client's session is in
is in non-authenticated state. Prior to successful authentication non-authenticated state. Prior to successful authentication, only
only the AUTHENTICATE, CAPABILITY, STARTTLS, LOGOUT and NOOP (see the AUTHENTICATE, CAPABILITY, STARTTLS, LOGOUT, and NOOP (see Section
Section 2.13) commands are valid. ManageSieve extensions MAY define 2.13) commands are valid. ManageSieve extensions MAY define other
other commands which are valid in non-authenticated state. Servers commands that are valid in non-authenticated state. Servers MUST
MUST reject all other commands with a NO response. Clients may reject all other commands with a NO response. Clients may pipeline
pipeline commands (send more than one command at a time without commands (send more than one command at a time without waiting for
waiting for completion of the first command ). However, a group of completion of the first command). However, a group of commands sent
commands sent together MUST NOT have an AUTHENTICATE (*), a STARTTLS together MUST NOT have an AUTHENTICATE (*), a STARTTLS, or a
or a HAVESPACE command anywhere but the last command in the list. HAVESPACE command anywhere but the last command in the list.
(*) - The only exception to this rule is when the AUTHENTICATE (*) - The only exception to this rule is when the AUTHENTICATE
command contains an initial response for a SASL mechanism that allows command contains an initial response for a SASL mechanism that allows
clients to send data first, the mechanism is known to complete in one clients to send data first, the mechanism is known to complete in one
round-trip and the mechanism doesn't negotiate a SASL security layer. round trip, and the mechanism doesn't negotiate a SASL security
Two examples of such SASL mechanisms are PLAIN [PLAIN] and EXTERNAL layer. Two examples of such SASL mechanisms are PLAIN [PLAIN] and
[SASL]. EXTERNAL [SASL].
2.1. AUTHENTICATE Command 2.1. AUTHENTICATE Command
Arguments: String - mechanism Arguments: String - mechanism
String - initial data (optional) String - initial data (optional)
The AUTHENTICATE command indicates a SASL [SASL] authentication The AUTHENTICATE command indicates a SASL [SASL] authentication
mechanism to the server. If the server supports the requested mechanism to the server. If the server supports the requested
authentication mechanism, it performs an authentication protocol authentication mechanism, it performs an authentication protocol
exchange to identify and authenticate the user. Optionally, it also exchange to identify and authenticate the user. Optionally, it also
skipping to change at page 13, line 16 skipping to change at page 11, line 27
The authentication protocol exchange consists of a series of server The authentication protocol exchange consists of a series of server
challenges and client responses that are specific to the selected challenges and client responses that are specific to the selected
authentication mechanism. A server challenge consists of a string authentication mechanism. A server challenge consists of a string
(quoted or literal) followed by a CRLF. The contents of the string (quoted or literal) followed by a CRLF. The contents of the string
is a base-64 encoding [BASE64] of the SASL data. A client response is a base-64 encoding [BASE64] of the SASL data. A client response
consists of a string (quoted or literal) with the base-64 encoding of consists of a string (quoted or literal) with the base-64 encoding of
the SASL data followed by a CRLF. If the client wishes to cancel the the SASL data followed by a CRLF. If the client wishes to cancel the
authentication exchange, it issues a string containing a single "*". authentication exchange, it issues a string containing a single "*".
If the server receives such a response, it MUST reject the If the server receives such a response, it MUST reject the
AUTHENTICATE command by sending an NO reply. AUTHENTICATE command by sending a NO reply.
Note that an empty challenge/response is sent as an empty string. If Note that an empty challenge/response is sent as an empty string. If
the mechanism dictates that the final response is sent by the server the mechanism dictates that the final response is sent by the server,
this data MAY be placed within the data portion of the SASL response this data MAY be placed within the data portion of the SASL response
code to save a round trip. code to save a round trip.
The optional initial-response argument to the AUTHENTICATE command is The optional initial-response argument to the AUTHENTICATE command is
used to save a round trip when using authentication mechanisms that used to save a round trip when using authentication mechanisms that
are defined to send no data in the initial challenge. When the are defined to send no data in the initial challenge. When the
initial-response argument is used with such a mechanism, the initial initial-response argument is used with such a mechanism, the initial
empty challenge is not sent to the client and the server uses the empty challenge is not sent to the client and the server uses the
data in the initial-response argument as if it were sent in response data in the initial-response argument as if it were sent in response
to the empty challenge. If the initial-response argument to the to the empty challenge. If the initial-response argument to the
AUTHENTICATE command is used with a mechanism that sends data in the AUTHENTICATE command is used with a mechanism that sends data in the
initial challenge, the server MUST reject the AUTHENTICATE command by initial challenge, the server MUST reject the AUTHENTICATE command by
sending the NO response. sending the NO response.
The service name specified by this protocol's profile of SASL is The service name specified by this protocol's profile of SASL is
"sieve". "sieve".
Reauthentication is not supported by ManageSieve protocol's profile Reauthentication is not supported by ManageSieve protocol's profile
of SASL. I.e. after a successfully completed AUTHENTICATE command, of SASL. That is, after a successfully completed AUTHENTICATE
no more AUTHENTICATE commands may be issued in the same session. command, no more AUTHENTICATE commands may be issued in the same
After a successful AUTHENTICATE command completes, a server MUST session. After a successful AUTHENTICATE command completes, a server
reject any further AUTHENTICATE commands with a NO reply. However MUST reject any further AUTHENTICATE commands with a NO reply.
note that a server may implement UNAUTHENTICATE extension described
in Section 2.14.1. However, note that a server may implement the UNAUTHENTICATE
extension described in Section 2.14.1.
If a security layer is negotiated through the SASL authentication If a security layer is negotiated through the SASL authentication
exchange, it takes effect immediately following the CRLF that exchange, it takes effect immediately following the CRLF that
concludes the successful authentication exchange for the client, and concludes the successful authentication exchange for the client, and
the CRLF of the OK response for the server. the CRLF of the OK response for the server.
When a security layer takes effect, the ManageSieve protocol is reset When a security layer takes effect, the ManageSieve protocol is reset
to the initial state (the state in ManageSieve after a client has to the initial state (the state in ManageSieve after a client has
connected to the server). The server MUST discard any knowledge connected to the server). The server MUST discard any knowledge
obtained from the client which was not obtained from the SASL (or obtained from the client that was not obtained from the SASL (or TLS)
TLS) negotiation itself. Likewise, the client MUST discard any negotiation itself. Likewise, the client MUST discard any knowledge
knowledge obtained from the server, such as the list of ManageSieve obtained from the server, such as the list of ManageSieve extensions,
extensions, which was not obtained from the SASL (and/or TLS) that was not obtained from the SASL (and/or TLS) negotiation itself.
negotiation itself. (Note that a client MAY compare the advertised (Note that a client MAY compare the advertised SASL mechanisms before
SASL mechanisms before and after authentication in order to detect an and after authentication in order to detect an active down-
active down-negotiation attack. See below.) negotiation attack. See below.)
Once a SASL security layer is established, the server MUST re-issue Once a SASL security layer is established, the server MUST re-issue
the capability results, followed by an OK response. This is the capability results, followed by an OK response. This is
necessary to protect against man-in-the-middle attacks which alter necessary to protect against man-in-the-middle attacks that alter the
the capabilities list prior to SASL negotiation. The capability capabilities list prior to SASL negotiation. The capability results
results MUST include all SASL mechanisms the server was capable of MUST include all SASL mechanisms the server was capable of
negotiating with that client. This is done in order to allow the negotiating with that client. This is done in order to allow the
client to detect active down-negotiation attack. If a user-oriented client to detect an active down-negotiation attack. If a user-
client detects such down-negotiation attack, it SHOULD either notify oriented client detects such a down-negotiation attack, it SHOULD
the user (it MAY give the user the opportunity to continue with the either notify the user (it MAY give the user the opportunity to
ManageSieve session in this case) or close the transport connection continue with the ManageSieve session in this case) or close the
and indicate that a down-negotiation attack might be in progress. If transport connection and indicate that a down-negotiation attack
an automated client detects down-negotiation attack, it SHOULD return might be in progress. If an automated client detects a down-
or log an error indicating that a possible attack might be in negotiation attack, it SHOULD return or log an error indicating that
progress and/or SHOULD close the transport connection. a possible attack might be in progress and/or SHOULD close the
transport connection.
When both [TLS] and SASL security layers are in effect, the TLS When both [TLS] and SASL security layers are in effect, the TLS
encoding MUST be applied (when sending data) after the SASL encoding. encoding MUST be applied (when sending data) after the SASL encoding.
Server implementations SHOULD support SASL proxy authentication so Server implementations SHOULD support SASL proxy authentication so
that an administrator can administer a user's scripts. Proxy that an administrator can administer a user's scripts. Proxy
authentication is when a user authenticates as herself/himself but authentication is when a user authenticates as herself/himself but
requests the server to act (authorize) as another user. requests the server to act (authorize) as another user.
The authorization identity generated by this [SASL] exchange is a The authorization identity generated by this [SASL] exchange is a
skipping to change at page 14, line 51 skipping to change at page 13, line 14
empty string (unless it was transmitted as the empty string), the empty string (unless it was transmitted as the empty string), the
server MUST fail the authentication. server MUST fail the authentication.
If an AUTHENTICATE command fails with a NO response, the client MAY If an AUTHENTICATE command fails with a NO response, the client MAY
try another authentication mechanism by issuing another AUTHENTICATE try another authentication mechanism by issuing another AUTHENTICATE
command. In other words, the client may request authentication types command. In other words, the client may request authentication types
in decreasing order of preference. in decreasing order of preference.
Note that a failed (NO) response to the AUTHENTICATE command may Note that a failed (NO) response to the AUTHENTICATE command may
contain one of the following response codes: AUTH-TOO-WEAK, ENCRYPT- contain one of the following response codes: AUTH-TOO-WEAK, ENCRYPT-
NEEDED or TRANSITION-NEEDED. See Section 1.4 for detailed NEEDED, or TRANSITION-NEEDED. See Section 1.3 for detailed
description of the relevant conditions. description of the relevant conditions.
To ensure interoperability, both client and server implementations of To ensure interoperability, both client and server implementations of
the ManageSieve protocol MUST implement the SCRAM-HMAC-SHA-1 [SCRAM] the ManageSieve protocol MUST implement the SCRAM-SHA-1 [SCRAM] SASL
SASL mechanism, as well as [PLAIN] over [TLS]. mechanism, as well as [PLAIN] over [TLS].
Note: use of PLAIN over TLS reflects current use of PLAIN over TLS in Note: use of PLAIN over TLS reflects current use of PLAIN over TLS in
other email related protocols, however a longer term goal is to other email-related protocols; however, a longer-term goal is to
migrate email related protocols from using PLAIN over TLS to SCRAM- migrate email-related protocols from using PLAIN over TLS to SCRAM-
HMAC-SHA-1 mechanism. SHA-1 mechanism.
Examples (Note that long lines are folded for readability and are not Examples (Note that long lines are folded for readability and are not
part of protocol exchange): part of protocol exchange):
S: "IMPLEMENTATION" "Example1 ManageSieved v001" S: "IMPLEMENTATION" "Example1 ManageSieved v001"
S: "SASL" "DIGEST-MD5 GSSAPI" S: "SASL" "DIGEST-MD5 GSSAPI"
S: "SIEVE" "fileinto vacation" S: "SIEVE" "fileinto vacation"
S: "STARTTLS" S: "STARTTLS"
S: "VERSION" "1.0" S: "VERSION" "1.0"
S: OK S: OK
skipping to change at page 15, line 37 skipping to change at page 14, line 5
cyxjaGFyc2V0PXV0Zi04" cyxjaGFyc2V0PXV0Zi04"
C: "Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iY2hyaXMiLHJlYWxtPSJlbHdvb2 C: "Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iY2hyaXMiLHJlYWxtPSJlbHdvb2
QuaW5ub3NvZnQuZXhhbXBsZS5jb20iLG5vbmNlPSJPQTZNRzl0RVFHbTJo QuaW5ub3NvZnQuZXhhbXBsZS5jb20iLG5vbmNlPSJPQTZNRzl0RVFHbTJo
aCIsbmM9MDAwMDAwMDEsY25vbmNlPSJPQTZNSFhoNlZxVHJSayIsZGlnZX aCIsbmM9MDAwMDAwMDEsY25vbmNlPSJPQTZNSFhoNlZxVHJSayIsZGlnZX
N0LXVyaT0ic2lldmUvZWx3b29kLmlubm9zb2Z0LmV4YW1wbGUuY29tIixy N0LXVyaT0ic2lldmUvZWx3b29kLmlubm9zb2Z0LmV4YW1wbGUuY29tIixy
ZXNwb25zZT1kMzg4ZGFkOTBkNGJiZDc2MGExNTIzMjFmMjE0M2FmNyxxb3 ZXNwb25zZT1kMzg4ZGFkOTBkNGJiZDc2MGExNTIzMjFmMjE0M2FmNyxxb3
A9YXV0aA==" A9YXV0aA=="
S: OK (SASL "cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZ S: OK (SASL "cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZ
mZmZA==") mZmZA==")
A slightly different variant of the same authentication exchange: A slightly different variant of the same authentication exchange is:
S: "IMPLEMENTATION" "Example1 ManageSieved v001" S: "IMPLEMENTATION" "Example1 ManageSieved v001"
S: "SASL" "DIGEST-MD5 GSSAPI" S: "SASL" "DIGEST-MD5 GSSAPI"
S: "SIEVE" "fileinto vacation" S: "SIEVE" "fileinto vacation"
S: "VERSION" "1.0" S: "VERSION" "1.0"
S: "STARTTLS" S: "STARTTLS"
S: OK S: OK
C: Authenticate "DIGEST-MD5" C: Authenticate "DIGEST-MD5"
S: {136} S: {136}
S: cmVhbG09ImVsd29vZC5pbm5vc29mdC5leGFtcGxlLmNvbSIsbm9uY2U9Ik S: cmVhbG09ImVsd29vZC5pbm5vc29mdC5leGFtcGxlLmNvbSIsbm9uY2U9Ik
skipping to change at page 16, line 28 skipping to change at page 15, line 5
QuaW5ub3NvZnQuZXhhbXBsZS5jb20iLG5vbmNlPSJPQTZNRzl0RVFHbTJo QuaW5ub3NvZnQuZXhhbXBsZS5jb20iLG5vbmNlPSJPQTZNRzl0RVFHbTJo
aCIsbmM9MDAwMDAwMDEsY25vbmNlPSJPQTZNSFhoNlZxVHJSayIsZGlnZX aCIsbmM9MDAwMDAwMDEsY25vbmNlPSJPQTZNSFhoNlZxVHJSayIsZGlnZX
N0LXVyaT0ic2lldmUvZWx3b29kLmlubm9zb2Z0LmV4YW1wbGUuY29tIixy N0LXVyaT0ic2lldmUvZWx3b29kLmlubm9zb2Z0LmV4YW1wbGUuY29tIixy
ZXNwb25zZT1kMzg4ZGFkOTBkNGJiZDc2MGExNTIzMjFmMjE0M2FmNyxxb3 ZXNwb25zZT1kMzg4ZGFkOTBkNGJiZDc2MGExNTIzMjFmMjE0M2FmNyxxb3
A9YXV0aA== A9YXV0aA==
S: {56} S: {56}
S: cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZA== S: cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZA==
C: "" C: ""
S: OK S: OK
Another example demonstrating use of SASL PLAIN mechanism under TLS. Another example demonstrating use of SASL PLAIN mechanism under TLS
This example also demonstrate use of SASL "initial response" (the follows. This example also demonstrate use of SASL "initial
second parameter to the Authenticate command): response" (the second parameter to the Authenticate command):
S: "IMPLEMENTATION" "Example1 ManageSieved v001" S: "IMPLEMENTATION" "Example1 ManageSieved v001"
S: "VERSION" "1.0" S: "VERSION" "1.0"
S: "SASL" "" S: "SASL" ""
S: "SIEVE" "fileinto vacation" S: "SIEVE" "fileinto vacation"
S: "STARTTLS" S: "STARTTLS"
S: OK S: OK
C: STARTTLS C: STARTTLS
S: OK S: OK
<TLS negotiation, further commands are under TLS layer> <TLS negotiation, further commands are under TLS layer>
skipping to change at page 17, line 6 skipping to change at page 16, line 6
S: OK S: OK
C: Authenticate "PLAIN" "QJIrweAPyo6Q1T9xu" C: Authenticate "PLAIN" "QJIrweAPyo6Q1T9xu"
S: NO S: NO
C: Authenticate "PLAIN" "QJIrweAPyo6Q1T9xz" C: Authenticate "PLAIN" "QJIrweAPyo6Q1T9xz"
S: NO S: NO
C: Authenticate "PLAIN" "QJIrweAPyo6Q1T9xy" C: Authenticate "PLAIN" "QJIrweAPyo6Q1T9xy"
S: BYE "Too many failed authentication attempts" S: BYE "Too many failed authentication attempts"
<Server closes connection> <Server closes connection>
The following example demonstrates use of SASL "initial response". The following example demonstrates use of SASL "initial response".
It also demonstrates that an empty response can be sent as a literal, It also demonstrates that an empty response can be sent as a literal
and that negotiation a SASL security layer results in the server and that negotiating a SASL security layer results in the server
reissuing server capabilities: re-issuing server capabilities:
C: AUTHENTICATE "GSSAPI" {1488+} C: AUTHENTICATE "GSSAPI" {1488+}
C: YIIE[...1480 octets here ...]dA== C: YIIE[...1480 octets here ...]dA==
S: {208} S: {208}
S: YIGZBgkqhkiG9xIBAgICAG+BiTCBhqADAgEFoQMCAQ+iejB4oAMCARKic S: YIGZBgkqhkiG9xIBAgICAG+BiTCBhqADAgEFoQMCAQ+iejB4oAMCARKic
[...114 octets here ...] [...114 octets here ...]
/yzpAy9p+Y0LanLskOTvMc0MnjgAa4YEr3eJ6 /yzpAy9p+Y0LanLskOTvMc0MnjgAa4YEr3eJ6
C: {0+} C: {0+}
C: C:
S: {44} S: {44}
skipping to change at page 17, line 32 skipping to change at page 16, line 32
S: OK S: OK
<Further commands/responses are under SASL security layer> <Further commands/responses are under SASL security layer>
S: "IMPLEMENTATION" "Example1 ManageSieved v001" S: "IMPLEMENTATION" "Example1 ManageSieved v001"
S: "VERSION" "1.0" S: "VERSION" "1.0"
S: "SASL" "PLAIN DIGEST-MD5 GSSAPI" S: "SASL" "PLAIN DIGEST-MD5 GSSAPI"
S: "SIEVE" "fileinto vacation" S: "SIEVE" "fileinto vacation"
S: "LANGUAGE" "ru" S: "LANGUAGE" "ru"
S: "MAXREDIRECTS" "3" S: "MAXREDIRECTS" "3"
S: ok S: ok
2.1.1. Use of SASL PLAIN mechanism over TLS 2.1.1. Use of SASL PLAIN Mechanism over TLS
This section is normative for ManageSieve client implementations that This section is normative for ManageSieve client implementations that
support SASL [PLAIN] over [TLS]. support SASL [PLAIN] over [TLS].
If a ManageSieve client is willing to use SASL PLAIN over TLS to If a ManageSieve client is willing to use SASL PLAIN over TLS to
authenticate to the ManageSieve server, the client MUST verify the authenticate to the ManageSieve server, the client MUST verify the
server identity (see Section 2.2.1). If the server identity can't be server identity (see Section 2.2.1). If the server identity can't be
verified (e.g. the server has not provided any certificate, or if the verified (e.g., the server has not provided any certificate, or if
certificate verification fails) the client MUST NOT attempt to the certificate verification fails), the client MUST NOT attempt to
authenticate using the SASL PLAIN mechanism. authenticate using the SASL PLAIN mechanism.
2.2. STARTTLS Command 2.2. STARTTLS Command
Support for STARTTLS command in servers is optional. Its Support for STARTTLS command in servers is optional. Its
availability is advertised with "STARTTLS" capability as described in availability is advertised with "STARTTLS" capability as described in
Section 1.8. Section 1.7.
The STARTTLS command requests commencement of a TLS [TLS] The STARTTLS command requests commencement of a TLS [TLS]
negotiation. The negotiation begins immediately after the CRLF in negotiation. The negotiation begins immediately after the CRLF in
the OK response. After a client issues a STARTTLS command, it MUST the OK response. After a client issues a STARTTLS command, it MUST
NOT issue further commands until a server response is seen and the NOT issue further commands until a server response is seen and the
TLS negotiation is complete. TLS negotiation is complete.
The STARTTLS command is only valid in non-authenticated state. The The STARTTLS command is only valid in non-authenticated state. The
server remains in non-authenticated state, even if client credentials server remains in non-authenticated state, even if client credentials
are supplied during the TLS negotiation. The SASL [SASL] EXTERNAL are supplied during the TLS negotiation. The SASL [SASL] EXTERNAL
mechanism MAY be used to authenticate once TLS client credentials are mechanism MAY be used to authenticate once TLS client credentials are
successfully exchanged, but servers supporting the STARTTLS command successfully exchanged, but servers supporting the STARTTLS command
are not required to support the EXTERNAL mechanism. are not required to support the EXTERNAL mechanism.
After the TLS layer is established, the server MUST re-issue the After the TLS layer is established, the server MUST re-issue the
capability results, followed by an OK response. This is necessary to capability results, followed by an OK response. This is necessary to
protect against man-in-the-middle attacks which alter the protect against man-in-the-middle attacks that alter the capabilities
capabilities list prior to STARTTLS. This capability result MUST NOT list prior to STARTTLS. This capability result MUST NOT include the
include the STARTTLS capability. STARTTLS capability.
The client MUST discard cached capability information and replace it The client MUST discard cached capability information and replace it
with the new information. The server MAY advertise different with the new information. The server MAY advertise different
capabilities after STARTTLS. capabilities after STARTTLS.
Example: Example:
C: StartTls C: StartTls
S: oK S: oK
<TLS negotiation, further commands are under TLS layer> <TLS negotiation, further commands are under TLS layer>
skipping to change at page 19, line 27 skipping to change at page 18, line 27
field of the server's certificate. This comparison is field of the server's certificate. This comparison is
performed using the rules for comparison of DNS names in performed using the rules for comparison of DNS names in
Section 2.2.1.1, below. Although the use of the Common Name Section 2.2.1.1, below. Although the use of the Common Name
value is existing practice, it is deprecated, and value is existing practice, it is deprecated, and
Certification Authorities are encouraged to provide Certification Authorities are encouraged to provide
subjectAltName values instead. Note that the TLS subjectAltName values instead. Note that the TLS
implementation may represent DNs in certificates according to implementation may represent DNs in certificates according to
X.500 or other conventions. For example, some X.500 X.500 or other conventions. For example, some X.500
implementations order the RDNs in a DN using a left-to-right implementations order the RDNs in a DN using a left-to-right
(most significant to least significant) convention instead of (most significant to least significant) convention instead of
LDAP's right- to-left convention. LDAP's right-to-left convention.
o When the reference identity is an IP address, the iPAddress o When the reference identity is an IP address, the iPAddress
subjectAltName SHOULD be used by the client for comparison. The subjectAltName SHOULD be used by the client for comparison. The
comparison is performed as described in Section 2.2.1.2. comparison is performed as described in Section 2.2.1.2.
If the server identity check fails, user-oriented clients SHOULD If the server identity check fails, user-oriented clients SHOULD
either notify the user (clients MAY give the user the opportunity to either notify the user (clients MAY give the user the opportunity to
continue with the ManageSieve session in this case) or close the continue with the ManageSieve session in this case) or close the
transport connection and indicate that the server's identity is transport connection and indicate that the server's identity is
suspect. Automated clients SHOULD return or log an error indicating suspect. Automated clients SHOULD return or log an error indicating
that the server's identity is suspect and/or SHOULD close the that the server's identity is suspect and/or SHOULD close the
transport connection. Automated clients MAY provide a configuration transport connection. Automated clients MAY provide a configuration
setting that disables this check, but MUST provide a setting which setting that disables this check, but MUST provide a setting that
enables it. enables it.
Beyond the server identity check described in this section, clients Beyond the server identity check described in this section, clients
should be prepared to do further checking to ensure that the server should be prepared to do further checking to ensure that the server
is authorized to provide the service it is requested to provide. The is authorized to provide the service it is requested to provide. The
client may need to make use of local policy information in making client may need to make use of local policy information in making
this determination. this determination.
2.2.1.1. Comparison of DNS Names 2.2.1.1. Comparison of DNS Names
skipping to change at page 20, line 24 skipping to change at page 19, line 24
o in step 1, the domain name SHALL be considered a "stored string"; o in step 1, the domain name SHALL be considered a "stored string";
o in step 3, set the flag called "UseSTD3ASCIIRules"; o in step 3, set the flag called "UseSTD3ASCIIRules";
o in step 4, process each label with the "ToASCII" operation; and o in step 4, process each label with the "ToASCII" operation; and
o in step 5, change all label separators to U+002E (full stop). o in step 5, change all label separators to U+002E (full stop).
After performing the "to-ASCII" conversion, the DNS labels and names After performing the "to-ASCII" conversion, the DNS labels and names
MUST be compared for equality according to the rules specified in MUST be compared for equality according to the rules specified in
Section 3 of [RFC3490], i.e. once all label separators are replaced Section 3 of [RFC3490]; i.e., once all label separators are replaced
with U+002E (dot) they are compared in the case-insensitive manner. with U+002E (dot) they are compared in the case-insensitive manner.
The '*' (ASCII 42) wildcard character is allowed in subjectAltName The '*' (ASCII 42) wildcard character is allowed in subjectAltName
values of type dNSName, and then only as the left-most (least values of type dNSName, and then only as the left-most (least
significant) DNS label in that value. This wildcard matches any significant) DNS label in that value. This wildcard matches any
left-most DNS label in the server name. That is, the subject left-most DNS label in the server name. That is, the subject
*.example.com matches the server names a.example.com and *.example.com matches the server names a.example.com and
b.example.com, but does not match example.com or a.b.example.com. b.example.com, but does not match example.com or a.b.example.com.
2.2.1.2. Comparison of IP Addresses 2.2.1.2. Comparison of IP Addresses
skipping to change at page 21, line 14 skipping to change at page 20, line 14
2.3. LOGOUT Command 2.3. LOGOUT Command
The client sends the LOGOUT command when it is finished with a The client sends the LOGOUT command when it is finished with a
connection and wishes to terminate it. The server MUST reply with an connection and wishes to terminate it. The server MUST reply with an
OK response. The server MUST ignore commands issued by the client OK response. The server MUST ignore commands issued by the client
after the LOGOUT command. after the LOGOUT command.
The client SHOULD wait for the OK response before closing the The client SHOULD wait for the OK response before closing the
connection. This avoids the TCP connection going into the TIME_WAIT connection. This avoids the TCP connection going into the TIME_WAIT
state on the server. In order to avoid going into the the TIME_WAIT state on the server. In order to avoid going into the TIME_WAIT TCP
TCP state the server MAY wait for a short while for the client to state, the server MAY wait for a short while for the client to close
close the TCP connection first. Whether or not the server waits for the TCP connection first. Whether or not the server waits for the
the client to close the connection, it MUST then close the connection client to close the connection, it MUST then close the connection
itself. itself.
Example: Example:
C: Logout C: Logout
S: Ok S: Ok
<connection is terminated> <connection is terminated>
2.4. CAPABILITY Command 2.4. CAPABILITY Command
The CAPABILITY command requests the server capabilities as described The CAPABILITY command requests the server capabilities as described
earlier in this document. It has no parameters. earlier in this document. It has no parameters.
Example: Example:
C: CAPABILITY C: CAPABILITY
S: "IMPLEMENTATION" "Example1 ManageSieved v001" S: "IMPLEMENTATION" "Example1 ManageSieved v001"
S: "VERSION" "1.0" S: "VERSION" "1.0"
S: "SASL" "PLAIN OTP GSSAPI" S: "SASL" "PLAIN SCRAM-SHA-1 GSSAPI"
S: "SIEVE" "fileinto vacation" S: "SIEVE" "fileinto vacation"
S: "STARTTLS" S: "STARTTLS"
S: OK S: OK
2.5. HAVESPACE Command 2.5. HAVESPACE Command
Arguments: String - name Arguments: String - name
Number - script size Number - script size
The HAVESPACE command is used to query the server for available The HAVESPACE command is used to query the server for available
space. Clients specify the name they wish to save the script as and space. Clients specify the name they wish to save the script as and
its size in octets. Both parameters can be used by the server to see its size in octets. Both parameters can be used by the server to see
if the script with the specified name and size is within user's if the script with the specified name and size is within a user's
quota(s), for example the server MAY use the script name to check if quota(s). For example, the server MAY use the script name to check
a script would be replaced or a new one would be created. Servers if a script would be replaced or a new one would be created. Servers
respond with an NO if storing a script with that name and size would respond with a NO if storing a script with that name and size would
fail or OK otherwise. Clients SHOULD issue this command before fail or OK otherwise. Clients SHOULD issue this command before
attempting to place a script on the server. attempting to place a script on the server.
Note that the OK response from the HAVESPACE command does not Note that the OK response from the HAVESPACE command does not
constitute a guarantee of success as server disk space conditions constitute a guarantee of success as server disk space conditions
could change between the client issuing the HAVESPACE and the client could change between the client issuing the HAVESPACE and the client
issuing the PUTSCRIPT commands. A QUOTA response code (see issuing the PUTSCRIPT commands. A QUOTA response code (see
Section 1.4) remains a possible (albeit unlikely) response to a Section 1.3) remains a possible (albeit unlikely) response to a
subsequent PUTSCRIPT with the same name and size. subsequent PUTSCRIPT with the same name and size.
Example: Example:
C: HAVESPACE "myscript" 999999 C: HAVESPACE "myscript" 999999
S: NO (QUOTA/MAXSIZE) "Quota exceeded" S: NO (QUOTA/MAXSIZE) "Quota exceeded"
C: HAVESPACE "foobar" 435 C: HAVESPACE "foobar" 435
S: OK S: OK
skipping to change at page 22, line 36 skipping to change at page 21, line 36
The PUTSCRIPT command is used by the client to submit a Sieve script The PUTSCRIPT command is used by the client to submit a Sieve script
to the server. to the server.
If the script already exists, upon success the old script will be If the script already exists, upon success the old script will be
overwritten. The old script MUST NOT be overwritten if PUTSCRIPT overwritten. The old script MUST NOT be overwritten if PUTSCRIPT
fails in any way. A script of zero length SHOULD be disallowed. fails in any way. A script of zero length SHOULD be disallowed.
This command places the script on the server. It does not affect This command places the script on the server. It does not affect
whether the script is processed on incoming mail, unless it replaces whether the script is processed on incoming mail, unless it replaces
the script which is already active. The SETACTIVE command is used to the script that is already active. The SETACTIVE command is used to
mark a script as active. mark a script as active.
When submitting large scripts clients SHOULD use the HAVESPACE When submitting large scripts, clients SHOULD use the HAVESPACE
command beforehand to query if the server is willing to accept a command beforehand to query if the server is willing to accept a
script of that size. script of that size.
The server MUST check the submitted script for validity, which The server MUST check the submitted script for validity, which
includes checking that the script complies with the Sieve grammar includes checking that the script complies with the Sieve grammar
[SIEVE], and that all Sieve extensions mentioned in script's [SIEVE] and that all Sieve extensions mentioned in the script's
"require" statement(s) are supported by the Sieve interpreter. (Note "require" statement(s) are supported by the Sieve interpreter. (Note
that if the Sieve interpreter supports the Sieve "ihave" extension that if the Sieve interpreter supports the Sieve "ihave" extension
[I-HAVE], any unrecognized/unsupported extension mentioned in the [I-HAVE], any unrecognized/unsupported extension mentioned in the
"ihave" test MUST NOT cause the validation failure.) Other checks "ihave" test MUST NOT cause the validation failure.) Other checks
such as validating the supplied command arguments for each command such as validating the supplied command arguments for each command
MAY be performed. Essentially, the performed validation SHOULD be MAY be performed. Essentially, the performed validation SHOULD be
the same as performed when compiling the script for execution. the same as performed when compiling the script for execution.
Implementations that use a binary representation to store compiled Implementations that use a binary representation to store compiled
scripts can extend the validation to a full compilation, in order to scripts can extend the validation to a full compilation, in order to
avoid validating uploaded scripts multiple times. avoid validating uploaded scripts multiple times.
If the script fails the validation the server MUST reply with a NO If the script fails the validation, the server MUST reply with a NO
response. Any script that fails the validity test MUST NOT be stored response. Any script that fails the validity test MUST NOT be stored
on the server. The message given with a NO response MUST be human on the server. The message given with a NO response MUST be human
readable and SHOULD contain a specific error message giving the line readable and SHOULD contain a specific error message giving the line
number of the first error. Implementors should strive to produce number of the first error. Implementors should strive to produce
helpful error messages similar to those given by programming language helpful error messages similar to those given by programming language
compilers. Client implementations should note that this may be a compilers. Client implementations should note that this may be a
multiline literal string with more than one error message separated multiline literal string with more than one error message separated
by CRLFs. The human readable message is in the language returned in by CRLFs. The human-readable message is in the language returned in
the latest LANGUAGE capability (or in "i-default", see Section 1.8), the latest LANGUAGE capability (or in "i-default"; see Section 1.7),
encoded in UTF-8 [UTF-8]. encoded in UTF-8 [UTF-8].
An OK response MAY contain the WARNINGS response code. In such case An OK response MAY contain the WARNINGS response code. In such a
the human readable message that follows the OK response SHOULD case the human-readable message that follows the OK response SHOULD
contain a specific warning message (or messages) giving the line contain a specific warning message (or messages) giving the line
number(s) in the script that might contain errors not intended by the number(s) in the script that might contain errors not intended by the
script writer. The human readable message is in the language script writer. The human-readable message is in the language
returned in the latest LANGUAGE capability (or in "i-default", see returned in the latest LANGUAGE capability (or in "i-default"; see
Section 1.8), encoded in UTF-8 [UTF-8] A client seeing such response Section 1.7), encoded in UTF-8 [UTF-8]. A client seeing such a
code SHOULD present the message to the user. response code SHOULD present the message to the user.
Examples: Examples:
C: Putscript "foo" {31+} C: Putscript "foo" {31+}
C: #comment C: #comment
C: InvalidSieveCommand C: InvalidSieveCommand
C: C:
S: NO "line 2: Syntax error" S: NO "line 2: Syntax error"
C: Putscript "mysievescript" {110+} C: Putscript "mysievescript" {110+}
skipping to change at page 24, line 37 skipping to change at page 23, line 37
C: C:
C: if envelope :contains "to" "tmartin+lists" { C: if envelope :contains "to" "tmartin+lists" {
C: redirect "lists@groups.example.com"; C: redirect "lists@groups.example.com";
C: } C: }
S: OK (WARNINGS) "line 8: server redirect action S: OK (WARNINGS) "line 8: server redirect action
limit is 2, this redirect might be ignored" limit is 2, this redirect might be ignored"
2.7. LISTSCRIPTS Command 2.7. LISTSCRIPTS Command
This command lists the scripts the user has on the server. Upon This command lists the scripts the user has on the server. Upon
success a list of CRLF separated script names (each represented as a success, a list of CRLF-separated script names (each represented as a
quoted or literal string) is returned followed by an OK response. If quoted or literal string) is returned followed by an OK response. If
there exists an active script the atom ACTIVE is appended to the there exists an active script, the atom ACTIVE is appended to the
corresponding script name. The atom ACTIVE MUST NOT appear on more corresponding script name. The atom ACTIVE MUST NOT appear on more
than one response line. than one response line.
Example: Example:
C: Listscripts C: Listscripts
S: "summer_script" S: "summer_script"
S: "vacation_script" S: "vacation_script"
S: {13} S: {13}
S: clever"script S: clever"script
skipping to change at page 25, line 25 skipping to change at page 24, line 25
C: listscripts C: listscripts
S: "summer_script" S: "summer_script"
S: "main_script" active S: "main_script" active
S: OK S: OK
2.8. SETACTIVE Command 2.8. SETACTIVE Command
Arguments: String - script name Arguments: String - script name
This command sets a script active. If the script name is the empty This command sets a script active. If the script name is the empty
string (i.e. "") then any active script is disabled. Disabling an string (i.e., ""), then any active script is disabled. Disabling an
active script when there is no script active is not an error and MUST active script when there is no script active is not an error and MUST
result in OK reply. result in an OK reply.
If the script does not exist on the server then the server MUST reply If the script does not exist on the server, then the server MUST
with a NO response. Such reply SHOULD contain the NONEXISTENT reply with a NO response. Such a reply SHOULD contain the
response code. NONEXISTENT response code.
Examples: Examples:
C: Setactive "vacationscript" C: Setactive "vacationscript"
S: Ok S: Ok
C: Setactive "" C: Setactive ""
S: Ok S: Ok
C: Setactive "baz" C: Setactive "baz"
skipping to change at page 26, line 4 skipping to change at page 25, line 6
S: Ok S: Ok
C: Setactive "baz" C: Setactive "baz"
S: No (NONEXISTENT) "There is no script by that name" S: No (NONEXISTENT) "There is no script by that name"
C: Setactive "baz" C: Setactive "baz"
S: No (NONEXISTENT) {31} S: No (NONEXISTENT) {31}
S: There is no script by that name S: There is no script by that name
2.9. GETSCRIPT Command 2.9. GETSCRIPT Command
Arguments: String - script name Arguments: String - script name
This command gets the contents of the specified script. If the This command gets the contents of the specified script. If the
script does not exist the server MUST reply with a NO response. Such script does not exist, the server MUST reply with a NO response.
reply SHOULD contain the NONEXISTENT response code. Such a reply SHOULD contain the NONEXISTENT response code.
Upon success a string with the contents of the script is returned Upon success, a string with the contents of the script is returned
followed by a OK response. followed by an OK response.
Example: Example:
C: Getscript "myscript" C: Getscript "myscript"
S: {54} S: {54}
S: #this is my wonderful script S: #this is my wonderful script
S: reject "I reject all"; S: reject "I reject all";
S: S:
S: OK S: OK
2.10. DELETESCRIPT Command 2.10. DELETESCRIPT Command
Arguments: String - script name Arguments: String - script name
This command is used to delete a user's Sieve script. Servers MUST This command is used to delete a user's Sieve script. Servers MUST
reply with a NO response if the script does not exist. Such reply with a NO response if the script does not exist. Such
responses SHOULD include the NONEXISTENT response code. responses SHOULD include the NONEXISTENT response code.
The server MUST NOT allow the client to delete an active script, so The server MUST NOT allow the client to delete an active script, so
the server MUST reply with a NO response if attempted. Such response the server MUST reply with a NO response if attempted. Such a
SHOULD contain the ACTIVE response code. If a client wishes to response SHOULD contain the ACTIVE response code. If a client wishes
delete an active script it should use the SETACTIVE command to to delete an active script, it should use the SETACTIVE command to
disable the script first. disable the script first.
Example: Example:
C: Deletescript "foo" C: Deletescript "foo"
S: Ok S: Ok
C: Deletescript "baz" C: Deletescript "baz"
S: No (ACTIVE) "You may not delete an active script" S: No (ACTIVE) "You may not delete an active script"
2.11. RENAMESCRIPT Command 2.11. RENAMESCRIPT Command
Arguments: String - Old Script name Arguments: String - Old Script name
String - New Script name String - New Script name
This command is used to rename a user's Sieve script. Servers MUST This command is used to rename a user's Sieve script. Servers MUST
reply with a NO response if the old script does not exist (in which reply with a NO response if the old script does not exist (in which
case the NONEXISTENT response code SHOULD be included), or a script case the NONEXISTENT response code SHOULD be included), or a script
with the new name already exists (in which case the ALREADYEXISTS with the new name already exists (in which case the ALREADYEXISTS
response code SHOULD be included). Renaming the active script is response code SHOULD be included). Renaming the active script is
allowed, the renamed script remains active. allowed; the renamed script remains active.
Example: Example:
C: Renamescript "foo" "bar" C: Renamescript "foo" "bar"
S: Ok S: Ok
C: Renamescript "baz" "bar" C: Renamescript "baz" "bar"
S: No "bar already exists" S: No "bar already exists"
If the server doesn't support the RENAMESCRIPT command, the client If the server doesn't support the RENAMESCRIPT command, the client
can emulate it by performing the following steps: can emulate it by performing the following steps:
1. List available scripts with LISTSCRIPTS. If the script with the 1. List available scripts with LISTSCRIPTS. If the script with the
new script name exists, then the client should ask the user new script name exists, then the client should ask the user
whether to abort the operation, to replace the script (by issuing whether to abort the operation, to replace the script (by issuing
the DELETESCRIPT <newname> after that) or to chose a different the DELETESCRIPT <newname> after that), or to choose a different
name. name.
2. Download the old script with GETSCRIPT <oldname>. 2. Download the old script with GETSCRIPT <oldname>.
3. Upload the old script with the new name: PUTSCRIPT <newname>. 3. Upload the old script with the new name: PUTSCRIPT <newname>.
4. If the old script was active (as reported by LISTSCRIPTS in step 4. If the old script was active (as reported by LISTSCRIPTS in step
1), then make the new script active: SETACTIVE <newname> 1), then make the new script active: SETACTIVE <newname>.
5. Delete the old script: DELETESCRIPT <oldname> 5. Delete the old script: DELETESCRIPT <oldname>.
Note that these steps don't describe how to handle various other Note that these steps don't describe how to handle various other
error conditions (for example NO response containing QUOTA response error conditions (for example, NO response containing QUOTA response
code in step 3). Error handling is left as an excercise for the code in step 3). Error handling is left as an exercise for the
reader. reader.
2.12. CHECKSCRIPT Command 2.12. CHECKSCRIPT Command
Arguments: String - Script content Arguments: String - Script content
The CHECKSCRIPT command is used by the client to verify Sieve script The CHECKSCRIPT command is used by the client to verify Sieve script
validity without storing the script on the server. validity without storing the script on the server.
The server MUST check the submitted script for syntactic validity, The server MUST check the submitted script for syntactic validity,
which includes checking that all Sieve extensions mentioned in Sieve which includes checking that all Sieve extensions mentioned in Sieve
script "require" statement(s) are supported by the Sieve interpreter. script "require" statement(s) are supported by the Sieve interpreter.
(Note that if the Sieve interpreter supports the Sieve "ihave" (Note that if the Sieve interpreter supports the Sieve "ihave"
extension [I-HAVE], any unrecognized/unsupported extension mentioned extension [I-HAVE], any unrecognized/unsupported extension mentioned
in the "ihave" test MUST NOT cause the syntactic validation failure.) in the "ihave" test MUST NOT cause the syntactic validation failure.)
If the script fails this test the server MUST reply with a NO If the script fails this test, the server MUST reply with a NO
response. The message given with a NO response MUST be human response. The message given with a NO response MUST be human
readable and SHOULD contain a specific error message giving the line readable and SHOULD contain a specific error message giving the line
number of the first error. Implementors should strive to produce number of the first error. Implementors should strive to produce
helpful error messages similar to those given by programming language helpful error messages similar to those given by programming language
compilers. Client implementations should note that this may be a compilers. Client implementations should note that this may be a
multiline literal string with more than one error message separated multiline literal string with more than one error message separated
by CRLFs. The human readable message is in the language returned in by CRLFs. The human-readable message is in the language returned in
the latest LANGUAGE capability (or in "i-default", see Section 1.8), the latest LANGUAGE capability (or in "i-default"; see Section 1.7),
encoded in UTF-8 [UTF-8]. encoded in UTF-8 [UTF-8].
Examples: Examples:
C: CheckScript {31+} C: CheckScript {31+}
C: #comment C: #comment
C: InvalidSieveCommand C: InvalidSieveCommand
C: C:
S: NO "line 2: Syntax error" S: NO "line 2: Syntax error"
A ManageSieve server supporting this command MUST NOT check if the A ManageSieve server supporting this command MUST NOT check if the
script will put the current user over its quota limit. script will put the current user over its quota limit.
An OK response MAY contain the WARNINGS response code. In such case An OK response MAY contain the WARNINGS response code. In such a
the human readable message that follows the OK response SHOULD case, the human-readable message that follows the OK response SHOULD
contain a specific warning message (or messages) giving the line contain a specific warning message (or messages) giving the line
number(s) in the script that might contain errors not intended by the number(s) in the script that might contain errors not intended by the
script writer. The human readable message is in the language script writer. The human-readable message is in the language
returned in the latest LANGUAGE capability (or in "i-default", see returned in the latest LANGUAGE capability (or in "i-default"; see
Section 1.8), encoded in UTF-8 [UTF-8] A client seeing such response Section 1.7), encoded in UTF-8 [UTF-8]. A client seeing such a
code SHOULD present the message to the user. response code SHOULD present the message to the user.
2.13. NOOP Command 2.13. NOOP Command
Arguments: String - tag to echo back (optional) Arguments: String - tag to echo back (optional)
The NOOP command does nothing, beyond returning a response to the The NOOP command does nothing, beyond returning a response to the
client. It may be used by clients for protocol re-synchronisation or client. It may be used by clients for protocol re-synchronization or
to reset any inactivity auto-logout timer on the server. to reset any inactivity auto-logout timer on the server.
The response to the NOOP command is always OK, followed by the TAG The response to the NOOP command is always OK, followed by the TAG
response code together with the supplied string; if no string was response code together with the supplied string. If no string was
supplied in the NOOP command, the TAG response code MUST NOT be supplied in the NOOP command, the TAG response code MUST NOT be
included. included.
Examples: Examples:
C: NOOP C: NOOP
S: OK "NOOP completed" S: OK "NOOP completed"
C: NOOP "STARTTLS-SYNC-42" C: NOOP "STARTTLS-SYNC-42"
S: OK (TAG {16} S: OK (TAG {16}
S: STARTTLS-SYNC-42) "Done" S: STARTTLS-SYNC-42) "Done"
2.14. Recommended extensions 2.14. Recommended Extensions
The UNAUTHENTICATE extension (advertised as the "UNAUTHENTICATE" The UNAUTHENTICATE extension (advertised as the "UNAUTHENTICATE"
capability with no parameters) defines a new UNAUTHENTICATE command, capability with no parameters) defines a new UNAUTHENTICATE command,
which allows a client to return the server to non-authenticated which allows a client to return the server to non-authenticated
state. Support for this extension is RECOMMENDED. state. Support for this extension is RECOMMENDED.
2.14.1. UNAUTHENTICATE Command 2.14.1. UNAUTHENTICATE Command
The UNAUTHENTICATE command returns the server to the non- The UNAUTHENTICATE command returns the server to the
authenticated state. It doesn't affect any previously established non-authenticated state. It doesn't affect any previously
TLS [TLS] or SASL (Section 2.1) security layer. established TLS [TLS] or SASL (Section 2.1) security layer.
The UNAUTHENTICATE command is only valid in authenticated state. If The UNAUTHENTICATE command is only valid in authenticated state. If
issued in a wrong state, the server MUST reject it with a NO issued in a wrong state, the server MUST reject it with a NO
response. response.
The UNAUTHENTICATE command has no parameters. The UNAUTHENTICATE command has no parameters.
When issued in the authenticated state, the UNAUTHENTICATE command When issued in the authenticated state, the UNAUTHENTICATE command
MUST NOT fail (i.e. it must never return anything other than OK or MUST NOT fail (i.e., it must never return anything other than OK or
BYE) BYE).
3. Sieve URL Scheme 3. Sieve URL Scheme
URI scheme name: sieve URI scheme name: sieve
Status: permanent Status: permanent
URI scheme syntax: URI scheme syntax: Described using ABNF [ABNF]. Some ABNF
productions not defined below are from [URI-GEN].
Described using ABNF [ABNF]. Some ABNF productions not defined
below are from [URI-GEN].
sieveurl = sieveurl-server / sieveurl-list-scripts / sieveurl = sieveurl-server / sieveurl-list-scripts /
sieveurl-script sieveurl-script
sieveurl-server = "sieve://" authority sieveurl-server = "sieve://" authority
sieveurl-list-scripts = "sieve://" authority ["/"] sieveurl-list-scripts = "sieve://" authority ["/"]
sieveurl-script = "sieve://" authority "/" sieveurl-script = "sieve://" authority "/"
[owner "/"] scriptname [owner "/"] scriptname
skipping to change at page 30, line 40 skipping to change at page 29, line 46
scriptname = 1*ochar scriptname = 1*ochar
;; %-encoded version of UTF-8 representation ;; %-encoded version of UTF-8 representation
;; of the script name. ;; of the script name.
;; Note that ASCII characters such as " ", ";", ;; Note that ASCII characters such as " ", ";",
;; "&", "=", "/" and "?" must be %-encoded ;; "&", "=", "/" and "?" must be %-encoded
;; as per rule specified in [URI-GEN]. ;; as per rule specified in [URI-GEN].
ochar = unreserved / pct-encoded / sub-delims-sh / ochar = unreserved / pct-encoded / sub-delims-sh /
":" / "@" ":" / "@"
;; Same as [URI-GEN] 'pchar' ;; Same as [URI-GEN] 'pchar',
;; but without ";", "&" and "=". ;; but without ";", "&" and "=".
unreserved = <defined in [URI-GEN]> unreserved = <defined in [URI-GEN]>
pct-encoded = <defined in [URI-GEN]> pct-encoded = <defined in [URI-GEN]>
sub-delims-sh = "!" / "$" / "'" / "(" / ")" / sub-delims-sh = "!" / "$" / "'" / "(" / ")" /
"*" / "+" / "," "*" / "+" / ","
;; Same as [URI-GEN] sub-delims, ;; Same as [URI-GEN] sub-delims,
;; but without ";", "&" and "=". ;; but without ";", "&" and "=".
URI scheme semantics: URI scheme semantics:
A Sieve URL identifies a Sieve server or a Sieve script on a Sieve A Sieve URL identifies a Sieve server or a Sieve script on a Sieve
server. The latter form is associated with the application/sieve server. The latter form is associated with the application/sieve
MIME type defined in [SIEVE]. There is no MIME type associated MIME type defined in [SIEVE]. There is no MIME type associated
skipping to change at page 31, line 12 skipping to change at page 30, line 16
;; Same as [URI-GEN] sub-delims, ;; Same as [URI-GEN] sub-delims,
;; but without ";", "&" and "=". ;; but without ";", "&" and "=".
URI scheme semantics: URI scheme semantics:
A Sieve URL identifies a Sieve server or a Sieve script on a Sieve A Sieve URL identifies a Sieve server or a Sieve script on a Sieve
server. The latter form is associated with the application/sieve server. The latter form is associated with the application/sieve
MIME type defined in [SIEVE]. There is no MIME type associated MIME type defined in [SIEVE]. There is no MIME type associated
with the former form of Sieve URI. with the former form of Sieve URI.
The server form is used in the REFERRAL response code (see The server form is used in the REFERRAL response code (see Section
Section 1.4 in order to designate another server where the client 1.3) in order to designate another server where the client should
should perform its operations. perform its operations.
The script form allows to retrieve (GETSCRIPT), update The script form allows to retrieve (GETSCRIPT), update
(PUTSCRIPT), delete (DELETESCRIPT) or activate (SETACTIVE) the (PUTSCRIPT), delete (DELETESCRIPT), or activate (SETACTIVE) the
named script, however the most typical action would be to retrieve named script; however, the most typical action would be to
the script. If the script name is empty (omitted), the URI retrieve the script. If the script name is empty (omitted), the
requests that the client lists available scripts using the URI requests that the client lists available scripts using the
LISTSCRIPTS command. LISTSCRIPTS command.
Encoding considerations: Encoding considerations:
The script name and/or the owner, if present, is in UTF-8. Non- The script name and/or the owner, if present, is in UTF-8. Non--
US-ASCII UTF-8 octets MUST be percent-encoded as described in US-ASCII UTF-8 octets MUST be percent-encoded as described in
[URI-GEN]. US-ASCII characters such as " " (space), ";", "&", [URI-GEN]. US-ASCII characters such as " " (space), ";", "&",
"=", "/" and "?" MUST be %-encoded as described in [URI-GEN]. "=", "/" and "?" MUST be %-encoded as described in [URI-GEN].
Note that "&" and "?" are in this list in order to allow for Note that "&" and "?" are in this list in order to allow for
future extensions. future extensions.
Note that the empty owner (e.g. sieve://example.com//script) is Note that the empty owner (e.g., sieve://example.com//script) is
different from the missing owner (e.g. sieve://example.com/script) different from the missing owner (e.g.,
and is reserved for referencing global scripts. sieve://example.com/script) and is reserved for referencing global
scripts.
The user name (in the "authority" part), if present, is in UTF-8. The user name (in the "authority" part), if present, is in UTF-8.
Non-US-ASCII UTF-8 octets MUST be percent-encoded as described in Non-US-ASCII UTF-8 octets MUST be percent-encoded as described in
[URI-GEN]. [URI-GEN].
Applications/protocols that use this URI scheme name: Applications/protocols that use this URI scheme name:
ManageSieve [RFC XXXX] clients and servers. Clients that can store ManageSieve [RFC5804] clients and servers. Clients that can store
user preferences in protocols such as [LDAP] or [ACAP]. user preferences in protocols such as [LDAP] or [ACAP].
Interoperability considerations: None. Interoperability considerations: None.
Security considerations: Security considerations:
The <scriptname> part of a ManageSieve URL might potentially disclose The <scriptname> part of a ManageSieve URL might potentially disclose
some confidential information about the author of the script or, some confidential information about the author of the script or,
depending on a ManageSieve implementation, about configuration of the depending on a ManageSieve implementation, about configuration of the
mail system. The latter might be used to prepare for a more complex mail system. The latter might be used to prepare for a more complex
attack on the mail system. attack on the mail system.
skipping to change at page 32, line 19 skipping to change at page 31, line 26
security layer. security layer.
Contact: Alexey Melnikov <alexey.melnikov@isode.com> Contact: Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG. Author/Change controller: IESG.
References: This document and RFC 5228 [SIEVE]. References: This document and RFC 5228 [SIEVE].
4. Formal Syntax 4. Formal Syntax
The following syntax specification uses the augmented Backus-Naur The following syntax specification uses the Augmented Backus-Naur
Form (BNF) notation as specified in [ABNF]. This uses the ABNF core Form (BNF) notation as specified in [ABNF]. This uses the ABNF core
rules as specified in Appendix A of the ABNF specification [ABNF]. rules as specified in Appendix A of the ABNF specification [ABNF].
"UTF8-2", "UTF8-3" and "UTF8-4" non-terminal are defined in [UTF-8]. "UTF8-2", "UTF8-3", and "UTF8-4" non-terminal are defined in [UTF-8].
Except as noted otherwise, all alphabetic characters are case- Except as noted otherwise, all alphabetic characters are case-
insensitive. The use of upper or lower case characters to define insensitive. The use of upper- or lowercase characters to define
token strings is for editorial clarity only. Implementations MUST token strings is for editorial clarity only. Implementations MUST
accept these strings in a case-insensitive fashion. accept these strings in a case-insensitive fashion.
SAFE-CHAR = %x01-09 / %x0B-0C / %x0E-21 / %x23-5B / SAFE-CHAR = %x01-09 / %x0B-0C / %x0E-21 / %x23-5B /
%x5D-7F %x5D-7F
;; any TEXT-CHAR except QUOTED-SPECIALS ;; any TEXT-CHAR except QUOTED-SPECIALS
QUOTED-CHAR = SAFE-UTF8-CHAR / DQUOTE QUOTED-SPECIALS QUOTED-CHAR = SAFE-UTF8-CHAR / "\" QUOTED-SPECIALS
QUOTED-SPECIALS = DQUOTE / "\" QUOTED-SPECIALS = DQUOTE / "\"
SAFE-UTF8-CHAR = SAFE-CHAR / UTF8-2 / UTF8-3 / UTF8-4 SAFE-UTF8-CHAR = SAFE-CHAR / UTF8-2 / UTF8-3 / UTF8-4
;; <UTF8-2>, <UTF8-3> and <UTF8-4> ;; <UTF8-2>, <UTF8-3>, and <UTF8-4>
;; are defined in [UTF-8] ;; are defined in [UTF-8].
ATOM-CHAR = "!" / %x23-27 / %x2A-5B / %x5D-7A / %x7C-7E ATOM-CHAR = "!" / %x23-27 / %x2A-5B / %x5D-7A / %x7C-7E
;; Any CHAR except ATOM-SPECIALS ;; Any CHAR except ATOM-SPECIALS
ATOM-SPECIALS = "(" / ")" / "{" / SP / CTL / ATOM-SPECIALS = "(" / ")" / "{" / SP / CTL / QUOTED-SPECIALS
QUOTED-SPECIALS
NZDIGIT = %x31-39 NZDIGIT = %x31-39
;; 1-9 ;; 1-9
atom = 1*1024ATOM-CHAR atom = 1*1024ATOM-CHAR
iana-token = atom iana-token = atom
;; MUST be registered with IANA ;; MUST be registered with IANA
auth-type = DQUOTE auth-type-name DQUOTE auth-type = DQUOTE auth-type-name DQUOTE
auth-type-name = iana-token auth-type-name = iana-token
;; as defined in SASL [SASL] ;; as defined in SASL [SASL]
command = (command-any / command-auth / command = (command-any / command-auth /
command-nonauth) CRLF command-nonauth) CRLF
skipping to change at page 34, line 20 skipping to change at page 33, line 26
new-sieve-name = sieve-name new-sieve-name = sieve-name
command-setactive = "SETACTIVE" SP active-sieve-name command-setactive = "SETACTIVE" SP active-sieve-name
command-starttls = "STARTTLS" command-starttls = "STARTTLS"
command-unauthenticate= "UNAUTHENTICATE" command-unauthenticate= "UNAUTHENTICATE"
extend-token = atom extend-token = atom
;; MUST be defined by a standards track or ;; MUST be defined by a Standards Track or
;; IESG approved experimental protocol ;; IESG-approved experimental protocol
;; extension ;; extension
extension-data = extension-item *(SP extension-item) extension-data = extension-item *(SP extension-item)
extension-item = extend-token / string / number / extension-item = extend-token / string / number /
"(" [extension-data] ")" "(" [extension-data] ")"
literal-c2s = "{" number "+}" CRLF *OCTET literal-c2s = "{" number "+}" CRLF *OCTET
;; The number represents the number of ;; The number represents the number of
;; octets. ;; octets.
skipping to change at page 35, line 6 skipping to change at page 34, line 16
;; A 32-bit unsigned number ;; A 32-bit unsigned number
;; with no extra leading zeros. ;; with no extra leading zeros.
;; (0 <= n < 4,294,967,296) ;; (0 <= n < 4,294,967,296)
number-str = string number-str = string
;; <number> encoded as a <string>. ;; <number> encoded as a <string>.
quoted = DQUOTE *1024QUOTED-CHAR DQUOTE quoted = DQUOTE *1024QUOTED-CHAR DQUOTE
;; limited to 1024 octets between the <">s ;; limited to 1024 octets between the <">s
resp-code = "AUTH-TOO-WEAK" / "ENCRYPT-NEEDED" / resp-code = "AUTH-TOO-WEAK" / "ENCRYPT-NEEDED" / "QUOTA"
"QUOTA" ["/" ("MAXSCRIPTS" / "MAXSIZE")] / ["/" ("MAXSCRIPTS" / "MAXSIZE")] /
resp-code-sasl / resp-code-sasl /
resp-code-referral / resp-code-referral /
"TRANSITION-NEEDED" / "TRYLATER" / "TRANSITION-NEEDED" / "TRYLATER" /
"ACTIVE" / "NONEXISTENT" / "ACTIVE" / "NONEXISTENT" /
"ALREADYEXISTS" / "WARNINGS" / "ALREADYEXISTS" / "WARNINGS" /
"TAG" SP string / "TAG" SP string /
resp-code-ext resp-code-ext
resp-code-referral = "REFERRAL" SP sieveurl resp-code-referral = "REFERRAL" SP sieveurl
skipping to change at page 36, line 23 skipping to change at page 35, line 32
DQUOTE "SASL" DQUOTE SP sasl-mechs / DQUOTE "SASL" DQUOTE SP sasl-mechs /
DQUOTE "SIEVE" DQUOTE SP sieve-extensions / DQUOTE "SIEVE" DQUOTE SP sieve-extensions /
DQUOTE "MAXREDIRECTS" DQUOTE SP number-str / DQUOTE "MAXREDIRECTS" DQUOTE SP number-str /
DQUOTE "NOTIFY" DQUOTE SP notify-mechs / DQUOTE "NOTIFY" DQUOTE SP notify-mechs /
DQUOTE "STARTTLS" DQUOTE / DQUOTE "STARTTLS" DQUOTE /
DQUOTE "LANGUAGE" DQUOTE SP language / DQUOTE "LANGUAGE" DQUOTE SP language /
DQUOTE "VERSION" DQUOTE SP version / DQUOTE "VERSION" DQUOTE SP version /
DQUOTE "OWNER" DQUOTE SP string DQUOTE "OWNER" DQUOTE SP string
;; Each capability conforms to ;; Each capability conforms to
;; the syntax for single-capability. ;; the syntax for single-capability.
;; Also note that the capability name ;; Also, note that the capability name
;; can be returned as either literal-s2c ;; can be returned as either literal-s2c
;; or quoted, even though only "quoted" ;; or quoted, even though only "quoted"
;; string is shown above. ;; string is shown above.
version = ( DQUOTE "1.0" DQUOTE ) / version-ext version = ( DQUOTE "1.0" DQUOTE ) / version-ext
version-ext = DQUOTE ver-major "." ver-minor DQUOTE version-ext = DQUOTE ver-major "." ver-minor DQUOTE
; Future versions specified in updates ; Future versions specified in updates
; to this document. An increment to ; to this document. An increment to
; the ver-major means a backward-incompatible ; the ver-major means a backward-incompatible
; change to the protocol, e.g. "3.5" (ver-major "3") ; change to the protocol, e.g., "3.5" (ver-major "3")
; is not backward-compatible with any "2.X" version. ; is not backward-compatible with any "2.X" version.
; Any version "Z.W" MUST be backward compatible ; Any version "Z.W" MUST be backward compatible
; with any version "Z.Q", where Q < W. ; with any version "Z.Q", where Q < W.
; E.g. version "2.4" is backward-compatible ; For example, version "2.4" is backward compatible
; with version "2.0", "2.1", "2.2" and "2.3". ; with version "2.0", "2.1", "2.2", and "2.3".
ver-major = number ver-major = number
ver-minor = number ver-minor = number
sasl-mechs = string sasl-mechs = string
; space separated list of SASL mechanisms, ; Space-separated list of SASL mechanisms,
; each SASL mechanism name complies with rules ; each SASL mechanism name complies with rules
; specified in [SASL]. ; specified in [SASL].
; Can be empty. ; Can be empty.
sieve-extensions = string sieve-extensions = string
; space separated list of supported SIEVE extensions, ; Space-separated list of supported SIEVE extensions.
; can be empty. ; Can be empty.
language = string language = string
; Contains <Language-Tag> from [RFC4646]. ; Contains <Language-Tag> from [RFC5646].
notify-mechs = string notify-mechs = string
; space separated list of URI schema parts ; Space-separated list of URI schema parts
; for supported notification [NOTIFY] methods. ; for supported notification [NOTIFY] methods.
; MUST NOT be empty. ; MUST NOT be empty.
response-deletescript = response-oknobye response-deletescript = response-oknobye
response-getscript = (sieve-script CRLF response-ok) / response-getscript = (sieve-script CRLF response-ok) /
response-nobye response-nobye
response-havespace = response-oknobye response-havespace = response-oknobye
skipping to change at page 37, line 34 skipping to change at page 36, line 44
response-logout = response-oknobye response-logout = response-oknobye
response-unauthenticate= response-oknobye response-unauthenticate= response-oknobye
;; "NO" response can only be returned when ;; "NO" response can only be returned when
;; the command is issued in a wrong state ;; the command is issued in a wrong state
;; or has a wrong number of parameters ;; or has a wrong number of parameters
response-ok = "OK" [SP "(" resp-code ")"] response-ok = "OK" [SP "(" resp-code ")"]
[SP string] CRLF [SP string] CRLF
;; The string contains human readable text ;; The string contains human-readable text
;; encoded as UTF-8. ;; encoded as UTF-8.
response-nobye = ("NO" / "BYE") [SP "(" resp-code ")"] response-nobye = ("NO" / "BYE") [SP "(" resp-code ")"]
[SP string] CRLF [SP string] CRLF
;; The string contains human readable text ;; The string contains human-readable text
;; encoded as UTF-8. ;; encoded as UTF-8.
response-oknobye = response-ok / response-nobye response-oknobye = response-ok / response-nobye
response-noop = response-ok response-noop = response-ok
response-putscript = response-oknobye response-putscript = response-oknobye
response-checkscript = response-oknobye response-checkscript = response-oknobye
skipping to change at page 38, line 32 skipping to change at page 37, line 43
;; literal-c2s is only allowed when sent ;; literal-c2s is only allowed when sent
;; from the client to the server. ;; from the client to the server.
;; literal-s2c is only allowed when sent ;; literal-s2c is only allowed when sent
;; from the server to the client. ;; from the server to the client.
;; quoted is allowed in either direction. ;; quoted is allowed in either direction.
5. Security Considerations 5. Security Considerations
The AUTHENTICATE command uses SASL [SASL] to provide authentication The AUTHENTICATE command uses SASL [SASL] to provide authentication
and authorization services. Integrity and privacy services can be and authorization services. Integrity and privacy services can be
provided by [SASL] and/or [TLS]. When a SASL mechanism is used the provided by [SASL] and/or [TLS]. When a SASL mechanism is used, the
security considerations for that mechanism apply. security considerations for that mechanism apply.
This protocol's transactions are susceptible to passive observers or This protocol's transactions are susceptible to passive observers or
man in the middle attacks which alter the data, unless the optional man-in-the-middle attacks that alter the data, unless the optional
encryption and integrity services of the SASL (via the AUTHENTICATE encryption and integrity services of the SASL (via the AUTHENTICATE
command) and/or [TLS] (via the STARTTLS command) are enabled, or an command) and/or [TLS] (via the STARTTLS command) are enabled, or an
external security mechanism is used for protection. It may be useful external security mechanism is used for protection. It may be useful
to allow configuration of both clients and servers to refuse to to allow configuration of both clients and servers to refuse to
transfer sensitive information in the absence of strong encryption. transfer sensitive information in the absence of strong encryption.
If an implementation supports SASL mechanisms that are vulnerable to If an implementation supports SASL mechanisms that are vulnerable to
passive eavesdropping attacks (such as [PLAIN]), then the passive eavesdropping attacks (such as [PLAIN]), then the
implementation MUST support at least one configuration where these implementation MUST support at least one configuration where these
SASL mechanisms are not advertised or used without the presence of an SASL mechanisms are not advertised or used without the presence of an
external security layer such as [TLS]. external security layer such as [TLS].
Some response codes returned on failed AUTHENTICATE command may Some response codes returned on failed AUTHENTICATE command may
disclose whether or not the username is valid (e.g. TRANSITION- disclose whether or not the username is valid (e.g., TRANSITION-
NEEDED), so server implementations SHOULD provide the ability to NEEDED), so server implementations SHOULD provide the ability to
disable these features (or make them not conditional on a per-user disable these features (or make them not conditional on a per-user
basis) for sites concerned about such disclosure. In the case of basis) for sites concerned about such disclosure. In the case of
ENCRYPT-NEEDED, if it is applied to all identities then no extra ENCRYPT-NEEDED, if it is applied to all identities then no extra
information is disclosed, but if it is applied on a per-user basis it information is disclosed, but if it is applied on a per-user basis it
can disclose information. can disclose information.
A compromised or malicious server can use the TRANSITION-NEEDED A compromised or malicious server can use the TRANSITION-NEEDED
response code to force the client which is configured to use a response code to force the client that is configured to use a
mechanism that does not disclose the user's password to the server mechanism that does not disclose the user's password to the server
(e.g., Kerberos), to send the bare password to the server. Clients (e.g., Kerberos), to send the bare password to the server. Clients
SHOULD have the ability to disable the password transition feature, SHOULD have the ability to disable the password transition feature,
or disclose that risk to the user and offer the user an option how to or disclose that risk to the user and offer the user an option of how
proceed. to proceed.
6. IANA Considerations 6. IANA Considerations
IANA is requested to reserve a TCP port number for use with the IANA has reserved TCP port number 4190 for use with the ManageSieve
ManageSieve protocol described in this document. protocol described in this document.
IANA is requested to register the "sieve" URI scheme defined in IANA has registered the "sieve" URI scheme defined in Section 3 of
Section 3 of this document. this document.
IANA is requested to register "sieve" in the "GSSAPI/Kerberos/SASL IANA has registered "sieve" in the "GSSAPI/Kerberos/SASL Service
Service Names" registry. Names" registry.
IANA is requested to create a new registry for ManageSieve IANA has created a new registry for ManageSieve capabilities. The
capabilities. The registration template for ManageSieve capabilities registration template for ManageSieve capabilities is specified in
is specified in Section 6.1. ManageSieve protocol capabilities MUST Section 6.1. ManageSieve protocol capabilities MUST be specified in
be specified in a standards track or IESG approved experimental RFC. a Standards-Track or IESG-approved Experimental RFC.
IANA is requested to create a new registry for ManageSieve response IANA has created a new registry for ManageSieve response codes. The
codes. The registration template for ManageSieve response codes is registration template for ManageSieve response codes is specified in
specified in Section 6.3. ManageSieve protocol response codes MUST Section 6.3. ManageSieve protocol response codes MUST be specified
be specified in a standards track or IESG approved experimental RFC. in a Standards-Track or IESG-approved Experimental RFC.
6.1. ManageSieve Capability Registration Template 6.1. ManageSieve Capability Registration Template
To: iana@iana.org To: iana@iana.org
Subject: ManageSieve Capability Registration Subject: ManageSieve Capability Registration
Please register the following ManageSieve Capability: Please register the following ManageSieve capability:
Capability name: Capability name:
Description: Description:
Relevant publications: Relevant publications:
Person & email address to contact for further information: Person & email address to contact for further information:
Author/Change controller: Author/Change controller:
6.2. Registration of Initial ManageSieve capabilities 6.2. Registration of Initial ManageSieve Capabilities
To: iana@iana.org To: iana@iana.org
Subject: ManageSieve Capability Registration Subject: ManageSieve Capability Registration
Please register the following ManageSieve Capabilities: Please register the following ManageSieve capabilities:
Capability name: IMPLEMENTATION
Description: Its value contains name of server implementation and
its version.
Relevant publications: this RFC, Section 1.8.
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Capability name: SASL
Description: Its value contains a space separated list of SASL
mechanisms supported by server.
Relevant publications: this RFC, Section 1.8 and Section 2.1.
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Capability name: SIEVE
Description: Its value contains a space separated list of
supported SIEVE extensions
Relevant publications: this RFC, Section 1.8. Also [SIEVE].
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Capability name: STARTTLS
Description: This capability is returned if server supports TLS
(STARTTLS command).
Relevant publications: this RFC, Section 1.8 and Section 2.2.
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Capability name: NOTIFY
Description: This capability is returned if server supports
'enotify' [NOTIFY] Sieve extension.
Relevant publications: this RFC, Section 1.8.
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Capability name: MAXREDIRECTS
Description: This capability returns the limit on the number of
Sieve "redirect" actions a script can perform during a single
evaluation. The value is a non-negative number represented as a
ManageSieve string.
Relevant publications: this RFC, Section 1.8.
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Capability name: LANGUAGE
Description: The language (<Language-Tag> from [RFC4646])
currently used for human readable error messages.
Relevant publications: this RFC, Section 1.8.
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Capability name: OWNER Capability name: IMPLEMENTATION
Description: Its value contains UTF-8 encoded name of the Description: Its value contains the name of the server
currently logged in user ("authorization identity" according to implementation and its version.
RFC 4422). Relevant publications: this RFC, Section 1.7.
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Relevant publications: this RFC, Section 1.8. Capability name: SASL
Description: Its value contains a space-separated list of SASL
mechanisms supported by the server.
Relevant publications: this RFC, Sections 1.7 and 2.1.
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Person & email address to contact for further information: Alexey Capability name: SIEVE
Melnikov <alexey.melnikov@isode.com> Description: Its value contains a space-separated list of supported
SIEVE extensions.
Relevant publications: this RFC, Section 1.7. Also [SIEVE].
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Author/Change controller: IESG. Capability name: STARTTLS
Description: This capability is returned if the server supports TLS
(STARTTLS command).
Relevant publications: this RFC, Sections 1.7 and 2.2.
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Capability name: VERSION Capability name: NOTIFY
Description: This capability is returned if the server supports the
'enotify' [NOTIFY] Sieve extension.
Relevant publications: this RFC, Section 1.7.
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Description: This capability is returned if the server is Capability name: MAXREDIRECTS
compliant with RFCXXXX, i.e. that it supports RENAMESCRIPT, Description: This capability returns the limit on the number of
CHECKSCRIPT and NOOP commands. Sieve "redirect" actions a script can perform during a
single evaluation. The value is a non-negative number
represented as a ManageSieve string.
Relevant publications: this RFC, Section 1.7.
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Relevant publications: this RFC, Section 2.11. Capability name: LANGUAGE
Description: The language (<Language-Tag> from [RFC5646]) currently
used for human-readable error messages.
Relevant publications: this RFC, Section 1.7.
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Person & email address to contact for further information: Alexey Capability name: OWNER
Melnikov <alexey.melnikov@isode.com> Description: Its value contains the UTF-8-encoded name of the
currently logged-in user ("authorization identity"
according to RFC 4422).
Relevant publications: this RFC, Section 1.7.
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Author/Change controller: IESG. Capability name: VERSION
Description: This capability is returned if the server is compliant
with RFC 5804; i.e., that it supports RENAMESCRIPT,
CHECKSCRIPT, and NOOP commands.
Relevant publications: this RFC, Sections 2.11, 2.12, and 2.13.
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
6.3. ManageSieve Response Code Registration Template 6.3. ManageSieve Response Code Registration Template
To: iana@iana.org To: iana@iana.org
Subject: ManageSieve Response Code Registration Subject: ManageSieve Response Code Registration
Please register the following ManageSieve Response Code: Please register the following ManageSieve response code:
Response Code: Response Code:
Arguments (use ABNF to specify syntax, or the word NONE if none Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): can be specified):
Purpose: Purpose:
Published Specification(s): Published Specification(s):
Person & email address to contact for further information: Person & email address to contact for further information:
Author/Change controller: Author/Change controller:
6.4. Registration of Initial ManageSieve Response Codes 6.4. Registration of Initial ManageSieve Response Codes
To: iana@iana.org To: iana@iana.org
Subject: ManageSieve Response Code Registration Subject: ManageSieve Response Code Registration
Please register the following ManageSieve Response Codes: Please register the following ManageSieve response codes:
Response Code: AUTH-TOO-WEAK
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): NONE
Purpose: This response code is returned in the NO response from an
AUTHENTICATE command. It indicates that site security policy
forbids the use of the requested mechanism for the specified
authentication identity.
Published Specification(s): [RFCXXXX]
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: ENCRYPT-NEEDED
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): NONE
Purpose: This response code is returned in the NO response from an
AUTHENTICATE command. It indicates that site security policy
requires the use of a strong encryption mechanism for the
specified authentication identity and mechanism.
Published Specification(s): [RFCXXXX]
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: QUOTA
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): NONE
Purpose: If this response code is returned in the NO/BYE response,
it means that the command would have placed the user above the
site-defined quota constraints. If this response code is returned
in the OK response, it can mean that the user is near its quota or
that the user exceeded its quota, but the server supports soft
quotas.
Published Specification(s): [RFCXXXX]
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: QUOTA/MAXSCRIPTS
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): NONE
Purpose: If this response code is returned in the NO/BYE response,
it means that the command would have placed the user above the
site-defined limit on the number of Sieve scripts. If this
response code is returned in the OK response, it can mean that the
user is near its quota or that the user exceeded its quota, but
the server supports soft quotas. This response code is a more
specific version of the QUOTA response code.
Published Specification(s): [RFCXXXX]
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: QUOTA/MAXSIZE
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): NONE
Purpose: If this response code is returned in the NO/BYE response,
it means that the command would have placed the user above the
site-defined maximum script size. If this response code is
returned in the OK response, it can mean that the user is near its
quota or that the user exceeded its quota, but the server supports
soft quotas. This response code is a more specific version of the
QUOTA response code.
Published Specification(s): [RFCXXXX]
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: REFERRAL
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): <sieveurl>
Purpose: This response code may be returned with a BYE result from
any command, and includes a mandatory parameter that indicates
what server to access to manage this user's sieve scripts. The
server will be specified by a Sieve URL (see Section 3). The
scriptname portion of the URL MUST NOT be specified. The client
should authenticate to the specified server and use it for all
further commands in the current session.
Published Specification(s): [RFCXXXX]
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: SASL
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): <string>
Purpose: This response code can occur in the OK response to a
successful AUTHENTICATE command and includes the optional final
server response data from the server as specified by [SASL].
Published Specification(s): [RFCXXXX]
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: TRANSITION-NEEDED
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): NONE
Purpose: This response code occurs in a NO response of an
AUTHENTICATE command. It indicates that the user name is valid,
but the entry in the authentication database needs to be updated
in order to permit authentication with the specified mechanism.
This is typically done by establishing a secure channel using TLS,
followed by authenticating once using the [PLAIN] authentication
mechanism. The selected mechanism SHOULD then work for
authentications in subsequent sessions.
Published Specification(s): [RFCXXXX]
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: TRYLATER
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): NONE
Purpose: A command failed due to a temporary server failure. The
client MAY continue using local information and try the command
later. This response code only make sense when returned in a NO/
BYE response.
Published Specification(s): [RFCXXXX]
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: ACTIVE
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): NONE
Purpose: A command failed because it is not allowed on the active
script. For example DELETESCRIPT on the active script. This
response code only makes sense when returned in a NO/BYE response.
Published Specification(s): [RFCXXXX]
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: NONEXISTENT
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): NONE
Purpose: A command failed because the referenced script name
doesn't exist. This response code only makes sense when returned
in a NO/BYE response.
Published Specification(s): [RFCXXXX]
Person & email address to contact for further information: Alexey
Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: ALREADYEXISTS
Arguments (use ABNF to specify syntax, or the word NONE if none
can be specified): NONE
Purpose: A command failed because the referenced script name
already exists. This response code only makes sense when returned
in a NO/BYE response.
Published Specification(s): [RFCXXXX] Response Code: AUTH-TOO-WEAK
Arguments (use ABNF to specify syntax, or the word NONE if none can
be specified): NONE
Purpose: This response code is returned in the NO response from
an AUTHENTICATE command. It indicates that site
security policy forbids the use of the requested
mechanism for the specified authentication identity.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Person & email address to contact for further information: Alexey Response Code: ENCRYPT-NEEDED
Melnikov <alexey.melnikov@isode.com> Arguments (use ABNF to specify syntax, or the word NONE if none can
be specified): NONE
Purpose: This response code is returned in the NO response from
an AUTHENTICATE command. It indicates that site
security policy requires the use of a strong
encryption mechanism for the specified authentication
identity and mechanism.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Author/Change controller: IESG. Response Code: QUOTA
Arguments (use ABNF to specify syntax, or the word NONE if none can
be specified): NONE
Purpose: If this response code is returned in the NO/BYE
response, it means that the command would have placed
the user above the site-defined quota constraints. If
this response code is returned in the OK response, it
can mean that the user is near its quota or that the
user exceeded its quota, but the server supports soft
quotas.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: WARNINGS Response Code: QUOTA/MAXSCRIPTS
Arguments (use ABNF to specify syntax, or the word NONE if none can
be specified): NONE
Purpose: If this response code is returned in the NO/BYE
response, it means that the command would have placed
the user above the site-defined limit on the number of
Sieve scripts. If this response code is returned in
the OK response, it can mean that the user is near its
quota or that the user exceeded its quota, but the
server supports soft quotas. This response code is a
more specific version of the QUOTA response code.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Arguments (use ABNF to specify syntax, or the word NONE if none Response Code: QUOTA/MAXSIZE
can be specified): NONE Arguments (use ABNF to specify syntax, or the word NONE if none can
be specified): NONE
Purpose: If this response code is returned in the NO/BYE
response, it means that the command would have placed
the user above the site-defined maximum script size.
If this response code is returned in the OK response,
it can mean that the user is near its quota or that
the user exceeded its quota, but the server supports
soft quotas. This response code is a more specific
version of the QUOTA response code.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Purpose: This response code MAY be returned by the server in the Response Code: REFERRAL
OK response (but it might be returned with the NO/BYE response as Arguments (use ABNF to specify syntax, or the word NONE if none can
well) and signals the client that even though the script is be specified): <sieveurl>
syntactically valid, it might contain errors not intended by the Purpose: This response code may be returned with a BYE result
script writer. from any command, and includes a mandatory parameter
that indicates what server to access to manage this
user's Sieve scripts. The server will be specified by
a Sieve URL (see Section 3). The scriptname portion
of the URL MUST NOT be specified. The client should
authenticate to the specified server and use it for
all further commands in the current session.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Published Specification(s): [RFCXXXX] Response Code: SASL
Arguments (use ABNF to specify syntax, or the word NONE if none can
be specified): <string>
Purpose: This response code can occur in the OK response to a
successful AUTHENTICATE command and includes the
optional final server response data from the server as
specified by [SASL].
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Person & email address to contact for further information: Alexey Response Code: TRANSITION-NEEDED
Melnikov <alexey.melnikov@isode.com> Arguments (use ABNF to specify syntax, or the word NONE if none can
Author/Change controller: IESG. be specified): NONE
Purpose: This response code occurs in a NO response of an
AUTHENTICATE command. It indicates that the user name
is valid, but the entry in the authentication database
needs to be updated in order to permit authentication
with the specified mechanism. This is typically done
by establishing a secure channel using TLS, followed
by authenticating once using the [PLAIN]
authentication mechanism. The selected mechanism
SHOULD then work for authentications in subsequent
sessions.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Response Code: TAG Response Code: TRYLATER
Arguments (use ABNF to specify syntax, or the word NONE if none can
be specified): NONE
Purpose: A command failed due to a temporary server failure.
The client MAY continue using local information and
try the command later. This response code only make
sense when returned in a NO/BYE response.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Arguments (use ABNF to specify syntax, or the word NONE if none Response Code: ACTIVE
can be specified): string Arguments (use ABNF to specify syntax, or the word NONE if none can
be specified): NONE
Purpose: A command failed because it is not allowed on the
active script, for example, DELETESCRIPT on the active
script. This response code only makes sense when
returned in a NO/BYE response.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Purpose: This response code name is followed by a string specified Response Code: NONEXISTENT
in the command that caused this response. It is typically used Arguments (use ABNF to specify syntax, or the word NONE if none can
for client state synchronization. be specified): NONE
Purpose: A command failed because the referenced script name
doesn't exist. This response code only makes sense
when returned in a NO/BYE response.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Published Specification(s): [RFCXXXX] Response Code: ALREADYEXISTS
Arguments (use ABNF to specify syntax, or the word NONE if none can
be specified): NONE
Purpose: A command failed because the referenced script name
already exists. This response code only makes sense
when returned in a NO/BYE response.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Person & email address to contact for further information: Alexey Response Code: WARNINGS
Melnikov <alexey.melnikov@isode.com> Arguments (use ABNF to specify syntax, or the word NONE if none can
be specified): NONE
Purpose: This response code MAY be returned by the server in
the OK response (but it might be returned with the NO/
BYE response as well) and signals the client that even
though the script is syntactically valid, it might
contain errors not intended by the script writer.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
Author/Change controller: IESG. Response Code: TAG
Arguments (use ABNF to specify syntax, or the word NONE if none can
be specified): string
Purpose: This response code name is followed by a string
specified in the command that caused this response.
It is typically used for client state synchronization.
Published Specification(s): [RFC5804]
Person & email address to contact for further information:
Alexey Melnikov <alexey.melnikov@isode.com>
Author/Change controller: IESG.
7. Internationalization Considerations 7. Internationalization Considerations
The LANGUAGE capability (see Section 1.8) allows a client to discover The LANGUAGE capability (see Section 1.7) allows a client to discover
the current language used in all human readable responses that might the current language used in all human-readable responses that might
be returned at the end of any OK/NO/BYE response. Human readable be returned at the end of any OK/NO/BYE response. Human-readable
text in OK responses typically doesn't need to be shown to the user, text in OK responses typically doesn't need to be shown to the user,
unless it is returned in response to PUTSCRIPT or CHECKSCRIPT command unless it is returned in response to a PUTSCRIPT or CHECKSCRIPT
that also contain the WARNINGS response code Section 1.4. Human command that also contains the WARNINGS response code (Section 1.3).
readable text from NO/BYE responses is intended be shown to the user, Human-readable text from NO/BYE responses is intended be shown to the
unless the client can automatically handle failure of the command user, unless the client can automatically handle failure of the
that caused such response. Clients SHOULD use response codes command that caused such a response. Clients SHOULD use response
(Section 1.4) for automatic error handling. Response codes MAY also codes (Section 1.3) for automatic error handling. Response codes MAY
be used by the client to present error messages in a language also be used by the client to present error messages in a language
understood by the user, for example if the LANGUAGE capability understood by the user, for example, if the LANGUAGE capability
doesn't return a language understood by the user. doesn't return a language understood by the user.
Note that the human readable text from OK (WARNINGS) or NO/BYE Note that the human-readable text from OK (WARNINGS) or NO/BYE
responses for PUTSCRIPT/CHECKSCRIPT commands is intended for advanced responses for PUTSCRIPT/CHECKSCRIPT commands is intended for advanced
users that understand Sieve language. Such advanced users are often users that understand Sieve language. Such advanced users are often
sophisticated enough to be able to handle whatever language the sophisticated enough to be able to handle whatever language the
server is using, even if it is not their preferred language, and will server is using, even if it is not their preferred language, and will
want to see error/warning text no matter what language the server want to see error/warning text no matter what language the server
puts it in. puts it in.
A client that generates Sieve script automatically, for example if A client that generates Sieve script automatically, for example, if
the script is generated without user intervention or from a UI that the script is generated without user intervention or from a UI that
presents an abstract list of conditions and corresponding actions, presents an abstract list of conditions and corresponding actions,
SHOULD NOT present warning/error messages to the user, because the SHOULD NOT present warning/error messages to the user, because the
user might not even be aware that the client is using Sieve user might not even be aware that the client is using Sieve
underneath. However if the client has a debugging mode, such underneath. However, if the client has a debugging mode, such
warnings/errors SHOULD be available in the debugging mode. warnings/errors SHOULD be available in the debugging mode.
Note that this document doesn't provide a way to modify the currently Note that this document doesn't provide a way to modify the currently
used language. It is expected that a future extension will address used language. It is expected that a future extension will address
that. that.
8. Acknowledgements 8. Acknowledgements
Thanks to Simon Josefsson, Larry Greenfield, Allen Johnson, Chris Thanks to Simon Josefsson, Larry Greenfield, Allen Johnson, Chris
Newman, Lyndon Nerenberg, Tim Showalter, Sarah Robeson, Walter Wong, Newman, Lyndon Nerenberg, Tim Showalter, Sarah Robeson, Walter Wong,
Barry Leiba, Arnt Gulbrandsen, Stephan Bosch, Ken Murchison, Phil Barry Leiba, Arnt Gulbrandsen, Stephan Bosch, Ken Murchison, Phil
Pennock, Ned Freed, Jeffrey Hutzelman, Mark E. Mallett, Dilyan Pennock, Ned Freed, Jeffrey Hutzelman, Mark E. Mallett, Dilyan
Palauzov, Dave Cridland, Aaron Stone, Robert Burrell Donkin, Patrick Palauzov, Dave Cridland, Aaron Stone, Robert Burrell Donkin, Patrick
Ben Koetter, Bjoern Hoehrmann, Martin Duerst, Pasi Eronen, Magnus Ben Koetter, Bjoern Hoehrmann, Martin Duerst, Pasi Eronen, Magnus
Westerlund and Tim Polk for help with this document. Special thank Westerlund, Tim Polk, and Julien Coloos for help with this document.
you to Phil Pennock for providing text for the NOOP command, as well Special thank you to Phil Pennock for providing text for the NOOP
as finding various bugs in the document. command, as well as finding various bugs in the document.
9. References 9. References
9.1. Normative References 9.1. Normative References
[ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", RFC 5234, January 2008. Specifications: ABNF", STD 68, RFC 5234, January 2008.
[ACAP] Newman, C. and J. Myers, "ACAP -- Application [ACAP] Newman, C. and J. Myers, "ACAP -- Application
Configuration Access Protocol", RFC 2244, November 1997. Configuration Access Protocol", RFC 2244, November
1997.
[BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data [BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data
Encodings", RFC 4648, October 2006. Encodings", RFC 4648, October 2006.
[DNS-SRV] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for [DNS-SRV] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR
specifying the location of services (DNS SRV)", RFC 2782, for specifying the location of services (DNS SRV)",
February 2000. RFC 2782, February 2000.
[KEYWORDS] [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
Requirement Levels", RFC 2119, March 1997.
[NET-UNICODE] [NET-UNICODE] Klensin, J. and M. Padlipsky, "Unicode Format for
Klensin, J. and M. Padlipsky, "Unicode Format for Network Network Interchange", RFC 5198, March 2008.
Interchange", RFC 5198, March 2008.
[NOTIFY] Melnikov, A., Ed., Leiba, B., Ed., Segmuller, W., and T. [NOTIFY] Melnikov, A., Leiba, B., Segmuller, W., and T. Martin,
Martin, "Sieve Extension: Notifications", "Sieve Email Filtering: Extension for Notifications",
draft-ietf-sieve-notify-12 (work in progress), RFC 5435, January 2009.
December 2007.
[RFC2277] Alvestrand, H., "IETF Policy on Character Sets and [RFC2277] Alvestrand, H., "IETF Policy on Character Sets and
Languages", RFC 2277, January 1998. Languages", BCP 18, RFC 2277, January 1998.
[RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version
(IPv6) Specification", RFC 2460, December 1998. 6 (IPv6) Specification", RFC 2460, December 1998.
[RFC3490] Faltstrom, P., Hoffman, P., and A. Costello, [RFC3490] Faltstrom, P., Hoffman, P., and A. Costello,
"Internationalizing Domain Names in Applications (IDNA)", "Internationalizing Domain Names in Applications
RFC 3490, March 2003. (IDNA)", RFC 3490, March 2003.
[RFC4519] Sciberras, A., "Lightweight Directory Access Protocol [RFC4519] Sciberras, A., "Lightweight Directory Access Protocol
(LDAP): Schema for User Applications", RFC 4519, (LDAP): Schema for User Applications", RFC 4519, June
June 2006. 2006.
[RFC4646] Phillips, A. and M. Davis, "Tags for Identifying [RFC5646] Phillips, A. and M. Davis, "Tags for Identifying
Languages", RFC 4646, September 2006. Languages", BCP 47, RFC 5646, September 2009.
[RFC791] Postel, J., "Internet Protocol", RFC 791, September 1981. [RFC791] Postel, J., "Internet Protocol", STD 5, RFC 791,
September 1981.
[SASL] Melnikov, A. and K. Zeilenga, "Simple Authentication and [SASL] Melnikov, A. and K. Zeilenga, "Simple Authentication
Security Layer (SASL)", RFC 4422, June 2006. and Security Layer (SASL)", RFC 4422, June 2006.
[SASLprep] [SASLprep] Zeilenga, K., "SASLprep: Stringprep Profile for User
Zeilenga, K., "SASLprep: Stringprep Profile for User Names Names and Passwords", RFC 4013, February 2005.
and Passwords", RFC 4013, February 2005.
[SCRAM] Menon-Sen, A., Ed. and C. Newman, "Salted Challenge [SCRAM] Menon-Sen, A., Melnikov, A., Newman, C., and N.
Response Authentication Mechanism (SCRAM)", Williams, "Salted Challenge Response Authentication
draft-newman-auth-scram-07.txt (work in progress), Mechanism (SCRAM) SASL and GSS-API Mechanisms", RFC
November 2008. 5802, July 2010.
[SIEVE] Guenther, P., Ed. and T. Showalter, Ed., "Sieve: An Email [SIEVE] Guenther, P. and T. Showalter, "Sieve: An Email
Filtering Language", RFC 5228, January 2008. Filtering Language", RFC 5228, January 2008.
[StringPrep] [StringPrep] Hoffman, P. and M. Blanchet, "Preparation of
Hoffman, P. and M. Blanchet, "Preparation of Internationalized Strings ("stringprep")", RFC 3454,
Internationalized Strings ("stringprep")", RFC 3454, December 2002.
December 2002.
[TLS] Dierks, T. and E. Rescorla, "The Transport Layer Security [TLS] Dierks, T. and E. Rescorla, "The Transport Layer
(TLS) Protocol Version 1.2", RFC 5246, August 2008. Security (TLS) Protocol Version 1.2", RFC 5246, August
2008.
[URI-GEN] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [URI-GEN] Berners-Lee, T., Fielding, R., and L. Masinter,
Resource Identifier (URI): Generic Syntax", STD 66, "Uniform Resource Identifier (URI): Generic Syntax",
RFC 3986, January 2005. STD 66, RFC 3986, January 2005.
[UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO
10646", STD 63, RFC 3629, November 2003. 10646", STD 63, RFC 3629, November 2003.
[X509] Housley, R., Polk, W., Ford, W., and D. Solo, "Internet [X509] Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
X.509 Public Key Infrastructure Certificate and Housley, R., and W. Polk, "Internet X.509 Public Key
Certificate Revocation List (CRL) Profile", RFC 5280, Infrastructure Certificate and Certificate Revocation
May 2008. List (CRL) Profile", RFC 5280, May 2008.
[X509-SRV] [X509-SRV] Santesson, S., "Internet X.509 Public Key
Santesson, S., "Internet X.509 Public Key Infrastructure Infrastructure Subject Alternative Name for Expression
Subject Alternative Name for Expression of Service Name", of Service Name", RFC 4985, August 2007.
RFC 4985, August 2007.
9.2. Informative References 9.2. Informative References
[DIGEST-MD5] [DIGEST-MD5] Leach, P. and C. Newman, "Using Digest Authentication
Leach, P. and C. Newman, "Using Digest Authentication as a as a SASL Mechanism", RFC 2831, May 2000.
SASL Mechanism", RFC 2831, May 2000.
[I-HAVE] Freed, N., "Sieve Email Filtering: Ihave Extension", [GSSAPI] Melnikov, A., "The Kerberos V5 ("GSSAPI") Simple
draft-freed-sieve-ihave-03.txt (work in progress), Authentication and Security Layer (SASL) Mechanism",
October 2008. RFC 4752, November 2006.
[IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION [I-HAVE] Freed, N., "Sieve Email Filtering: Ihave Extension",
4rev1", RFC 3501, March 2003. RFC 5463, March 2009.
[LDAP] Zeilenga, K., "Lightweight Directory Access Protocol [IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL -
(LDAP): Technical Specification Road Map", RFC 4510, VERSION 4rev1", RFC 3501, March 2003.
June 2006.
[PLAIN] Zeilenga, K., "The PLAIN Simple Authentication and [LDAP] Zeilenga, K., "Lightweight Directory Access Protocol
Security Layer (SASL) Mechanism", RFC 4616, August 2006. (LDAP): Technical Specification Road Map", RFC 4510,
June 2006.
[PLAIN] Zeilenga, K., "The PLAIN Simple Authentication and
Security Layer (SASL) Mechanism", RFC 4616, August
2006.
Authors' Addresses Authors' Addresses
Alexey Melnikov (editor) Alexey Melnikov (editor)
Isode Limited Isode Limited
5 Castle Business Village 5 Castle Business Village
36 Station Road 36 Station Road
Hampton, Middlesex TW12 2BX Hampton, Middlesex TW12 2BX
UK UK
Email: Alexey.Melnikov@isode.com EMail: Alexey.Melnikov@isode.com
Tim Martin Tim Martin
BeThereBeSquare Inc. BeThereBeSquare, Inc.
672 Haight st. 672 Haight st.
San Francisco, CA 94117 San Francisco, CA 94117
US USA
Phone: +1 510 260-4175 Phone: +1 510 260-4175
Email: timmartin@alumni.cmu.edu EMail: timmartin@alumni.cmu.edu
 End of changes. 213 change blocks. 
787 lines changed or deleted 675 lines changed or added

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