idnits 2.17.1 draft-ietf-sieve-external-lists-04.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 (November 8, 2010) is 4918 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 388, 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: May 12, 2011 Huawei Technologies 6 November 8, 2010 8 Sieve Extension: Externally Stored Lists 9 draft-ietf-sieve-external-lists-04 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 May 12, 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 85 2.7.1. Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 7 86 2.7.2. Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 7 87 2.7.3. Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 7 89 3. Security Considerations . . . . . . . . . . . . . . . . . 8 91 4. IANA Considerations . . . . . . . . . . . . . . . . . . . 9 92 4.1. Registration of Sieve extension . . . . . . . . . . . . . 9 93 4.2. Registration of ManageSieve capability . . . . . . . . . . 9 95 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 10 97 6. References . . . . . . . . . . . . . . . . . . . . . . . . 10 98 6.1. Normative References . . . . . . . . . . . . . . . . . . . 10 99 6.2. Informative References . . . . . . . . . . . . . . . . . . 10 101 Authors' Addresses . . . . . . . . . . . . . . . . . . . . 11 103 1. Introduction 105 This document specifies an extension to the Sieve language [RFC5228] 106 for checking membership in an external list or for redirecting 107 messages to an external list of recipients. An "external list" is a 108 list whose members are stored externally to the Sieve script, such as 109 using LDAP [RFC4510], ACAP [RFC2244], or relational databases. 111 This extension adds a new match type to apply to supported tests, and 112 a new tagged argument to the "redirect" action. 114 1.1. Conventions used in this document 116 Conventions for notations are as in [RFC5228] section 1.1, including 117 the use of [RFC5234]. 119 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 120 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 121 document are to be interpreted as described in [RFC2119]. 123 2. Extlists extension 125 2.1. Capability Identifier 127 The capability string associated with the extension defined in this 128 document is "extlists". 130 2.2. :list match type for supported tests 132 ABNF: 134 MATCH-TYPE =/ ":list" 135 ; only valid for supported tests 137 The new ":list" match type changes the interpretation of the "key- 138 list" parameter (the second parameter) to supported tests. When the 139 match type is ":list", the key-list becomes a list of names of 140 externally stored lists. The external lists are queried, perhaps 141 through a list-specific mechanism, and the test evaluates to "true" 142 if any of the specified values matches any member of one or more of 143 the lists. 145 Implementations MUST support "address", "envelope" and "header" 146 tests. Implementations that include the Variables extension 147 [RFC5229] MUST also support "string" tests. 149 Implementations MAY support other tests but MUST raise an error 150 (which SHOULD be a compile-time error, but MAY be a runtime error) 151 when a script uses :list with a test for which it is not supported. 152 To maintain interoperability, other tests that can be used with :list 153 SHOULD be documented in a specification that defines a capability 154 string that can be tested (in a "require" statement, or using ihave 155 [RFC5463]). 157 For example, testing ':header ["to", "cc"]' against a list would 158 cause each "to" and "cc" value, ignoring leading and trailing 159 whitespace, to be queried. If any value is found to belong to the 160 list, the test returns "true". If no value belongs to the list, the 161 test returns "false". Once a value is found in the list, there is no 162 need for the query mechanism to look further. 164 For some lists, the Sieve engine might directly retrieve the list and 165 make its own comparison. Other lists might not work that way -- they 166 might provide a way to ask if a value is in the list, but not permit 167 retrieval of the list itself. It is up to the Sieve implementation 168 to understand how to interact with any supported list. If the Sieve 169 engine is permanently unable to query the list (perhaps because the 170 list doesn't support the required operation), the test MUST result in 171 a runtime error in the Sieve script. 173 See Section 2.5 for the detailed description of syntax used for 174 naming externally stored lists. 176 2.3. :list tagged argument to the "redirect" action 178 Usage: redirect :list 180 The "redirect" action with the ":list" argument is used to send the 181 message to one or more email addresses stored in the externally 182 stored list 'ext-list-name'. This variant of the redirect command 183 can be used to implement a personal distribution list. 185 For this feature to work, one of the following conditions has to be 186 true: 188 1. The list resolves to a list of email addresses, and the Sieve 189 engine is able to enumerate those addresses. 191 2. The list handler is able to take care of the redirection on 192 behalf of the Sieve engine. 194 In cases where, for example, a list contains hashed email address 195 values or an email address pattern ("sz*@example.com", 196 "*+ietf@example.net"), the Sieve engine will not be able to redirect 197 to that list, and responsibility must pass to the list handler. 199 If neither the Sieve engine nor the list handler can enumerate (or 200 iterate) the list, or the list does not resolve to email addresses, 201 the situation MUST result in a runtime error in the Sieve script. 203 See Section 2.5 for the detailed description of syntax used for 204 naming externally stored lists. 206 2.4. Other uses for external lists 208 The uses for external lists specified here represent the useful cases 209 and situations at the time of this writing. Other uses for external 210 lists, using other Sieve features, might be devised in the future, 211 and such uses can be described in extensions to this document. 213 2.5. Syntax of an externally stored list name 215 A name of an externally stored list is always an absolute URI 216 [RFC3986]. Implementations might find URIs such as LDAP [RFC4510], 217 CardDAV [I-D.ietf-vcarddav-carddav], or Tag [RFC4151] to be useful 218 for naming external lists. 220 The "tag" URI scheme [RFC4151] MUST be supported, and can be used to 221 represent opaque, but user friendlier identifiers. Resolution of 222 such identifiers is going to be implementation specific and it can 223 help in hiding the complexity of an implementation from end users. 224 For example, an implementation can provide a web interface for 225 managing lists of users stored in LDAP. Requiring users to know 226 generic LDAP URI syntax might not be very practical, due to its 227 complexity. An implementation can instead use a fixed tag URI prefix 228 such as "tag:example.com,:" (where can be, for example, 229 a date generated once on installation of the web interface and left 230 untouched upon upgrades) and the prefix doesn't even need to be shown 231 to end users. 233 2.6. Interaction with ManageSieve 235 This extension defines the following new capability for ManageSieve 236 (see [RFC5804] section 1.7): 238 EXTLISTS - A space-separated list of URI schema parts [RFC3986] for 239 supported externally stored list types. This capability MUST be 240 returned if the Sieve implementation supports the "extlists" 241 extension defined in this document. 243 This also extends the ManageSieve ABNF as follows: 245 single-capability =/ DQUOTE "EXTLISTS" DQUOTE SP ext-list-types CRLF 246 ; single-capability is defined in [RFC5804] 248 ext-list-types = string 249 ; space separated list of URI schema parts 250 ; for supported externally stored list types. 251 ; MUST NOT be empty. 253 2.7. Examples 255 2.7.1. Example 1 257 This example uses the "envelope" option [RFC5228] and the 258 "subaddress" extension [RFC5233]: 260 require ["extlists", "envelope", "subaddress"]; 262 # Submission from list members is sent to all members 263 if allof (envelope :detail :list "to" 264 "tag:example.com,2009-05-28:mylist", 265 header :list "from" 266 "tag:example.com,2009-05-28:mylist") { 267 redirect :list "tag:example.com,2009-05-28:mylist"; 268 } 270 2.7.2. Example 2 272 This example uses the "currentdate" test [RFC5260] and a list 273 containing the dates of local holidays. If today is a holiday, the 274 script will notify [RFC5435] the user via XMPP [RFC5437] about the 275 message. 277 require ["extlists", "date", "enotify"]; 278 if currentdate :list "date" 279 "tag:example.com,2010-01-01:localHolidays" { 280 notify "xmpp:romeo@im.example.com"; 281 } 283 2.7.3. Example 3 285 This example uses a personal address book, along with spamtest 286 [RFC5235] and the relational extension [RFC5231] to give a different 287 level of spam tolerance to known senders. 289 require ["envelope", "extlists", "fileinto", "spamtest", 290 "relational", "comparator-i;ascii-numeric"]; 291 if allof ( 292 envelope :list "from" "tag:example.com,2010-04-10:pab", 293 spamtest :value "ge" :comparator "i;ascii-numeric" "8" 294 ) 295 { /* Known: allow high spam score */ 296 fileinto "spam"; 297 } 298 elsif spamtest :value "ge" :comparator "i;ascii-numeric" "3" 299 { /* Unknown: less tolerance in spam score */ 300 fileinto "spam"; 301 } 303 3. Security Considerations 305 Security considerations related to the "address"/"envelope"/"header" 306 tests and "redirect" action discussed in Sieve [RFC5228] also apply 307 to this document. 309 External list memberships ought to be treated as if they are an 310 integral part of the script, so a temporary failure to access an 311 external list SHOULD be handled in the same way as a temporary 312 failure to retrieve the Sieve script itself. 314 For example, if the Sieve script is stored in the Lightweight 315 Directory Access Protocol [RFC4510] and the script can't be retrieved 316 when a message is processed (perhaps the LDAP server is unavailable), 317 then the Sieve engine might delay message delivery until the script 318 can be retrieved successfully. Similarly, if an external list is 319 stored in LDAP and that LDAP server is unavailable, the Sieve engine 320 would take the same action -- delay message delivery and try again 321 later. 323 Protocols/APIs used to retrieve/verify external list membership MUST 324 provide an appropriate level of confidentiality and authentication. 325 Usually, that will be at least the same level of confidentiality as 326 protocols/APIs used to retrieve Sieve scripts, but only the 327 implementation (or deployment) will know what is appropriate. 328 There's a difference, for example, between making an LDAP request on 329 a closed LAN that's only used for trusted servers (it may be that 330 neither encryption nor authentication is needed), on a firewalled LAN 331 internal to a company (it might be OK to skip encryption, depending 332 upon policy), and on the open Internet (encryption and authentication 333 are probably both required). It also matters whether the list being 334 accessed is private or public (no encryption or authentication may be 335 needed for public data, even on the Internet). 337 Implementations of this extension should keep in mind that matching 338 values against an externally stored list can be IO and/or CPU 339 intensive. This can be used to deny service to the mailserver and/or 340 to servers providing access to externally stored mailing lists. A 341 naive implementation, such as the one that tries to retrieve content 342 of the whole list to perform matching can make this worse. 344 But note that many protocols that can be used for accessing 345 externally stored lists support flexible searching features that can 346 be used to minimize network traffic and load on the directory 347 service. For example, LDAP allows for search filters. 348 Implementations SHOULD use such features whenever they can. 350 Many organizations support external lists with thousands of 351 recipients. In order to avoid mailbombs when redirecting a message 352 to an externally stored list, implementations SHOULD enforce limits 353 on the number of recipients and/or on domains to which such 354 recipients belong. 356 4. IANA Considerations 358 4.1. Registration of Sieve extension 360 The following template specifies the IANA registration of the Sieve 361 extension specified in this document: 363 To: iana@iana.org 364 Subject: Registration of new Sieve extension 365 Capability name: extlists 366 Description: adds the ':list' match type to certain Sieve tests, and 367 the ':list' argument to the 'redirect' action. The ':list' match 368 type changes tests to match values against values stored in one or 369 more externally stored lists. The ':list' argument to the redirect 370 action changes the redirect action to forward the message to email 371 addresses stored in the externally stored list. 372 RFC number: this RFC 373 Contact address: 374 The Sieve discussion list 376 This information should be added to the list of sieve extensions 377 given on http://www.iana.org/assignments/sieve-extensions. 379 4.2. Registration of ManageSieve capability 381 The following requests IANA to register a new ManageSieve Capability 382 according to the IANA registration template specified in [RFC5804]: 384 To: iana@iana.org 385 Subject: ManageSieve Capability Registration 386 Capability name: extlists 387 Description: This capability is returned if the server supports the 388 "extlists" [RFCXXXX] Sieve extension. 389 Relevant publications: this RFC, Section 2.6 390 Person & email address to contact for further information: Alexey 391 Melnikov 392 Author/Change controller: IESG 394 5. Acknowledgements 396 Thanks to Alexandros Vellis, Nigel Swinson, Ned Freed, Kjetil Torgrim 397 Homme, Dave Cridland, Cyrus Daboo, Pete Resnick, and Robert Burrell 398 Donkin for ideas, comments and suggestions. Kristin Hubner also 399 helped greatly with the examples. 401 6. References 403 6.1. Normative References 405 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 406 Requirement Levels", BCP 14, RFC 2119, March 1997. 408 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 409 Resource Identifier (URI): Generic Syntax", STD 66, 410 RFC 3986, January 2005. 412 [RFC4151] Kindberg, T. and S. Hawke, "The 'tag' URI Scheme", 413 RFC 4151, October 2005. 415 [RFC5228] Guenther, P. and T. Showalter, "Sieve: An Email Filtering 416 Language", RFC 5228, January 2008. 418 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 419 Specifications: ABNF", STD 68, RFC 5234, January 2008. 421 [RFC5804] Melnikov, A. and T. Martin, "A Protocol for Remotely 422 Managing Sieve Scripts", RFC 5804, July 2010. 424 6.2. Informative References 426 [I-D.ietf-vcarddav-carddav] 427 Daboo, C., "vCard Extensions to WebDAV (CardDAV)", 428 draft-ietf-vcarddav-carddav-10 (work in progress), 429 November 2009. 431 [RFC2244] Newman, C. and J. Myers, "ACAP -- Application 432 Configuration Access Protocol", RFC 2244, November 1997. 434 [RFC4510] Zeilenga, K., "Lightweight Directory Access Protocol 435 (LDAP): Technical Specification Road Map", RFC 4510, 436 June 2006. 438 [RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension", 439 RFC 5229, January 2008. 441 [RFC5231] Segmuller, W. and B. Leiba, "Sieve Email Filtering: 442 Relational Extension", RFC 5231, January 2008. 444 [RFC5233] Murchison, K., "Sieve Email Filtering: Subaddress 445 Extension", RFC 5233, January 2008. 447 [RFC5235] Daboo, C., "Sieve Email Filtering: Spamtest and Virustest 448 Extensions", RFC 5235, January 2008. 450 [RFC5260] Freed, N., "Sieve Email Filtering: Date and Index 451 Extensions", RFC 5260, July 2008. 453 [RFC5435] Melnikov, A., Leiba, B., Segmuller, W., and T. Martin, 454 "Sieve Email Filtering: Extension for Notifications", 455 RFC 5435, January 2009. 457 [RFC5437] Saint-Andre, P. and A. Melnikov, "Sieve Notification 458 Mechanism: Extensible Messaging and Presence Protocol 459 (XMPP)", RFC 5437, January 2009. 461 [RFC5463] Freed, N., "Sieve Email Filtering: Ihave Extension", 462 RFC 5463, March 2009. 464 Authors' Addresses 466 Alexey Melnikov 467 Isode Limited 468 5 Castle Business Village 469 36 Station Road 470 Hampton, Middlesex TW12 2BX 471 UK 473 Email: Alexey.Melnikov@isode.com 474 Barry Leiba 475 Huawei Technologies 477 Phone: +1 646 827 0648 478 Email: barryleiba@computer.org 479 URI: http://internetmessagingtechnology.org/