idnits 2.17.1 draft-ietf-sieve-external-lists-05.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 (March 1, 2011) is 4803 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 414, but not defined ** Downref: Normative reference to an Informational RFC: RFC 4151 ** Obsolete normative reference: RFC 4395 (Obsoleted by RFC 7595) Summary: 2 errors (**), 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: September 2, 2011 Huawei Technologies 6 March 1, 2011 8 Sieve Extension: Externally Stored Lists 9 draft-ietf-sieve-external-lists-05 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 Should we add a mandatory-to-implement tag? Ned suggests (and I 28 agree) that it might be good to add a registry of well-defined 29 strings that can be used instead of URIs, and define the initial 30 string "ab" to represent the user's personal address book. 32 o Do we want to have the :list test set variables? See Ned's 33 comments in the text. 35 Status of this Memo 37 This Internet-Draft is submitted in full conformance with the 38 provisions of BCP 78 and BCP 79. 40 Internet-Drafts are working documents of the Internet Engineering 41 Task Force (IETF). Note that other groups may also distribute 42 working documents as Internet-Drafts. The list of current Internet- 43 Drafts is at http://datatracker.ietf.org/drafts/current/. 45 Internet-Drafts are draft documents valid for a maximum of six months 46 and may be updated, replaced, or obsoleted by other documents at any 47 time. It is inappropriate to use Internet-Drafts as reference 48 material or to cite them other than as "work in progress." 50 This Internet-Draft will expire on September 2, 2011. 52 Copyright Notice 54 Copyright (c) 2011 IETF Trust and the persons identified as the 55 document authors. All rights reserved. 57 This document is subject to BCP 78 and the IETF Trust's Legal 58 Provisions Relating to IETF Documents 59 (http://trustee.ietf.org/license-info) in effect on the date of 60 publication of this document. Please review these documents 61 carefully, as they describe your rights and restrictions with respect 62 to this document. Code Components extracted from this document must 63 include Simplified BSD License text as described in Section 4.e of 64 the Trust Legal Provisions and are provided without warranty as 65 described in the Simplified BSD License. 67 Table of Contents 69 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 4 70 1.1. Conventions used in this document . . . . . . . . . . . . 4 72 2. Extlists extension . . . . . . . . . . . . . . . . . . . . 4 73 2.1. Capability Identifier . . . . . . . . . . . . . . . . . . 4 74 2.2. :list match type for supported tests . . . . . . . . . . . 4 75 2.3. :list tagged argument to the "redirect" action . . . . . . 5 76 2.4. Other uses for external lists . . . . . . . . . . . . . . 6 77 2.5. Syntax of an externally stored list name . . . . . . . . . 6 78 2.6. Test valid_ext_list . . . . . . . . . . . . . . . . . . . 7 79 2.7. Interaction with ManageSieve . . . . . . . . . . . . . . . 7 80 2.8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 7 81 2.8.1. Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 7 82 2.8.2. Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 8 83 2.8.3. Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 8 85 3. Security Considerations . . . . . . . . . . . . . . . . . 8 87 4. IANA Considerations . . . . . . . . . . . . . . . . . . . 10 88 4.1. Registration of Sieve extension . . . . . . . . . . . . . 10 89 4.2. Registration of ManageSieve capability . . . . . . . . . . 10 90 4.3. Registration of a new URI scheme . . . . . . . . . . . . . 10 92 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 11 94 6. References . . . . . . . . . . . . . . . . . . . . . . . . 11 95 6.1. Normative References . . . . . . . . . . . . . . . . . . . 11 96 6.2. Informative References . . . . . . . . . . . . . . . . . . 12 98 Authors' Addresses . . . . . . . . . . . . . . . . . . . . 13 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 Comparators are not allowed together with the ":list" match type, so 143 if both are specified in a test, that MUST result in an error. 145 Implementations MUST support "address", "envelope" and "header" 146 tests. Implementations that include the Variables extension 148 [RFC5229] MUST also support "string" tests. 150 Implementations MAY support other tests but MUST raise an error 151 (which SHOULD be a compile-time error, but MAY be a runtime error) 152 when a script uses :list with a test for which it is not supported. 153 To maintain interoperability, other tests that can be used with :list 154 SHOULD be documented in a specification that defines a capability 155 string that can be tested (in a "require" statement, or using ihave 156 [RFC5463]). 158 For example, testing 'header ["to", "cc"]' against a list would cause 159 each "to" and "cc" value, ignoring leading and trailing whitespace, 160 to be queried. If any value is found to belong to the list, the test 161 returns "true". If no value belongs to the list, the test returns 162 "false". Once a value is found in the list, there is no need for the 163 query mechanism to look further. 165 For some lists, the Sieve engine might directly retrieve the list and 166 make its own comparison. Other lists might not work that way -- they 167 might provide a way to ask if a value is in the list, but not permit 168 retrieval of the list itself. It is up to the Sieve implementation 169 to understand how to interact with any supported list. If the Sieve 170 engine is permanently unable to query the list (perhaps because the 171 list doesn't support the required operation), the test MUST result in 172 a runtime error in the Sieve script. 174 See Section 2.5 for the detailed description of syntax used for 175 naming externally stored lists. 177 [[anchor4: Ned: There's one addition I'd like to make to the list. 178 I've proposed saying that if variables are enabled ${0} should return 179 the thing that matched in a :list match, just like it does for 180 :matches. ${1} and so on would return optional, list-specific 181 information. In the case of pab: URLs I'd suggest defining ${1} to 182 be a sort of status for the entry returned.]] 184 [[anchor5: Alexey: Can you elaborate on what you mean by "status" 185 here and how would this work for other types of URIs?]] 187 2.3. :list tagged argument to the "redirect" action 189 Usage: redirect :list 191 The "redirect" action with the ":list" argument is used to send the 192 message to one or more email addresses stored in the externally 193 stored list 'ext-list-name'. This variant of the redirect command 194 can be used to implement a personal distribution list. 196 For this feature to work, one of the following conditions has to be 197 true: 199 1. The list resolves to a list of email addresses, and the Sieve 200 engine is able to enumerate those addresses. 202 2. The list handler is able to take care of the redirection on 203 behalf of the Sieve engine. 205 In cases where, for example, a list contains hashed email address 206 values or an email address pattern ("sz*@example.com", 207 "*+ietf@example.net"), the Sieve engine will not be able to redirect 208 to that list, and responsibility must pass to the list handler. 210 If neither the Sieve engine nor the list handler can enumerate (or 211 iterate) the list, or the list does not resolve to email addresses, 212 the situation MUST result in a runtime error in the Sieve script. 214 See Section 2.5 for the detailed description of syntax used for 215 naming externally stored lists. 217 2.4. Other uses for external lists 219 The uses for external lists specified here represent the useful cases 220 and situations at the time of this writing. Other uses for external 221 lists, using other Sieve features, might be devised in the future, 222 and such uses can be described in extensions to this document. 224 2.5. Syntax of an externally stored list name 226 A name of an externally stored list is always an absolute URI 227 [RFC3986]. Implementations might find URIs such as LDAP [RFC4510], 228 CardDAV [I-D.ietf-vcarddav-carddav], or Tag [RFC4151] to be useful 229 for naming external lists. 231 [[anchor7: This might have to change with the introduction of "ab:" 232 URIs]] 233 The "tag" URI scheme [RFC4151] MUST be supported, and can be used to 234 represent opaque, but user friendlier identifiers. Resolution of 235 such identifiers is going to be implementation specific and it can 236 help in hiding the complexity of an implementation from end users. 237 For example, an implementation can provide a web interface for 238 managing lists of users stored in LDAP. Requiring users to know 239 generic LDAP URI syntax might not be very practical, due to its 240 complexity. An implementation can instead use a fixed tag URI prefix 241 such as "tag:example.com,:" (where can be, for example, 242 a date generated once on installation of the web interface and left 243 untouched upon upgrades) and the prefix doesn't even need to be shown 244 to end users. 246 2.6. Test valid_ext_list 248 Usage: valid_ext_list 250 The "valid_ext_list" test is true if all of the external list names 251 in the ext-list-names argument are supported, and they are valid both 252 syntactically (including URI parameters) and semantically (including 253 implementation-specific semantic restrictions). Otherwise the test 254 returns false. 256 This test MUST perform exactly the same validation of an external 257 list name as would be performed by the "header :list" test. 259 2.7. Interaction with ManageSieve 261 This extension defines the following new capability for ManageSieve 262 (see [RFC5804] section 1.7): 264 EXTLISTS - A space-separated list of URI schema parts [RFC3986] for 265 supported externally stored list types. This capability MUST be 266 returned if the corresponding Sieve implementation supports the 267 "extlists" extension defined in this document. 269 This also extends the ManageSieve ABNF as follows: 271 single-capability =/ DQUOTE "EXTLISTS" DQUOTE SP ext-list-types CRLF 272 ; single-capability is defined in [RFC5804] 274 ext-list-types = string 275 ; space separated list of URI schema parts 276 ; for supported externally stored list types. 277 ; MUST NOT be empty. 279 2.8. Examples 281 2.8.1. Example 1 283 This example uses the "envelope" option [RFC5228] and the 284 "subaddress" extension [RFC5233]: 286 require ["extlists", "envelope", "subaddress"]; 288 # Submission from list members is sent to all members 289 if allof (envelope :detail :list "to" 290 "tag:example.com,2009-05-28:mylist", 291 header :list "from" 292 "tag:example.com,2009-05-28:mylist") { 293 redirect :list "tag:example.com,2009-05-28:mylist"; 294 } 296 2.8.2. Example 2 298 This example uses the "currentdate" test [RFC5260] and a list 299 containing the dates of local holidays. If today is a holiday, the 300 script will notify [RFC5435] the user via XMPP [RFC5437] about the 301 message. 303 require ["extlists", "date", "enotify"]; 304 if currentdate :list "date" 305 "tag:example.com,2010-01-01:localHolidays" { 306 notify "xmpp:romeo@im.example.com"; 307 } 309 2.8.3. Example 3 311 This example uses a personal address book, along with spamtest 312 [RFC5235] and the relational extension [RFC5231] to give a different 313 level of spam tolerance to known senders. 315 require ["envelope", "extlists", "fileinto", "spamtest", 316 "relational", "comparator-i;ascii-numeric"]; 317 if allof ( 318 envelope :list "from" "tag:example.com,2010-04-10:pab", 319 spamtest :value "ge" :comparator "i;ascii-numeric" "8" 320 ) 321 { /* Known: allow high spam score */ 322 fileinto "spam"; 323 } 324 elsif spamtest :value "ge" :comparator "i;ascii-numeric" "3" 325 { /* Unknown: less tolerance in spam score */ 326 fileinto "spam"; 327 } 329 3. Security Considerations 331 Security considerations related to the "address"/"envelope"/"header" 332 tests and "redirect" action discussed in Sieve [RFC5228] also apply 333 to this document. 335 External list memberships ought to be treated as if they are an 336 integral part of the script, so a temporary failure to access an 337 external list SHOULD be handled in the same way as a temporary 338 failure to retrieve the Sieve script itself. 340 For example, if the Sieve script is stored in the Lightweight 341 Directory Access Protocol [RFC4510] and the script can't be retrieved 342 when a message is processed (perhaps the LDAP server is unavailable), 343 then the Sieve engine might delay message delivery until the script 344 can be retrieved successfully. Similarly, if an external list is 345 stored in LDAP and that LDAP server is unavailable, the Sieve engine 346 would take the same action -- delay message delivery and try again 347 later. 349 Protocols/APIs used to retrieve/verify external list membership MUST 350 provide an appropriate level of confidentiality and authentication. 351 Usually, that will be at least the same level of confidentiality as 352 protocols/APIs used to retrieve Sieve scripts, but only the 353 implementation (or deployment) will know what is appropriate. 354 There's a difference, for example, between making an LDAP request on 355 a closed LAN that's only used for trusted servers (it may be that 356 neither encryption nor authentication is needed), on a firewalled LAN 357 internal to a company (it might be OK to skip encryption, depending 358 upon policy), and on the open Internet (encryption and authentication 359 are probably both required). It also matters whether the list being 360 accessed is private or public (no encryption or authentication may be 361 needed for public data, even on the Internet). 363 Implementations of this extension should keep in mind that matching 364 values against an externally stored list can be IO and/or CPU 365 intensive. This can be used to deny service to the mailserver and/or 366 to servers providing access to externally stored mailing lists. A 367 naive implementation, such as the one that tries to retrieve content 368 of the whole list to perform matching can make this worse. 370 But note that many protocols that can be used for accessing 371 externally stored lists support flexible searching features that can 372 be used to minimize network traffic and load on the directory 373 service. For example, LDAP allows for search filters. 374 Implementations SHOULD use such features whenever they can. 376 Many organizations support external lists with thousands of 377 recipients. In order to avoid mailbombs when redirecting a message 378 to an externally stored list, implementations SHOULD enforce limits 379 on the number of recipients and/or on domains to which such 380 recipients belong. 382 4. IANA Considerations 384 4.1. Registration of Sieve extension 386 The following template specifies the IANA registration of the Sieve 387 extension specified in this document: 389 To: iana@iana.org 390 Subject: Registration of new Sieve extension 391 Capability name: extlists 392 Description: adds the ':list' match type to certain Sieve tests, and 393 the ':list' argument to the 'redirect' action. The ':list' match 394 type changes tests to match values against values stored in one or 395 more externally stored lists. The ':list' argument to the redirect 396 action changes the redirect action to forward the message to email 397 addresses stored in the externally stored list. 398 RFC number: this RFC 399 Contact address: 400 The Sieve discussion list 402 This information should be added to the list of sieve extensions 403 given on http://www.iana.org/assignments/sieve-extensions. 405 4.2. Registration of ManageSieve capability 407 The following requests IANA to register a new ManageSieve Capability 408 according to the IANA registration template specified in [RFC5804]: 410 To: iana@iana.org 411 Subject: ManageSieve Capability Registration 412 Capability name: extlists 413 Description: This capability is returned if the server supports the 414 "extlists" [RFCXXXX] Sieve extension. 415 Relevant publications: this RFC, Section 2.7 416 Person & email address to contact for further information: Alexey 417 Melnikov 418 Author/Change controller: IESG 420 4.3. Registration of a new URI scheme 422 The following requests IANA to register a new URI scheme according to 423 the IANA registration template specified in [RFC4395]: 425 URI scheme name: ab 426 Status: Permanent 427 URI scheme syntax: 428 paburi = "ab:" addrbook [ "?" extensions ] 429 addrbook = segment 430 ; defined in [RFC3986] 431 extensions = query 432 ; defined in [RFC3986] 433 URI scheme semantics: "ab" URIs are used for designating references 434 to personal address books. A personal address book is an internal 435 concept used by different applications (such as Sieve interpreters) 436 for describing a list of named entries, and maybe translated into 437 other types of address books, such as LDAP Groups. 438 Encoding considerations: Percent-encoding is allowed in "segment" and 439 "query" components. Internationalization is handled by IRI 440 processing. 441 Intended usage: An "ab" URI is designed to be used internally by 442 applications for referencing address books. 443 Applications and/or protocols that use this URI scheme name: 444 Currently only Sieve External List extension is using this URI 445 scheme. Email clients that use URIs internally might find this URI 446 scheme to be useful as well. 447 Interoperability considerations: Applications are only REQUIRED to 448 support "ab:default". 449 Security considerations: Applications SHOULD ensure appropriate 450 restrictions are in place to protect sensitive information that might 451 be revealed by "ab" URIs from access or modification by untrusted 452 sources. 453 Relevant publications: this RFC 454 Contact: Sieve IETF WG 455 Author/Change controller: IETF/IESG 457 5. Acknowledgements 459 Thanks to Alexandros Vellis, Nigel Swinson, Ned Freed, Kjetil Torgrim 460 Homme, Dave Cridland, Cyrus Daboo, Pete Resnick, and Robert Burrell 461 Donkin for ideas, comments and suggestions. Kristin Hubner also 462 helped greatly with the examples. 464 6. References 466 6.1. Normative References 468 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 469 Requirement Levels", BCP 14, RFC 2119, March 1997. 471 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 472 Resource Identifier (URI): Generic Syntax", STD 66, 473 RFC 3986, January 2005. 475 [RFC4151] Kindberg, T. and S. Hawke, "The 'tag' URI Scheme", 476 RFC 4151, October 2005. 478 [RFC4395] Hansen, T., Hardie, T., and L. Masinter, "Guidelines and 479 Registration Procedures for New URI Schemes", BCP 35, 480 RFC 4395, February 2006. 482 [RFC5228] Guenther, P. and T. Showalter, "Sieve: An Email Filtering 483 Language", RFC 5228, January 2008. 485 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 486 Specifications: ABNF", STD 68, RFC 5234, January 2008. 488 [RFC5804] Melnikov, A. and T. Martin, "A Protocol for Remotely 489 Managing Sieve Scripts", RFC 5804, July 2010. 491 6.2. Informative References 493 [I-D.ietf-vcarddav-carddav] 494 Daboo, C., "vCard Extensions to WebDAV (CardDAV)", 495 draft-ietf-vcarddav-carddav-10 (work in progress), 496 November 2009. 498 [RFC2244] Newman, C. and J. Myers, "ACAP -- Application 499 Configuration Access Protocol", RFC 2244, November 1997. 501 [RFC4510] Zeilenga, K., "Lightweight Directory Access Protocol 502 (LDAP): Technical Specification Road Map", RFC 4510, 503 June 2006. 505 [RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension", 506 RFC 5229, January 2008. 508 [RFC5231] Segmuller, W. and B. Leiba, "Sieve Email Filtering: 509 Relational Extension", RFC 5231, January 2008. 511 [RFC5233] Murchison, K., "Sieve Email Filtering: Subaddress 512 Extension", RFC 5233, January 2008. 514 [RFC5235] Daboo, C., "Sieve Email Filtering: Spamtest and Virustest 515 Extensions", RFC 5235, January 2008. 517 [RFC5260] Freed, N., "Sieve Email Filtering: Date and Index 518 Extensions", RFC 5260, July 2008. 520 [RFC5435] Melnikov, A., Leiba, B., Segmuller, W., and T. Martin, 521 "Sieve Email Filtering: Extension for Notifications", 522 RFC 5435, January 2009. 524 [RFC5437] Saint-Andre, P. and A. Melnikov, "Sieve Notification 525 Mechanism: Extensible Messaging and Presence Protocol 526 (XMPP)", RFC 5437, January 2009. 528 [RFC5463] Freed, N., "Sieve Email Filtering: Ihave Extension", 529 RFC 5463, March 2009. 531 Authors' Addresses 533 Alexey Melnikov 534 Isode Limited 535 5 Castle Business Village 536 36 Station Road 537 Hampton, Middlesex TW12 2BX 538 UK 540 Email: Alexey.Melnikov@isode.com 542 Barry Leiba 543 Huawei Technologies 545 Phone: +1 646 827 0648 546 Email: barryleiba@computer.org 547 URI: http://internetmessagingtechnology.org/