draft-ietf-sieve-external-lists-07.txt   draft-ietf-sieve-external-lists-08.txt 
Sieve Working Group A. Melnikov Sieve Working Group A. Melnikov
Internet-Draft Isode Limited Internet-Draft Isode Limited
Intended status: Standards Track B. Leiba Intended status: Standards Track B. Leiba
Expires: October 23, 2011 Huawei Technologies Expires: November 10, 2011 Huawei Technologies
April 21, 2011 May 9, 2011
Sieve Extension: Externally Stored Lists Sieve Extension: Externally Stored Lists
draft-ietf-sieve-external-lists-07 draft-ietf-sieve-external-lists-08
Abstract Abstract
The Sieve scripting language can be used to implement whitelisting, The Sieve scripting language can be used to implement whitelisting,
blacklisting, personal distribution lists, and other sorts of list blacklisting, personal distribution lists, and other sorts of list
matching. Currently, this requires that all members of such lists be matching. Currently, this requires that all members of such lists be
hardcoded in the script itself. Whenever a member of a list is added hardcoded in the script itself. Whenever a member of a list is added
or deleted, the script needs to be updated and possibly uploaded to a or deleted, the script needs to be updated and possibly uploaded to a
mail server. mail server.
skipping to change at page 1, line 41 skipping to change at page 1, line 41
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 23, 2011. This Internet-Draft will expire on November 10, 2011.
Copyright Notice Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 23 skipping to change at page 2, line 23
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Conventions Used In This Document . . . . . . . . . . . . 3 1.1. Conventions Used In This Document . . . . . . . . . . . . 3
2. Extlists Extension . . . . . . . . . . . . . . . . . . . . 3 2. Extlists Extension . . . . . . . . . . . . . . . . . . . . 3
2.1. Capability Identifier . . . . . . . . . . . . . . . . . . 3 2.1. Capability Identifier . . . . . . . . . . . . . . . . . . 3
2.2. :list Match Type for Supported Tests . . . . . . . . . . . 3 2.2. :list Match Type for Supported Tests . . . . . . . . . . . 3
2.3. :list Tagged Argument to the "redirect" Action . . . . . . 4 2.3. :list Tagged Argument to the "redirect" Action . . . . . . 4
2.4. Other Uses for External Lists . . . . . . . . . . . . . . 5 2.4. Other Uses for External Lists . . . . . . . . . . . . . . 5
2.5. Syntax of an Externally Stored List Name . . . . . . . . . 5 2.5. Syntax of an Externally Stored List Name . . . . . . . . . 5
2.6. Test valid_ext_list . . . . . . . . . . . . . . . . . . . 6 2.6. Definition of "addrbook" URN Parameter . . . . . . . . . . 7
2.7. Interaction with ManageSieve . . . . . . . . . . . . . . . 6 2.7. Test valid_ext_list . . . . . . . . . . . . . . . . . . . 9
2.8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.8. Interaction with ManageSieve . . . . . . . . . . . . . . . 9
2.8.1. Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 7 2.9. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.8.2. Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 8 2.9.1. Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 9
2.8.3. Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 8 2.9.2. Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 10
2.8.4. Example 4 . . . . . . . . . . . . . . . . . . . . . . . . 8 2.9.3. Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 10
2.8.5. Example 5 . . . . . . . . . . . . . . . . . . . . . . . . 9 2.9.4. Example 4 . . . . . . . . . . . . . . . . . . . . . . . . 11
2.9.5. Example 5 . . . . . . . . . . . . . . . . . . . . . . . . 11
3. Security Considerations . . . . . . . . . . . . . . . . . 9 3. Security Considerations . . . . . . . . . . . . . . . . . 12
4. IANA Considerations . . . . . . . . . . . . . . . . . . . 11 4. IANA Considerations . . . . . . . . . . . . . . . . . . . 14
4.1. Registration of Sieve Extension . . . . . . . . . . . . . 11 4.1. Registration of Sieve Extension . . . . . . . . . . . . . 14
4.2. Registration of ManageSieve Capability . . . . . . . . . . 11 4.2. Registration of ManageSieve Capability . . . . . . . . . . 14
4.3. Registration of "ab" URI Scheme . . . . . . . . . . . . . 12 4.3. Creation of Sieve URN Parameters registry . . . . . . . . 15
4.4. Registration of the "addrbook" URN parameter . . . . . . . 15
4.5. Registration of "sieve" URN sub-namespace . . . . . . . . 16
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 13 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 16
6. References . . . . . . . . . . . . . . . . . . . . . . . . 13 6. References . . . . . . . . . . . . . . . . . . . . . . . . 16
6.1. Normative References . . . . . . . . . . . . . . . . . . . 13 6.1. Normative References . . . . . . . . . . . . . . . . . . . 16
6.2. Informative References . . . . . . . . . . . . . . . . . . 14 6.2. Informative References . . . . . . . . . . . . . . . . . . 17
Authors' Addresses . . . . . . . . . . . . . . . . . . . . 15 Authors' Addresses . . . . . . . . . . . . . . . . . . . . 18
1. Introduction 1. Introduction
This document specifies an extension to the Sieve language [RFC5228] This document specifies an extension to the Sieve language [RFC5228]
for checking membership in an external list or for redirecting for checking membership in an external list or for redirecting
messages to an external list of recipients. An "external list" is a messages to an external list of recipients. An "external list" is a
list whose members are stored externally to the Sieve script, such as list whose members are stored externally to the Sieve script, such as
using LDAP [RFC4510], ACAP [RFC2244], CardDAV using LDAP [RFC4510], ACAP [RFC2244], CardDAV
[I-D.ietf-vcarddav-carddav], or relational databases. [I-D.ietf-vcarddav-carddav], or relational databases.
skipping to change at page 4, line 7 skipping to change at page 4, line 7
if any of the specified values matches any member of one or more of if any of the specified values matches any member of one or more of
the lists. the lists.
Comparators are not allowed together with the ":list" match type, so Comparators are not allowed together with the ":list" match type, so
if both are specified in a test, that MUST result in an error. if both are specified in a test, that MUST result in an error.
Queries done through list-specific mechanisms might have the effect Queries done through list-specific mechanisms might have the effect
of built-in comparators; for example, queries to certain lists might of built-in comparators; for example, queries to certain lists might
be case-sensitive, while queries to other lists might be done without be case-sensitive, while queries to other lists might be done without
regard to case. regard to case.
Implementations MUST support the use of :list in "address", Implementations MUST support the use of ":list" in "address",
"envelope" and "header" tests. Implementations that include the "envelope" and "header" tests. Implementations that include the
Variables extension [RFC5229] MUST also support its use in "string" Variables extension [RFC5229] MUST also support its use in "string"
tests. tests.
Implementations MAY support other tests but MUST raise an error Implementations MAY support other tests but MUST raise an error
(which SHOULD be a compile-time error, but MAY be a runtime error) (which SHOULD be a compile-time error, but MAY be a runtime error)
when a script uses :list with a test for which it is not supported. when a script uses ":list" with a test for which it is not supported.
To maintain interoperability, other tests that can be used with :list To maintain interoperability, other tests that can be used with
SHOULD be documented in a specification that defines a capability ":list" SHOULD be documented in a specification that defines a
string that can be tested (in a "require" statement, or using ihave capability string that can be tested (in a "require" statement, or
[RFC5463]). using ihave [RFC5463]).
For example, testing 'header ["to", "cc"]' against a list would cause For example, testing 'header ["to", "cc"]' against a list would cause
each "to" and "cc" value, ignoring leading and trailing whitespace, each "to" and "cc" value, ignoring leading and trailing whitespace,
to be queried. If any value is found to belong to the list, the test to be queried. If any value is found to belong to the list, the test
returns "true". If no value belongs to the list, the test returns returns "true". If no value belongs to the list, the test returns
"false". Once a value is found in the list, there is no need for the "false". Once a value is found in the list, there is no need for the
query mechanism to look further. query mechanism to look further.
For some lists, the Sieve engine might directly retrieve the list and For some lists, the Sieve engine might directly retrieve the list and
make its own comparison. Other lists might not work that way -- they make its own comparison. Other lists might not work that way -- they
might provide a way to ask if a value is in the list, but not permit might provide a way to ask if a value is in the list, but not permit
retrieval of the list itself. It is up to the Sieve implementation retrieval of the list itself. It is up to the Sieve implementation
to understand how to interact with any supported list. If the Sieve to understand how to interact with any supported list. If the Sieve
engine is permanently unable to query the list (perhaps because the engine is permanently unable to query the list (perhaps because the
list doesn't support the required operation), the test MUST result in list doesn't support the required operation), the test MUST result in
a runtime error in the Sieve script. a runtime error in the Sieve script.
See Section 2.5 for the detailed description of syntax used for See Section 2.5 for the detailed description of syntax used for
naming externally stored lists. naming externally stored lists.
The :list match type uses the concept of "match variables" as defined The ":list" match type uses the concept of "match variables" as
in Section 3.2 of the Variables extension [RFC5229]. Implementations defined in Section 3.2 of the Variables extension [RFC5229].
that also support that extension MUST set the ${0} match variable to Implementations that also support that extension MUST set the ${0}
the value in the list that matched the query. Other numbered match match variable to the value in the list that matched the query.
variables (${1}, ${2}, and so on) MAY be set with list-specific Other numbered match variables (${1}, ${2}, and so on) MAY be set
information that might be of use to the script. with list-specific information that might be of use to the script.
2.3. :list Tagged Argument to the "redirect" Action 2.3. :list Tagged Argument to the "redirect" Action
Usage: redirect :list <ext-list-name: string> Usage: redirect :list <ext-list-name: string>
The "redirect" action with the ":list" argument is used to send the The "redirect" action with the ":list" argument is used to send the
message to the set of email addresses in the externally stored list message to the set of email addresses in the externally stored list
named by the ext-list-name string. This variant of the redirect named by the ext-list-name string. This variant of the redirect
command can be used to implement a personal distribution list. command can be used to implement a personal distribution list.
For this feature to work, one of the following conditions has to be For this feature to work, one of the following conditions has to be
skipping to change at page 6, line 11 skipping to change at page 6, line 11
complexity of an implementation from end users. For example, an complexity of an implementation from end users. For example, an
implementation can provide a web interface for managing lists of implementation can provide a web interface for managing lists of
users stored in LDAP. Requiring users to know generic LDAP URI users stored in LDAP. Requiring users to know generic LDAP URI
syntax might not be very practical, due to its complexity. An syntax might not be very practical, due to its complexity. An
implementation can instead use a fixed tag URI prefix such as "tag: implementation can instead use a fixed tag URI prefix such as "tag:
example.com,<date>:" (where <date> can be, for example, a date example.com,<date>:" (where <date> can be, for example, a date
generated once on installation of the web interface and left generated once on installation of the web interface and left
untouched upon upgrades) and the prefix doesn't even need to be shown untouched upon upgrades) and the prefix doesn't even need to be shown
to end users. to end users.
The "ab" URI scheme (in particular, the URI "ab:default"), defined in The "addrbook" URNs defined in Section 2.6 (in particular, the
Section 4.3 MUST be supported. The mandatory-to-implement URI "ab: reserved URI "urn:ietf:params:sieve:addrbook:default") MUST be
default" gives access to the user's default address book (usually the supported. To make it easier to use registered Sieve URN parameters,
user's personal address book). we define a shorthand way to specify them in a Sieve script: a list
name that begins with ":" is taken as referencing a Sieve URN
parameter, with the initial ":" expanding to
"urn:ietf:params:sieve:". So we have the following equivalences:
:addrbook:default == urn:ietf:params:sieve:addrbook:default
:addrbook:personal == urn:ietf:params:sieve:addrbook:personal
...and so on.
The mandatory-to-implement URI
urn:ietf:params:sieve:addrbook:default
gives access to the user's default address book (usually the user's
personal address book). Note that these are URIs, subject to normal
URI encoding rules, including percent-encoding. The reserved name
"default" MUST be considered case-insensitive after decoding. That
means that the following URIs are all equivalent:
:addrbook:default
:ADDRBOOK:DEFAULT
:aDdRbOOk:DeFauLt
:AddrBook:%44%65%66ault
Address book names other than "default" MAY be case-sensitive,
depending upon the implementation, so their case (after URI decoding)
MUST be maintained.
It's possible that a server will have no access to anything It's possible that a server will have no access to anything
resembling an address book (perhaps in an implementation where resembling an address book (perhaps in an implementation where
address books are only client-side things), but the server can still address books are only client-side things), but the server can still
provide access to other sorts of lists -- consider the list of dates provide access to other sorts of lists -- consider the list of dates
in Example 2 (Section 2.8.2), or lists of important keywords and the in Example 2 (Section 2.9.2), or lists of important keywords and the
like. It might sometimes make sense to map "ab:default" into some like. It might sometimes make sense to map ":addrbook:default" into
available list, but that might not always be reasonable. If there some available list, but that might not always be reasonable. If
really is no concept of an address book in a particular server there really is no concept of an address book in a particular server
implementation, the server MAY support "ab:default" by having all implementation, the server MAY support ":addrbook:default" by having
matches to it fail. Such an implementation SHOULD NOT be done except all matches to it fail. Such an implementation SHOULD NOT be done
as a last resort. except as a last resort.
Queries against address books SHOULD be done without regard to case. Queries against address books SHOULD be done without regard to case.
2.6. Test valid_ext_list 2.6. Definition of "addrbook" URN Parameter
This section gives the details of the "addrbook" Sieve URN parameter
that's registered in Section 4.4. URIs that use this parameter begin
with "urn:ietf:params:sieve:addrbook:".
URN parameter name: addrbook
URN parameter syntax: The "addrbook" parameter is defined by the
<addrbook-urn> rule, defined using ABNF [RFC5234]:
addrbook-urn = "addrbook:" addrbook [ "?" extensions ]
addrbook = segment
; <segment> defined in [RFC3986]
extensions = query
; <query> defined in [RFC3986]
Intended usage: "addrbook" URNs are used for designating references
to address books. An address book is a concept used by different
applications (such as Sieve interpreters) for describing a list
of named entries, and may be translated into other types of
address books, such as LDAP Groups. Address books may be private
or shared; they may be personal, organizational, or perhaps even
"crowdsourced".
The address book name (the "addrbook" element in the ABNF above)
refers to a specifically named address book, as defined by the
implementation. A user might, for example, have access to a
number of different address books, such as a personal one, a
family one, a company one, and one for the town where the user
lives.
The extension information (the "extensions" element in the ABNF
above) is available for use in future extensions. It might allow
for things such as dynamic subsets of an address book -- for
example, something such as this might be defined in the future:
urn:ietf:params:sieve:addrbook:personal?name.contains=fred
There are no extensions defined at this time.
An "addrbook" URN is designed to be used by applications for
referencing address books. Each URN is intended to represent a
grouping of addresses that can be logically thought of as one
"book". Any given address can belong to more than one book --
that is, can be referred to by more than one URN.
The URI "urn:ietf:params:sieve:addrbook" has no meaning in
itself. It MUST be used with sub-parameters representing the
address book name and extension information, as shown in the ABNF
above.
The sub-parameter "default" (creating the URN
"urn:ietf:params:sieve:addrbook:default") is a reserved (case-
insensitive) name that MUST be implemented, representing a
default grouping (book) of addresses. Other names, representing
the same or other groupings MAY be implemented. For example, an
implementation might use the following sub-parameters:
* personal -- a book representing the user's personal address
book.
* friends -- a subset of
urn:ietf:params:sieve:addrbook:personal, defined by the user.
* family -- a subset of
urn:ietf:params:sieve:addrbook:personal, defined by the user.
* company -- a book representing user's company's address book.
* department -- a subset of
urn:ietf:params:sieve:addrbook:company, defined by the
company.
* co-workers -- a subset of
urn:ietf:params:sieve:addrbook:company, defined by the user.
* default -- the default address book, a reference to
urn:ietf:params:sieve:addrbook:personal.
Interoperability considerations: Applications are only REQUIRED to
support "addrbook:default", where all cases and encodings of
"default" are considered equivalent. Address book names other
than "default" MAY be case-sensitive, depending upon the
implementation, so their case (after URI decoding) MUST be
maintained.
Security considerations: Applications SHOULD ensure appropriate
restrictions are in place to protect sensitive information that
might be revealed by "addrbook" URNs from access or modification
by untrusted sources.
Contact: Sieve mailing list <sieve@ietf.org>
2.7. Test valid_ext_list
Usage: valid_ext_list <ext-list-names: string-list> Usage: valid_ext_list <ext-list-names: string-list>
The "valid_ext_list" test is true if all of the external list names The "valid_ext_list" test is true if all of the external list names
in the ext-list-names argument are supported, and they are valid both in the ext-list-names argument are supported, and they are valid both
syntactically (including URI parameters) and semantically (including syntactically (including URI parameters) and semantically (including
implementation-specific semantic restrictions). Otherwise the test implementation-specific semantic restrictions). Otherwise the test
returns false. returns false.
This test MUST perform exactly the same validation of an external This test MUST perform exactly the same validation of an external
list name as would be performed by the "header :list" test. list name as would be performed by the "header :list" test.
2.7. Interaction with ManageSieve 2.8. Interaction with ManageSieve
This extension defines the following new capability for ManageSieve This extension defines the following new capability for ManageSieve
(see [RFC5804] section 1.7): (see [RFC5804] section 1.7):
EXTLISTS - A space-separated list of URI schema parts [RFC3986] for EXTLISTS - A space-separated list of URI schema parts [RFC3986] for
supported externally stored list types. This capability MUST be supported externally stored list types. This capability MUST be
returned if the corresponding Sieve implementation supports the returned if the corresponding Sieve implementation supports the
"extlists" extension defined in this document. "extlists" extension defined in this document.
This also extends the ManageSieve ABNF as follows: This also extends the ManageSieve ABNF as follows:
single-capability =/ DQUOTE "EXTLISTS" DQUOTE SP ext-list-types CRLF single-capability =/ DQUOTE "EXTLISTS" DQUOTE SP ext-list-types CRLF
; single-capability is defined in [RFC5804] ; single-capability is defined in [RFC5804]
ext-list-types = string ext-list-types = string
; space separated list of URI schema parts ; space separated list of URI schema parts
; for supported externally stored list types. ; for supported externally stored list types.
; MUST NOT be empty. ; MUST NOT be empty.
2.8. Examples 2.9. Examples
2.8.1. Example 1 2.9.1. Example 1
This example uses a personal address book, along with the Spamtest This example uses a personal address book, along with the Spamtest
[RFC5235] and Relational [RFC5231] extensions to give a different [RFC5235] and Relational [RFC5231] extensions to give a different
level of spam tolerance to known senders. level of spam tolerance to known senders.
require ["envelope", "extlists", "fileinto", "spamtest", require ["envelope", "extlists", "fileinto", "spamtest",
"relational", "comparator-i;ascii-numeric"]; "relational", "comparator-i;ascii-numeric"];
if envelope :list "from" "ab:default" if envelope :list "from" ":addrbook:default"
{ /* Known: allow high spam score */ { /* Known: allow high spam score */
if spamtest :value "ge" :comparator "i;ascii-numeric" "8" if spamtest :value "ge" :comparator "i;ascii-numeric" "8"
{ {
fileinto "spam"; fileinto "spam";
} }
} }
elsif spamtest :value "ge" :comparator "i;ascii-numeric" "3" elsif spamtest :value "ge" :comparator "i;ascii-numeric" "3"
{ /* Unknown: less tolerance in spam score */ { /* Unknown: less tolerance in spam score */
fileinto "spam"; fileinto "spam";
} }
The same example can also be written another way, if the Variables The same example can also be written another way, if the Variables
extension [RFC5229] is also supported: extension [RFC5229] is also supported:
require ["envelope", "extlists", "fileinto", "spamtest", require ["envelope", "extlists", "fileinto", "spamtest",
"variables", "relational", "comparator-i;ascii-numeric"]; "variables", "relational", "comparator-i;ascii-numeric"];
if envelope :list "from" "ab:default" { if envelope :list "from" ":addrbook:default" {
set "lim" "8"; /* Known: allow high spam score */ set "lim" "8"; /* Known: allow high spam score */
} else { } else {
set "lim" "3"; /* Unknown: less tolerance in spam score */ set "lim" "3"; /* Unknown: less tolerance in spam score */
} }
if spamtest :value "ge" :comparator "i;ascii-numeric" "${lim}" { if spamtest :value "ge" :comparator "i;ascii-numeric" "${lim}" {
fileinto "spam"; fileinto "spam";
} }
2.8.2. Example 2 2.9.2. Example 2
This example uses the "currentdate" test [RFC5260] and a list This example uses the "currentdate" test [RFC5260] and a list
containing the dates of local holidays. If today is a holiday, the containing the dates of local holidays. If today is a holiday, the
script will notify [RFC5435] the user via XMPP [RFC5437] about the script will notify [RFC5435] the user via XMPP [RFC5437] about the
message. message.
require ["extlists", "date", "enotify"]; require ["extlists", "date", "enotify"];
if currentdate :list "date" if currentdate :list "date"
"tag:example.com,2011-01-01:localHolidays" { "tag:example.com,2011-01-01:localHolidays" {
notify "xmpp:romeo@im.example.com"; notify "xmpp:romeo@im.example.com";
} }
2.8.3. Example 3 2.9.3. Example 3
This example also uses the "envelope" option [RFC5228] and the This example also uses the "envelope" option [RFC5228] and the
Subaddress extension [RFC5233]. If mail is sent with the list name Subaddress extension [RFC5233]. If mail is sent with the list name
as a subaddress of the recipient (to, say, "alexey+mylist"), and the as a subaddress of the recipient (to, say, "alexey+mylist"), and the
message comes from a member of the list, it will be redirected to all message comes from a member of the list, it will be redirected to all
members of the list. Variants of this technique might be useful for members of the list. Variants of this technique might be useful for
creating private mailing lists. creating private mailing lists.
require ["extlists", "envelope", "subaddress"]; require ["extlists", "envelope", "subaddress"];
# Submission from list members is sent to all members # Submission from list members is sent to all members
if allof (envelope :detail "to" "mylist", if allof (envelope :detail "to" "mylist",
header :list "from" header :list "from"
"tag:example.com,2010-05-28:mylist") { "tag:example.com,2010-05-28:mylist") {
redirect :list "tag:example.com,2010-05-28:mylist"; redirect :list "tag:example.com,2010-05-28:mylist";
} }
2.8.4. Example 4 2.9.4. Example 4
This example uses variable matching [RFC5229] to extract the IP This example uses variable matching [RFC5229] to extract the IP
address from the last "Received" header field. It then checks that address from the last "Received" header field. It then checks that
against a "block list" of undesirable IP addresses, and rejects the against a "block list" of undesirable IP addresses, and rejects the
message if there's a match. message if there's a match.
require ["variables", "extlists", "index", "reject"]; require ["variables", "extlists", "index", "reject"];
if header :index 1 :matches "received" "*(* [*.*.*.*])*" { if header :index 1 :matches "received" "*(* [*.*.*.*])*" {
set "ip" "${3}.${4}.${5}.${6}"; set "ip" "${3}.${4}.${5}.${6}";
if string :list "${ip}" if string :list "${ip}"
"tag:example.com,2011-04-10:DisallowedIPs" { "tag:example.com,2011-04-10:DisallowedIPs" {
reject "Message not allowed from this IP address"; reject "Message not allowed from this IP address";
} }
} }
2.8.5. Example 5 2.9.5. Example 5
This example uses several features of the MIME parts extension This example uses several features of the MIME parts extension
[RFC5703] to scan for unsafe attachment types. To make it easily [RFC5703] to scan for unsafe attachment types. To make it easily
extensible, the unsafe types are kept in an external list, which extensible, the unsafe types are kept in an external list, which
would be shared among all users and all scripts, avoiding the need to would be shared among all users and all scripts, avoiding the need to
change scripts when the list changes. change scripts when the list changes.
[Note that this is an illustrative example, and more rigorous malware [Note that this is an illustrative example, and more rigorous malware
filtering is advisable. It is insufficient to base email security on filtering is advisable. It is insufficient to base email security on
checks of filenames alone.] checks of filenames alone.]
skipping to change at page 10, line 26 skipping to change at page 13, line 14
implementation (or deployment) will know what is appropriate. implementation (or deployment) will know what is appropriate.
There's a difference, for example, between making an LDAP request on There's a difference, for example, between making an LDAP request on
a closed LAN that's only used for trusted servers (it may be that a closed LAN that's only used for trusted servers (it may be that
neither encryption nor authentication is needed), on a firewalled LAN neither encryption nor authentication is needed), on a firewalled LAN
internal to a company (it might be OK to skip encryption, depending internal to a company (it might be OK to skip encryption, depending
upon policy), and on the open Internet (encryption and authentication upon policy), and on the open Internet (encryption and authentication
are probably both required). It also matters whether the list being are probably both required). It also matters whether the list being
accessed is private or public (no encryption or authentication may be accessed is private or public (no encryption or authentication may be
needed for public data, even on the Internet). needed for public data, even on the Internet).
Having the processing and outcome of a Sieve script depend on the
contents of external data can allow someone with control of the
external data to have unusual, and perhaps unauthorized, control of
the script -- and, consequently, of the disposition of the user's
email. A user using such a list for spam control, for example, might
find important mail being discarded because of tampering with the
list. Someone using redirect to an external list could have her
email redirected to the wrong eyes because of such tampering.
Security and integrity protection of external lists is as important
as protection of the Sieve script itself.
Implementations of this extension should keep in mind that matching Implementations of this extension should keep in mind that matching
values against an externally stored list can be IO and/or CPU values against an externally stored list can be IO and/or CPU
intensive. This can be used to deny service to the mailserver and/or intensive. This can be used to deny service to the mailserver and/or
to servers providing access to externally stored mailing lists. A to servers providing access to externally stored mailing lists. A
naive implementation, such as the one that tries to retrieve content naive implementation, such as the one that tries to retrieve content
of the whole list to perform matching can make this worse. of the whole list to perform matching can make this worse.
But note that many protocols that can be used for accessing But note that many protocols that can be used for accessing
externally stored lists support flexible searching features that can externally stored lists support flexible searching features that can
be used to minimize network traffic and load on the directory be used to minimize network traffic and load on the directory
service. For example, LDAP allows for search filters. service. For example, LDAP allows for search filters.
Implementations SHOULD use such features whenever they can. Implementations SHOULD use such features whenever they can.
Many organizations support external lists with thousands of Many organizations support external lists with thousands of
recipients. In order to avoid mailbombs when redirecting a message recipients. In order to avoid mailbombs when redirecting a message
to an externally stored list, implementations SHOULD enforce limits to an externally stored list, implementations SHOULD enforce limits
on the number of recipients and/or on domains to which such on the number of recipients and/or on domains to which such
recipients belong. recipients belong.
Note in particular that it can be too easy for a script to use Note in particular that it can be too easy for a script to use
redirect :list "ab:default"; redirect :list ":addrbook:default";
to send messages to "everyone in your address book", and one can to send messages to "everyone in your address book", and one can
easily imagine both intentional and accidental abuse. The situation easily imagine both intentional and accidental abuse. The situation
can be even worse for, say, "ab:corporate". Warnings, as well as can be even worse for, say, ":addrbook:corporate". Warnings, as well
enforced limits, are appropriate here. as enforced limits, are appropriate here.
Applications SHOULD ensure appropriate restrictions are in place to
protect sensitive information that might be revealed by "addrbook"
URIs from access or modification by untrusted sources.
4. IANA Considerations 4. IANA Considerations
4.1. Registration of Sieve Extension 4.1. Registration of Sieve Extension
The following template specifies the IANA registration of the Sieve The following template specifies the IANA registration of the Sieve
extension specified in this document. This information should be extension specified in this document. This information should be
added to the list of sieve extensions given on added to the list of sieve extensions given on
http://www.iana.org/assignments/sieve-extensions. http://www.iana.org/assignments/sieve-extensions.
skipping to change at page 11, line 45 skipping to change at page 14, line 47
To: iana@iana.org To: iana@iana.org
Subject: ManageSieve Capability Registration Subject: ManageSieve Capability Registration
Capability name: extlists Capability name: extlists
Description: This capability is returned if the server supports the Description: This capability is returned if the server supports the
"extlists" [RFCXXXX] Sieve extension. "extlists" [RFCXXXX] Sieve extension.
Relevant publications: this RFC, Section 2.7 Relevant publications: this RFC, Section 2.8
Person & email address to contact for further information: Sieve Person & email address to contact for further information: Sieve
mailing list <sieve@ietf.org> mailing list <sieve@ietf.org>
Author/Change controller: IESG Author/Change controller: IESG
4.3. Registration of "ab" URI Scheme 4.3. Creation of Sieve URN Parameters registry
The following requests IANA to register a new URI scheme according to
the IANA registration template specified in [RFC4395]:
URI scheme name: ab
Status: Permanent The following requests IANA to create a new registry under "Sieve
Extensions" for Sieve URN Parameters.
URI scheme syntax: URN parameter name: The name of the URN parameter. If the name is
paburi = "ab:" addrbook [ "?" extensions ] "paramname", the resulting top-level URN will be
addrbook = segment "urn:ietf:params:sieve:paramname".
; <segment> defined in [RFC3986]
extensions = query
; <query> defined in [RFC3986]
URI scheme semantics: "ab" URIs are used for designating references Reference: The document and section where the definition of the
to address books. An address book is an internal concept used by parameter can be found. The documentation MUST include the
different applications (such as Sieve interpreters) for following information (see Section 2.6 for an example):
describing a list of named entries, and may be translated into
other types of address books, such as LDAP Groups. Address books
may be private or shared; they may be personal, organizational,
or perhaps even "crowdsourced".
Encoding considerations: Percent-encoding is allowed in "segment" URN parameter name: The name of the URN parameter.
and "query" components. Internationalization is handled by IRI
processing.
Intended usage: An "ab" URI is designed to be used internally by URN parameter syntax: The syntax of the parameter and any sub-
applications for referencing address books. Each URI is intended parameters, which SHOULD be specified using ABNF [RFC5234].
to represent a grouping of addresses that can be logically
thought of as one "book". Any given address can belong to more
than one book -- that is, can be referred to by more than one
URI.
The URI "ab:default" is a reserved name that MUST be implemented, Intended usage: A detailed description of how the parameter and
representing a default grouping (book) of addresses. Other any sub-parameters are expected to be used. This is the
names, representing the same or other groupings MAY be place to define static sub-parameters, registries for sub-
implemented. For example, an implementation might have the parameters, options, registries for options, and so on.
following URIs:
* ab:personal -- a book representing the user's personal Interoperability considerations: Any notes specific to
address book. interoperability issues. This is where to put mandatory-to-
implement sub-parameters and the like.
* ab:friends -- a subset of ab:personal, defined by the user. Security considerations: Any notes specific to security and
privacy issues.
* ab:family -- a subset of ab:personal, defined by the user. Contact: Contact information, in case there are questions.
* ab:company -- a book representing user's company's address 4.4. Registration of the "addrbook" URN parameter
book.
* ab:department -- a subset of ab:company, defined by the The following requests IANA to register a new Sieve URN parameter in
company. the registry defined in Section 4.3.
* ab:co-workers -- a subset of ab:company, defined by the user. URN parameter name: addrbook
* ab:default -- the default address book, a reference to ab: Reference: [This RFC], Section 2.6
personal.
Applications and/or protocols that use this URI scheme name: 4.5. Registration of "sieve" URN sub-namespace
Currently only the Sieve External List extension is using this
URI scheme. Email clients that use URIs internally might find
this URI scheme to be useful as well.
Interoperability considerations: Applications are only REQUIRED to The following requests IANA to register a new URN sub-namespace
support "ab:default". within the IETF URN Sub-namespace for Registered Protocol Parameter
Identifiers defined in [RFC3553].
Security considerations: Applications SHOULD ensure appropriate Registry name: sieve
restrictions are in place to protect sensitive information that
might be revealed by "ab" URIs from access or modification by
untrusted sources.
Relevant publications: this RFC Specification: [this RFC]
Contact: Sieve mailing list <sieve@ietf.org> Repository: [the registry created in Section 4.3]
Author/Change controller: IETF/IESG Index value: Sub-parameters MUST be specified in UTF-8, using
standard URI encoding where necessary.
5. Acknowledgements 5. Acknowledgements
Thanks to Alexandros Vellis, Nigel Swinson, Ned Freed, Kjetil Torgrim Thanks to Alexandros Vellis, Nigel Swinson, Ned Freed, Kjetil Torgrim
Homme, Dave Cridland, Cyrus Daboo, Pete Resnick, and Robert Burrell Homme, Dave Cridland, Cyrus Daboo, Pete Resnick, and Robert Burrell
Donkin for ideas, comments and suggestions. Kristin Hubner also Donkin for ideas, comments and suggestions. Kristin Hubner also
helped greatly with the examples. helped greatly with the examples.
6. References 6. References
skipping to change at page 14, line 12 skipping to change at page 16, line 41
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, Resource Identifier (URI): Generic Syntax", STD 66,
RFC 3986, January 2005. RFC 3986, January 2005.
[RFC4151] Kindberg, T. and S. Hawke, "The 'tag' URI Scheme", [RFC4151] Kindberg, T. and S. Hawke, "The 'tag' URI Scheme",
RFC 4151, October 2005. RFC 4151, October 2005.
[RFC4395] Hansen, T., Hardie, T., and L. Masinter, "Guidelines and
Registration Procedures for New URI Schemes", BCP 35,
RFC 4395, February 2006.
[RFC5228] Guenther, P. and T. Showalter, "Sieve: An Email Filtering [RFC5228] Guenther, P. and T. Showalter, "Sieve: An Email Filtering
Language", RFC 5228, January 2008. Language", RFC 5228, January 2008.
[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, January 2008. Specifications: ABNF", STD 68, RFC 5234, January 2008.
[RFC5804] Melnikov, A. and T. Martin, "A Protocol for Remotely [RFC5804] Melnikov, A. and T. Martin, "A Protocol for Remotely
Managing Sieve Scripts", RFC 5804, July 2010. Managing Sieve Scripts", RFC 5804, July 2010.
6.2. Informative References 6.2. Informative References
[I-D.ietf-vcarddav-carddav] [I-D.ietf-vcarddav-carddav]
Daboo, C., "vCard Extensions to WebDAV (CardDAV)", Daboo, C., "vCard Extensions to WebDAV (CardDAV)",
draft-ietf-vcarddav-carddav-10 (work in progress), draft-ietf-vcarddav-carddav-10 (work in progress),
November 2009. November 2009.
[RFC2244] Newman, C. and J. Myers, "ACAP -- Application [RFC2244] Newman, C. and J. Myers, "ACAP -- Application
Configuration Access Protocol", RFC 2244, November 1997. Configuration Access Protocol", RFC 2244, November 1997.
[RFC3553] Mealling, M., Masinter, L., Hardie, T., and G. Klyne, "An
IETF URN Sub-namespace for Registered Protocol
Parameters", BCP 73, RFC 3553, June 2003.
[RFC4510] Zeilenga, K., "Lightweight Directory Access Protocol [RFC4510] Zeilenga, K., "Lightweight Directory Access Protocol
(LDAP): Technical Specification Road Map", RFC 4510, (LDAP): Technical Specification Road Map", RFC 4510,
June 2006. June 2006.
[RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension", [RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension",
RFC 5229, January 2008. RFC 5229, January 2008.
[RFC5231] Segmuller, W. and B. Leiba, "Sieve Email Filtering: [RFC5231] Segmuller, W. and B. Leiba, "Sieve Email Filtering:
Relational Extension", RFC 5231, January 2008. Relational Extension", RFC 5231, January 2008.
 End of changes. 50 change blocks. 
122 lines changed or deleted 242 lines changed or added

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