idnits 2.17.1 draft-ietf-sieve-external-lists-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (May 19, 2010) is 5089 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Informational RFC: RFC 4151 (ref. 'TAG-URI') Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Sieve Working Group A. Melnikov 3 Internet-Draft Isode Limited 4 Intended status: Standards Track B. Leiba 5 Expires: November 20, 2010 Huawei Technologies 6 May 19, 2010 8 Sieve Extension: Externally Stored Lists 9 draft-ietf-sieve-external-lists-02 11 Abstract 13 The Sieve scripting language can be used to implement whitelisting, 14 blacklisting, personal distribution lists, and other sorts of list 15 matching. Currently, this requires that all members of such lists be 16 hardcoded in the script itself. Whenever a member of a list is added 17 or deleted, the script needs to be updated and possibly uploaded to a 18 mail server. 20 This document defines a Sieve extension for accessing externally 21 stored lists -- lists whose members are stored externally to the 22 script, such as using LDAP (RFC 4510), ACAP (RFC 2244), or relational 23 databases. 25 ToDo 27 o Need a way to advertise supported URI schemas in ManageSieve and 28 ihave. From IETF 77 minutes: "Can use ihave to test if a URI is 29 valid, both that the scheme is supported and that the URI can be 30 retrieved/queried." 32 Status of this Memo 34 This Internet-Draft is submitted in full conformance with the 35 provisions of BCP 78 and BCP 79. 37 Internet-Drafts are working documents of the Internet Engineering 38 Task Force (IETF). Note that other groups may also distribute 39 working documents as Internet-Drafts. The list of current Internet- 40 Drafts is at http://datatracker.ietf.org/drafts/current/. 42 Internet-Drafts are draft documents valid for a maximum of six months 43 and may be updated, replaced, or obsoleted by other documents at any 44 time. It is inappropriate to use Internet-Drafts as reference 45 material or to cite them other than as "work in progress." 47 This Internet-Draft will expire on November 20, 2010. 49 Copyright Notice 51 Copyright (c) 2010 IETF Trust and the persons identified as the 52 document authors. All rights reserved. 54 This document is subject to BCP 78 and the IETF Trust's Legal 55 Provisions Relating to IETF Documents 56 (http://trustee.ietf.org/license-info) in effect on the date of 57 publication of this document. Please review these documents 58 carefully, as they describe your rights and restrictions with respect 59 to this document. Code Components extracted from this document must 60 include Simplified BSD License text as described in Section 4.e of 61 the Trust Legal Provisions and are provided without warranty as 62 described in the Simplified BSD License. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 67 1.1. Conventions used in this document . . . . . . . . . . . . . . 3 69 2. Extlists extension . . . . . . . . . . . . . . . . . . . . . 3 70 2.1. Capability Identifier . . . . . . . . . . . . . . . . . . . . 3 71 2.2. :list match type for supported tests . . . . . . . . . . . . 3 72 2.3. :list tagged argument to the "redirect" action . . . . . . . 4 73 2.4. Syntax of an externally stored list name . . . . . . . . . . 5 74 2.5. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 5 76 3. Security Considerations . . . . . . . . . . . . . . . . . . . 5 78 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 80 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 82 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 83 6.1. Normative References . . . . . . . . . . . . . . . . . . . . 7 84 6.2. Informative References . . . . . . . . . . . . . . . . . . . 8 86 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 8 88 1. Introduction 90 This document specifies an extension to the Sieve language [Sieve] 91 for checking membership in an external list or for redirecting 92 messages to an external list of recipients. An "external list" is a 93 list whose members are stored externally to the Sieve script, such as 94 using LDAP [LDAP], ACAP [ACAP], or relational databases. 96 This extension adds a new match type to apply to supported tests, and 97 a new tagged argument to the "redirect" action. 99 1.1. Conventions used in this document 101 Conventions for notations are as in [Sieve] section 1.1, including 102 the use of [ABNF]. 104 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 105 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 106 document are to be interpreted as described in [Kwds]. 108 2. Extlists extension 110 2.1. Capability Identifier 112 The capability string associated with the extension defined in this 113 document is "extlists". 115 2.2. :list match type for supported tests 117 ABNF: 119 MATCH-TYPE =/ ":list" 120 ; only valid for supported tests 122 The new ":list" match type changes the interpretation of the "key- 123 list" parameter (the second parameter) to supported tests. When the 124 match type is ":list", the key-list becomes a list of names of 125 externally stored lists. The external lists are queried, perhaps 126 through a list-specific mechanism, and the test evaluates to "true" 127 if any of the specified values matches any member of one or more of 128 the lists. 130 Implementations MUST support "address", "envelope" and "header" 131 tests. Implementations that include the Variables extension 132 [Variables] MUST also support "string" tests. 134 Implementations MAY support other tests but MUST raise an error 135 (which SHOULD be a compile-time error, but MAY be a runtime error) 136 when a script uses :list with a test for which it is not supported. 137 To maintain interoperability, other tests that can be used with :list 138 SHOULD be documented in a specification that defines a capability 139 string that can be tested (in a "require" statement, or using ihave 140 [Ihave]). 142 For example, testing ':header ["to", "cc"]' against a list would 143 cause each "to" and "cc" value, ignoring leading and trailing 144 whitespace, to be queried. When any value is found to belong to the 145 list, the queries stop and the test returns "true". If no value 146 belongs to the list, the test returns "false". 148 For some lists, the Sieve engine might directly retrieve the list and 149 make its own comparison. Other lists might not work that way -- they 150 might provide a way to ask if a value is in the list, but not permit 151 retrieval of the list itself. It is up to the Sieve implementation 152 to understand how to interact with any supported list. If the Sieve 153 engine is permanently unable to query the list (perhaps because the 154 list doesn't support the required operation), the test MUST result in 155 a runtime error in the Sieve script. 157 See Section 2.4 for the detailed description of syntax used for 158 naming externally stored lists. 160 2.3. :list tagged argument to the "redirect" action 162 Usage: redirect :list 164 The "redirect" action with the ":list" argument is used to send the 165 message to one or more email addresses stored in the externally 166 stored list 'ext-list-name'. This variant of the redirect command 167 can be used to implement a personal distribution list. 169 For this feature to work, one of the following conditions has to be 170 true: 172 1. The list resolves to a list of email addresses, and the Sieve 173 engine is able to enumerate those addresses. 175 2. The list handler is able to take care of the redirection on 176 behalf of the Sieve engine. 178 In cases where, for example, a list contains hashed email address 179 values or an email address pattern ("sz*@example.com", 180 "*+ietf@example.net"), the Sieve engine will not be able to redirect 181 to that list, and responsibility must pass to the list handler. 183 If neither the Sieve engine nor the list handler can enumerate (or 184 iterate) the list, or the list does not resolve to email addresses, 185 the situation MUST result in a runtime error in the Sieve script. 187 See Section 2.4 for the detailed description of syntax used for 188 naming externally stored lists. 190 2.4. Syntax of an externally stored list name 192 A name of an externally stored list is always an absolute URI [URI]. 193 Implementations might find URLs such as [LDAP], [CardDAV], or 194 [TAG-URI] to be useful for naming external lists. 196 The "tag" URI scheme [TAG-URI] MUST be supported, and can be used to 197 represent opaque, but user friendlier identifiers. Resolution of 198 such identifiers is going to be implementation specific and it can 199 help in hiding the complexity of an implementation from end users. 200 For example, an implementation can provide a web interface for 201 managing lists of users stored in LDAP. Requiring users to know 202 generic LDAP URL syntax might not be very practical, due to its 203 complexity. An implementation can instead use a fixed tag URI prefix 204 such as "tag:example.com,:" (where can be, for example, 205 a date generated once on installation of the web interface and left 206 untouched upon upgrades) and the prefix doesn't even need to be shown 207 to end users. 209 2.5. Examples 211 Example 1 uses the "envelope" option [Sieve] and the "subaddress" 212 extension [Subaddress]: 214 require ["extlists", "envelope", "subaddress"]; 216 # Submission from list members is sent to all members 217 if allof (envelope :detail :list "to" 218 "tag:example.com,2009-05-28:mylist", 219 header :list "from" 220 "tag:example.com,2009-05-28:mylist") { 221 redirect :list "tag:example.com,2009-05-28:mylist"; 222 } 224 3. Security Considerations 226 Security considerations related to the "address"/"envelope"/"header" 227 tests and "redirect" action discussed in [Sieve] also apply to this 228 document. 230 External list memberships ought to be treated as if they are an 231 integral part of the script, so a temporary failure to access an 232 external list SHOULD be handled in the same way as a temporary 233 failure to retrieve the Sieve script itself. 235 For example, if the Sieve script is stored in the Lightweight 236 Directory Access Protocol [LDAP] and the script can't be retrieved 237 when a message is processed (perhaps the LDAP server is unavailable), 238 then the Sieve engine might delay message delivery until the script 239 can be retrieved successfully. Similarly, if an external list is 240 stored in LDAP and that LDAP server is unavailable, the Sieve engine 241 would take the same action -- delay message delivery and try again 242 later. 244 Protocols/APIs used to retrieve/verify external list membership MUST 245 provide an appropriate level of confidentiality and authentication. 246 Usually, that will be at least the same level of confidentiality as 247 protocols/APIs used to retrieve Sieve scripts, but only the 248 implementation (or deployment) will know what is appropriate. 249 There's a difference, for example, between making an LDAP request on 250 a closed LAN that's only used for trusted servers (it may be that 251 neither encryption nor authentication is needed), on a firewalled LAN 252 internal to a company (it might be OK to skip encryption, depending 253 upon policy), and on the open Internet (encryption and authentication 254 are probably both required). It also matters whether the list being 255 accessed is private or public (no encryption or authentication may be 256 needed for public data, even on the Internet). 258 Implementations of this extension should keep in mind that matching 259 values against an externally stored list can be IO and/or CPU 260 intensive. This can be used to deny service to the mailserver and/or 261 to servers providing access to externally stored mailing lists. A 262 naive implementation, such as the one that tries to retrieve content 263 of the whole list to perform matching can make this worse. 265 But note that many protocols that can be used for accessing 266 externally stored lists support flexible searching features that can 267 be used to minimize network traffic and load on the directory 268 service. For example, LDAP allows for search filters. 269 Implementations SHOULD use such features whenever they can. 271 Many organizations support external lists with thousands of 272 recipients. In order to avoid mailbombs when redirecting a message 273 to an externally stored list, implementations SHOULD enforce limits 274 on the number of recipients and/or on domains to which such 275 recipients belong. 277 4. IANA Considerations 279 The following template specifies the IANA registration of the notify 280 Sieve extension specified in this document: 282 To: iana@iana.org 283 Subject: Registration of new Sieve extension 284 Capability name: extlists 285 Description: adds the ':list' match type to certain Sieve tests, and 286 the ':list' argument to the 'redirect' action. The ':list' match 287 type changes tests to match values against values stored in one or 288 more externally stored lists. The ':list' argument to the redirect 289 action changes the redirect action to forward the message to email 290 addresses stored in the externally stored list. 291 RFC number: this RFC 292 Contact address: 293 The Sieve discussion list 295 This information should be added to the list of sieve extensions 296 given on http://www.iana.org/assignments/sieve-extensions. 298 5. Acknowledgements 300 Thanks to Alexandros Vellis, Nigel Swinson, Ned Freed, Kjetil Torgrim 301 Homme, Dave Cridland, Cyrus Daboo, Pete Resnick, and Robert Burrell 302 Donkin for ideas, comments and suggestions. 304 6. References 306 6.1. Normative References 308 [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 309 Specifications: ABNF", RFC 5234, January 2008. 311 [Kwds] Bradner, S., "Key words for use in RFCs to Indicate 312 Requirement Levels", RFC 2119, March 1997. 314 [Sieve] Guenther, P. and T. Showalter, "Sieve: An Email Filtering 315 Language", RFC 5228, January 2008. 317 [TAG-URI] Kindberg, T. and S. Hawke, "The 'tag' URI Scheme", 318 RFC 4151, October 2005. 320 [URI] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 321 Resource Identifier (URI): Generic Syntax", STD 66, 322 RFC 3986, January 2005. 324 6.2. Informative References 326 [ACAP] Newman, C. and J. Myers, "ACAP -- Application 327 Configuration Access Protocol", RFC 2244, November 1997. 329 [CardDAV] Daboo, C., "vCard Extensions to WebDAV (CardDAV)", work in 330 progress, draft-ietf-vcarddav-carddav, November 2009. 332 [Ihave] Freed, N., "Sieve Email Filtering: Ihave Extension", 333 RFC 5463, March 2009. 335 [LDAP] Zeilenga, K., "Lightweight Directory Access Protocol 336 (LDAP): Technical Specification Road Map", RFC 4510, 337 June 2006. 339 [Subaddress] 340 Murchison, K., "Sieve Email Filtering: Subaddress 341 Extension", RFC 5233, January 2008. 343 [Variables] 344 Homme, K., "Sieve Email Filtering: Variables Extension", 345 RFC 5229, January 2008. 347 Authors' Addresses 349 Alexey Melnikov 350 Isode Limited 351 5 Castle Business Village 352 36 Station Road 353 Hampton, Middlesex TW12 2BX 354 UK 356 Email: Alexey.Melnikov@isode.com 358 Barry Leiba 359 Huawei Technologies 361 Phone: +1 646 827 0648 362 Email: barryleiba@computer.org 363 URI: http://internetmessagingtechnology.org/