idnits 2.17.1 draft-ietf-sieve-external-lists-03.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 (October 22, 2010) is 4927 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) == Missing Reference: 'RFCXXXX' is mentioned on line 379, but not defined ** Downref: Normative reference to an Informational RFC: RFC 4151 Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 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: April 25, 2011 Huawei Technologies 6 October 22, 2010 8 Sieve Extension: Externally Stored Lists 9 draft-ietf-sieve-external-lists-03 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 Do we need support for URI schemes in ihave? From IETF 77 28 minutes: "Can use ihave to test if a URI is valid, both that the 29 scheme is supported and that the URI can be retrieved/queried." 31 o Do we need to say anything about comparators? We can be silent 32 (as now), we can say that comparators MAY be ignored as a list- 33 specific thing, or we can say that comparators MUST NOT be used. 35 o Should we add a mandatory-to-implement tag? Ned suggests (and I 36 agree) that it might be good to add a registry of well-defined 37 strings that can be used instead of URIs, and define the initial 38 string "pab" to represent the user's personal address book. 40 Status of this Memo 42 This Internet-Draft is submitted in full conformance with the 43 provisions of BCP 78 and BCP 79. 45 Internet-Drafts are working documents of the Internet Engineering 46 Task Force (IETF). Note that other groups may also distribute 47 working documents as Internet-Drafts. The list of current Internet- 48 Drafts is at http://datatracker.ietf.org/drafts/current/. 50 Internet-Drafts are draft documents valid for a maximum of six months 51 and may be updated, replaced, or obsoleted by other documents at any 52 time. It is inappropriate to use Internet-Drafts as reference 53 material or to cite them other than as "work in progress." 55 This Internet-Draft will expire on April 25, 2011. 57 Copyright Notice 59 Copyright (c) 2010 IETF Trust and the persons identified as the 60 document authors. All rights reserved. 62 This document is subject to BCP 78 and the IETF Trust's Legal 63 Provisions Relating to IETF Documents 64 (http://trustee.ietf.org/license-info) in effect on the date of 65 publication of this document. Please review these documents 66 carefully, as they describe your rights and restrictions with respect 67 to this document. Code Components extracted from this document must 68 include Simplified BSD License text as described in Section 4.e of 69 the Trust Legal Provisions and are provided without warranty as 70 described in the Simplified BSD License. 72 Table of Contents 74 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 75 1.1. Conventions used in this document . . . . . . . . . . . . . 4 77 2. Extlists extension . . . . . . . . . . . . . . . . . . . . . 4 78 2.1. Capability Identifier . . . . . . . . . . . . . . . . . . . 4 79 2.2. :list match type for supported tests . . . . . . . . . . . . 4 80 2.3. :list tagged argument to the "redirect" action . . . . . . . 5 81 2.4. Other uses for external lists . . . . . . . . . . . . . . . 6 82 2.5. Syntax of an externally stored list name . . . . . . . . . . 6 83 2.6. Interaction with ManageSieve . . . . . . . . . . . . . . . . 6 84 2.7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 7 86 3. Security Considerations . . . . . . . . . . . . . . . . . . 8 88 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . 9 89 4.1. Registration of Sieve extension . . . . . . . . . . . . . . 9 90 4.2. Registration of ManageSieve capability . . . . . . . . . . . 9 92 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 10 94 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 95 6.1. Normative References . . . . . . . . . . . . . . . . . . . . 10 96 6.2. Informative References . . . . . . . . . . . . . . . . . . . 10 98 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 11 100 1. Introduction 102 This document specifies an extension to the Sieve language [RFC5228] 103 for checking membership in an external list or for redirecting 104 messages to an external list of recipients. An "external list" is a 105 list whose members are stored externally to the Sieve script, such as 106 using LDAP [RFC4510], ACAP [RFC2244], or relational databases. 108 This extension adds a new match type to apply to supported tests, and 109 a new tagged argument to the "redirect" action. 111 1.1. Conventions used in this document 113 Conventions for notations are as in [RFC5228] section 1.1, including 114 the use of [RFC5234]. 116 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 117 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 118 document are to be interpreted as described in [RFC2119]. 120 2. Extlists extension 122 2.1. Capability Identifier 124 The capability string associated with the extension defined in this 125 document is "extlists". 127 2.2. :list match type for supported tests 129 ABNF: 131 MATCH-TYPE =/ ":list" 132 ; only valid for supported tests 134 The new ":list" match type changes the interpretation of the "key- 135 list" parameter (the second parameter) to supported tests. When the 136 match type is ":list", the key-list becomes a list of names of 137 externally stored lists. The external lists are queried, perhaps 138 through a list-specific mechanism, and the test evaluates to "true" 139 if any of the specified values matches any member of one or more of 140 the lists. 142 Implementations MUST support "address", "envelope" and "header" 143 tests. Implementations that include the Variables extension 144 [RFC5229] MUST also support "string" tests. 146 Implementations MAY support other tests but MUST raise an error 147 (which SHOULD be a compile-time error, but MAY be a runtime error) 148 when a script uses :list with a test for which it is not supported. 149 To maintain interoperability, other tests that can be used with :list 150 SHOULD be documented in a specification that defines a capability 151 string that can be tested (in a "require" statement, or using ihave 152 [RFC5463]). 154 For example, testing ':header ["to", "cc"]' against a list would 155 cause each "to" and "cc" value, ignoring leading and trailing 156 whitespace, to be queried. If any value is found to belong to the 157 list, the test returns "true". If no value belongs to the list, the 158 test returns "false". Once a value is found in the list, there is no 159 need for the query mechanism to look further. 161 For some lists, the Sieve engine might directly retrieve the list and 162 make its own comparison. Other lists might not work that way -- they 163 might provide a way to ask if a value is in the list, but not permit 164 retrieval of the list itself. It is up to the Sieve implementation 165 to understand how to interact with any supported list. If the Sieve 166 engine is permanently unable to query the list (perhaps because the 167 list doesn't support the required operation), the test MUST result in 168 a runtime error in the Sieve script. 170 See Section 2.5 for the detailed description of syntax used for 171 naming externally stored lists. 173 2.3. :list tagged argument to the "redirect" action 175 Usage: redirect :list 177 The "redirect" action with the ":list" argument is used to send the 178 message to one or more email addresses stored in the externally 179 stored list 'ext-list-name'. This variant of the redirect command 180 can be used to implement a personal distribution list. 182 For this feature to work, one of the following conditions has to be 183 true: 185 1. The list resolves to a list of email addresses, and the Sieve 186 engine is able to enumerate those addresses. 188 2. The list handler is able to take care of the redirection on 189 behalf of the Sieve engine. 191 In cases where, for example, a list contains hashed email address 192 values or an email address pattern ("sz*@example.com", 193 "*+ietf@example.net"), the Sieve engine will not be able to redirect 194 to that list, and responsibility must pass to the list handler. 196 If neither the Sieve engine nor the list handler can enumerate (or 197 iterate) the list, or the list does not resolve to email addresses, 198 the situation MUST result in a runtime error in the Sieve script. 200 See Section 2.5 for the detailed description of syntax used for 201 naming externally stored lists. 203 2.4. Other uses for external lists 205 The uses for external lists specified here represent the useful cases 206 and situations at the time of this writing. Other uses for external 207 lists, using other Sieve features, might be devised in the future, 208 and such uses can be described in extensions to this document. 210 2.5. Syntax of an externally stored list name 212 A name of an externally stored list is always an absolute URI 213 [RFC3986]. Implementations might find URIs such as [RFC4510], 214 [I-D.ietf-vcarddav-carddav], or [RFC4151] to be useful for naming 215 external lists. 217 The "tag" URI scheme [RFC4151] MUST be supported, and can be used to 218 represent opaque, but user friendlier identifiers. Resolution of 219 such identifiers is going to be implementation specific and it can 220 help in hiding the complexity of an implementation from end users. 221 For example, an implementation can provide a web interface for 222 managing lists of users stored in LDAP. Requiring users to know 223 generic LDAP URI syntax might not be very practical, due to its 224 complexity. An implementation can instead use a fixed tag URI prefix 225 such as "tag:example.com,:" (where can be, for example, 226 a date generated once on installation of the web interface and left 227 untouched upon upgrades) and the prefix doesn't even need to be shown 228 to end users. 230 2.6. Interaction with ManageSieve 232 This extension defines the following new capability for ManageSieve 233 (see [RFC5804] section 1.7): 235 EXTLISTS - A space-separated list of URI schema parts [RFC3986] for 236 supported externally stored list types. This capability MUST be 237 returned if the Sieve implementation supports the "extlists" 238 extension defined in this document. 240 This also extends the ManageSieve ABNF as follows: 242 single-capability =/ DQUOTE "EXTLISTS" DQUOTE SP ext-list-types CRLF 243 ; single-capability is defined in [RFC5804] 245 ext-list-types = string 246 ; space separated list of URI schema parts 247 ; for supported externally stored list types. 248 ; MUST NOT be empty. 250 2.7. Examples 252 This example uses the "envelope" option [RFC5228] and the 253 "subaddress" extension [RFC5233]: 255 require ["extlists", "envelope", "subaddress"]; 257 # Submission from list members is sent to all members 258 if allof (envelope :detail :list "to" 259 "tag:example.com,2009-05-28:mylist", 260 header :list "from" 261 "tag:example.com,2009-05-28:mylist") { 262 redirect :list "tag:example.com,2009-05-28:mylist"; 263 } 265 This example uses the "currentdate" test [RFC5260] and a list 266 containing the dates of local holidays. If today is a holiday, the 267 script will notify [RFC5435] the user via XMPP [RFC5437] about the 268 message. 270 require ["extlists", "date", "enotify"]; 271 if currentdate :list "date" 272 "tag:example.com,2010-01-01:localHolidays" { 273 notify "xmpp:romeo@im.example.com"; 274 } 276 This example uses a personal address book, along with spamtest 277 [RFC5235] and the relational extension [RFC5231] to give a different 278 level of spam tolerance to known senders. 280 require ["envelope", "extlists", "fileinto", "spamtest", 281 "relational", "comparator-i;ascii-numeric"]; 282 if allof ( 283 envelope :list "from" "tag:example.com,2010-04-10:pab", 284 spamtest :value "ge" :comparator "i;ascii-numeric" "8" 285 ) 286 { /* Known: allow high spam score */ 287 fileinto "spam"; 288 } 289 elsif spamtest :value "ge" :comparator "i;ascii-numeric" "3" 290 { /* Unknown: less tolerance in spam score */ 291 fileinto "spam"; 292 } 294 3. Security Considerations 296 Security considerations related to the "address"/"envelope"/"header" 297 tests and "redirect" action discussed in [RFC5228] also apply to this 298 document. 300 External list memberships ought to be treated as if they are an 301 integral part of the script, so a temporary failure to access an 302 external list SHOULD be handled in the same way as a temporary 303 failure to retrieve the Sieve script itself. 305 For example, if the Sieve script is stored in the Lightweight 306 Directory Access Protocol [RFC4510] and the script can't be retrieved 307 when a message is processed (perhaps the LDAP server is unavailable), 308 then the Sieve engine might delay message delivery until the script 309 can be retrieved successfully. Similarly, if an external list is 310 stored in LDAP and that LDAP server is unavailable, the Sieve engine 311 would take the same action -- delay message delivery and try again 312 later. 314 Protocols/APIs used to retrieve/verify external list membership MUST 315 provide an appropriate level of confidentiality and authentication. 316 Usually, that will be at least the same level of confidentiality as 317 protocols/APIs used to retrieve Sieve scripts, but only the 318 implementation (or deployment) will know what is appropriate. 319 There's a difference, for example, between making an LDAP request on 320 a closed LAN that's only used for trusted servers (it may be that 321 neither encryption nor authentication is needed), on a firewalled LAN 322 internal to a company (it might be OK to skip encryption, depending 323 upon policy), and on the open Internet (encryption and authentication 324 are probably both required). It also matters whether the list being 325 accessed is private or public (no encryption or authentication may be 326 needed for public data, even on the Internet). 328 Implementations of this extension should keep in mind that matching 329 values against an externally stored list can be IO and/or CPU 330 intensive. This can be used to deny service to the mailserver and/or 331 to servers providing access to externally stored mailing lists. A 332 naive implementation, such as the one that tries to retrieve content 333 of the whole list to perform matching can make this worse. 335 But note that many protocols that can be used for accessing 336 externally stored lists support flexible searching features that can 337 be used to minimize network traffic and load on the directory 338 service. For example, LDAP allows for search filters. 339 Implementations SHOULD use such features whenever they can. 341 Many organizations support external lists with thousands of 342 recipients. In order to avoid mailbombs when redirecting a message 343 to an externally stored list, implementations SHOULD enforce limits 344 on the number of recipients and/or on domains to which such 345 recipients belong. 347 4. IANA Considerations 349 4.1. Registration of Sieve extension 351 The following template specifies the IANA registration of the Sieve 352 extension specified in this document: 354 To: iana@iana.org 355 Subject: Registration of new Sieve extension 356 Capability name: extlists 357 Description: adds the ':list' match type to certain Sieve tests, and 358 the ':list' argument to the 'redirect' action. The ':list' match 359 type changes tests to match values against values stored in one or 360 more externally stored lists. The ':list' argument to the redirect 361 action changes the redirect action to forward the message to email 362 addresses stored in the externally stored list. 363 RFC number: this RFC 364 Contact address: 365 The Sieve discussion list 367 This information should be added to the list of sieve extensions 368 given on http://www.iana.org/assignments/sieve-extensions. 370 4.2. Registration of ManageSieve capability 372 The following requests IANA to register a new ManageSieve Capability 373 according to the IANA registration template specified in [RFC5804]: 375 To: iana@iana.org 376 Subject: ManageSieve Capability Registration 377 Capability name: extlists 378 Description: This capability is returned if the server supports the 379 "extlists" [RFCXXXX] Sieve extension. 380 Relevant publications: this RFC, Section 2.6 381 Person & email address to contact for further information: Alexey 382 Melnikov 383 Author/Change controller: IESG 385 5. Acknowledgements 387 Thanks to Alexandros Vellis, Nigel Swinson, Ned Freed, Kjetil Torgrim 388 Homme, Dave Cridland, Cyrus Daboo, Pete Resnick, and Robert Burrell 389 Donkin for ideas, comments and suggestions. Kristin Hubner also 390 helped greatly with the examples. 392 6. References 394 6.1. Normative References 396 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 397 Requirement Levels", BCP 14, RFC 2119, March 1997. 399 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 400 Resource Identifier (URI): Generic Syntax", STD 66, 401 RFC 3986, January 2005. 403 [RFC4151] Kindberg, T. and S. Hawke, "The 'tag' URI Scheme", 404 RFC 4151, October 2005. 406 [RFC5228] Guenther, P. and T. Showalter, "Sieve: An Email Filtering 407 Language", RFC 5228, January 2008. 409 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 410 Specifications: ABNF", STD 68, RFC 5234, January 2008. 412 [RFC5804] Melnikov, A. and T. Martin, "A Protocol for Remotely 413 Managing Sieve Scripts", RFC 5804, July 2010. 415 6.2. Informative References 417 [I-D.ietf-vcarddav-carddav] 418 Daboo, C., "vCard Extensions to WebDAV (CardDAV)", 419 draft-ietf-vcarddav-carddav-10 (work in progress), 420 November 2009. 422 [RFC2244] Newman, C. and J. Myers, "ACAP -- Application 423 Configuration Access Protocol", RFC 2244, November 1997. 425 [RFC4510] Zeilenga, K., "Lightweight Directory Access Protocol 426 (LDAP): Technical Specification Road Map", RFC 4510, 427 June 2006. 429 [RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension", 430 RFC 5229, January 2008. 432 [RFC5231] Segmuller, W. and B. Leiba, "Sieve Email Filtering: 433 Relational Extension", RFC 5231, January 2008. 435 [RFC5233] Murchison, K., "Sieve Email Filtering: Subaddress 436 Extension", RFC 5233, January 2008. 438 [RFC5235] Daboo, C., "Sieve Email Filtering: Spamtest and Virustest 439 Extensions", RFC 5235, January 2008. 441 [RFC5260] Freed, N., "Sieve Email Filtering: Date and Index 442 Extensions", RFC 5260, July 2008. 444 [RFC5435] Melnikov, A., Leiba, B., Segmuller, W., and T. Martin, 445 "Sieve Email Filtering: Extension for Notifications", 446 RFC 5435, January 2009. 448 [RFC5437] Saint-Andre, P. and A. Melnikov, "Sieve Notification 449 Mechanism: Extensible Messaging and Presence Protocol 450 (XMPP)", RFC 5437, January 2009. 452 [RFC5463] Freed, N., "Sieve Email Filtering: Ihave Extension", 453 RFC 5463, March 2009. 455 Authors' Addresses 457 Alexey Melnikov 458 Isode Limited 459 5 Castle Business Village 460 36 Station Road 461 Hampton, Middlesex TW12 2BX 462 UK 464 Email: Alexey.Melnikov@isode.com 465 Barry Leiba 466 Huawei Technologies 468 Phone: +1 646 827 0648 469 Email: barryleiba@computer.org 470 URI: http://internetmessagingtechnology.org/