1
2
3
4
5
6
7Network Working Group T. Hansen
8Request for Comments: 5703 AT&T Laboratories
9Category: Standards Track C. Daboo
10 Apple Inc.
11 October 2009
12
13
14 Sieve Email Filtering: MIME Part Tests, Iteration, Extraction,
15 Replacement, and Enclosure
16
17Abstract
18
19 This document defines extensions to the Sieve email filtering
20 language to permit analysis and manipulation of the MIME body parts
21 of an email message.
22
23Status of This Memo
24
25 This document specifies an Internet standards track protocol for the
26 Internet community, and requests discussion and suggestions for
27 improvements. Please refer to the current edition of the "Internet
28 Official Protocol Standards" (STD 1) for the standardization state
29 and status of this protocol. Distribution of this memo is unlimited.
30
31Copyright Notice
32
33 Copyright (c) 2009 IETF Trust and the persons identified as the
34 document authors. All rights reserved.
35
36 This document is subject to BCP 78 and the IETF Trust's Legal
37 Provisions Relating to IETF Documents
38 (http://trustee.ietf.org/license-info) in effect on the date of
39 publication of this document. Please review these documents
40 carefully, as they describe your rights and restrictions with respect
41 to this document. Code Components extracted from this document must
42 include Simplified BSD License text as described in Section 4.e of
43 the Trust Legal Provisions and are provided without warranty as
44 described in the BSD License.
45
46 This document may contain material from IETF Documents or IETF
47 Contributions published or made publicly available before November
48 10, 2008. The person(s) controlling the copyright in some of this
49 material may not have granted the IETF Trust the right to allow
50 modifications of such material outside the IETF Standards Process.
51 Without obtaining an adequate license from the person(s) controlling
52 the copyright in such materials, this document may not be modified
53
54
55
56
57
58Hansen & Daboo Standards Track [Page 1]
59
60RFC 5703 Sieve MIME Operations October 2009
61
62
63 outside the IETF Standards Process, and derivative works of it may
64 not be created outside the IETF Standards Process, except to format
65 it for publication as an RFC or to translate it into languages other
66 than English.
67
68Table of Contents
69
70 1. Introduction ....................................................2
71 2. Conventions Used in This Document ...............................3
72 3. Sieve Loops: Actions "foreverypart" and "break" .................3
73 4. Changes to Sieve Tests ..........................................4
74 4.1. Test "header" ..............................................4
75 4.2. Test "address" .............................................7
76 4.3. Test "exists" ..............................................8
77 5. Action "replace" ................................................8
78 6. Action "enclose" ...............................................10
79 7. Action "extracttext" ...........................................11
80 8. Sieve Capability Strings .......................................11
81 9. Examples .......................................................12
82 9.1. Example 1 .................................................12
83 9.2. Example 2 .................................................12
84 9.3. Example 3 .................................................13
85 10. Acknowledgements ..............................................13
86 11. Security Considerations .......................................14
87 12. IANA Considerations ...........................................14
88 12.1. foreverypart capability ..................................15
89 12.2. mime capability ..........................................15
90 12.3. replace capability .......................................15
91 12.4. enclose capability .......................................16
92 12.5. extracttext capability ...................................16
93 13. References ....................................................16
94 13.1. Normative References .....................................16
95 13.2. Informative References ...................................17
96
971. Introduction
98
99 MIME messages ([RFC2045]) are often complex objects, consisting of
100 many parts and sub-parts. This Sieve ([RFC5228]) extension defines
101 mechanisms for performing tests on MIME body parts, looping through
102 the MIME body parts, extracting information from a MIME body part,
103 changing the contents of a MIME body part, and enclosing the entire
104 message within a wrapper.
105
106
107
108
109
110
111
112
113
114Hansen & Daboo Standards Track [Page 2]
115
116RFC 5703 Sieve MIME Operations October 2009
117
118
1192. Conventions Used in This Document
120
121 Conventions for notations are as in [RFC5228], Section 1.1.
122
123 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
124 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
125 document are to be interpreted as described in [RFC2119].
126
1273. Sieve Loops: Actions "foreverypart" and "break"
128
129 The base Sieve language has no looping mechanism. Given that
130 messages may contain multiple parts, in order to support filters that
131 apply to any and all parts, we introduce a new control command:
132 "foreverypart", which is an iterator that walks though every MIME
133 part of a message, including nested parts, depth first, and applies
134 the commands in the specified block to each of them. The iterator
135 will start with the first MIME part (as its current context) and will
136 execute a command block (Sieve commands enclosed by {...}). Upon
137 completion of this command block, the iterator advances to the next
138 MIME part (as its current context) and executes the same command
139 block again.
140
141 The iterator can be terminated prematurely by a new Sieve control
142 command, "break".
143
144 Usage: foreverypart [":name" string] block
145
146 Usage: break [":name" string];
147
148 "foreverypart" commands can be nested inside other "foreverypart"
149 commands. When this occurs, the nested "foreverypart" iterates over
150 the MIME parts contained within the MIME part currently being
151 targeted by the nearest enclosing "foreverypart" command. (That is,
152 the inner loop only operates on children of the bodypart currently
153 accessed by the outer loop.) If that MIME part is a terminal MIME
154 part (i.e., does not contain other MIME parts), then the nested
155 "foreverypart" loop is simply ignored.
156
157 Sieve implementations MAY limit the number of nested loops that occur
158 within one another; however, they MUST support at least one nested
159 loop inside another loop.
160
161 If a name is given to a "break" command, it terminates the closest
162 enclosing loop with the identical matching name. (If a nested
163 "foreverypart" name is the same as a "foreverypart" name in an outer
164 level, the outer level name is hidden.) It is an error if there is
165 no enclosing loop with that name.
166
167
168
169
170Hansen & Daboo Standards Track [Page 3]
171
172RFC 5703 Sieve MIME Operations October 2009
173
174
175 If no name is given in a "break" command (i.e., the ":name" parameter
176 is omitted), the break command terminates the closest enclosing loop.
177
1784. Changes to Sieve Tests
179
180 This specification extends the base Sieve "header", "address", and
181 "exists" tests to support targeting those tests at a specific MIME
182 part or at all MIME parts in the enclosing scope.
183
1844.1. Test "header"
185
186 The "header" test is extended with the addition of new ":mime" and
187 ":anychild" tagged arguments and their associated options.
188
189 Usage: header [":mime"] [":anychild"] [MIMEOPTS]
190 [COMPARATOR] [MATCH-TYPE]
191 <header-names: string-list> <key-list: string-list>
192
193 The definition of [MIMEOPTS] is:
194
195 Syntax: ":type" / ":subtype" / ":contenttype" /
196 ":param" <param-list: string-list>
197
198 When the ":mime" tagged argument is present in the "header" test, it
199 will parse the MIME header lines in the message so that tests can be
200 performed on specific elements. The ":anychild" tagged argument may
201 only appear when the ":mime" tagged argument is present, and only
202 modifies the semantics of the ":mime" tagged argument. That is,
203 presence of the ":anychild" in absence of ":mime" is an error.
204
205 When used outside the context of a "foreverypart" iterator, and
206 without an ":anychild" tagged argument, the "header" test will
207 examine only the outer top-level [RFC5322] headers of the message.
208
209 When used inside the context of a "foreverypart" iterator, and
210 without an ":anychild" tagged argument, the "header" test will
211 examine the headers associated with the current MIME part context
212 from the loop.
213
214 When used outside the context of a "foreverypart" iterator, and with
215 an ":anychild" tagged argument, the "header" test will examine all
216 MIME body parts and return true if any of them satisfies the test.
217
218 When used inside the context of a "foreverypart" iterator, and with
219 an ":anychild" tagged argument, the "header" test will examine the
220 current MIME part context and all its nested MIME body parts,
221 returning true if any of them satisfies the test.
222
223
224
225
226Hansen & Daboo Standards Track [Page 4]
227
228RFC 5703 Sieve MIME Operations October 2009
229
230
231 The "header" test with the ":mime" tagged argument can test various
232 aspects of certain structured MIME headers. Implementations SHOULD
233 support desegmentation, decoding, and charset translation of
234 parameter values encoded according to [RFC2231] as part of this test.
235 Additionally, [RFC2047] describes a process whereby [RFC5322] headers
236 can be encoded in various ways. That encoding is not strictly
237 allowed in MIME parameters; however, in practice, it has been used in
238 many email implementations. So, Sieve implementations MAY decode
239 [RFC2047]-encoded words in parameter values as part of this test.
240
241 These options are available:
242
243 :type for a "Content-Type" MIME header field, parses and
244 tests the value of the MIME type specified in the
245 header; for a "Content-Disposition" MIME header field,
246 parses and tests the value of the disposition
247 specified in the header; for other MIME headers, uses
248 a blank string for the test.
249
250 :subtype for a "Content-Type" MIME header field, parses and
251 tests the value of the MIME subtype specified in the
252 header; for a "Content-Disposition" MIME header field,
253 uses a blank string for the test; for other MIME
254 headers, uses a blank string for the test.
255
256 :contenttype for a "Content-Type" MIME header field, parses and
257 tests the combined value of the MIME type and subtype
258 specified in the header; for a "Content-Disposition"
259 MIME header field, behaves the same as the ":type"
260 option; for other MIME headers, uses a blank string
261 for the test.
262
263 :param parses the header looking for MIME parameters in the
264 header. The supplied string-list lists the names of
265 any parameters to be tested. If any one named
266 parameter value matches any of the test string values,
267 the test will return true.
268
269 When the ":count" option from [RFC5231] is used, the following
270 applies:
271
272 a. for ":type", ":subtype", or ":contenttype", return a count of the
273 number of headers that parsed successfully
274
275 b. for ":param", return a count of the number of parameters with the
276 given name that were found
277
278
279
280
281
282Hansen & Daboo Standards Track [Page 5]
283
284RFC 5703 Sieve MIME Operations October 2009
285
286
287 Example:
288
289 require ["mime", "fileinto"];
290
291 if header :mime :type "Content-Type" "image"
292 {
293 fileinto "INBOX.images";
294 }
295
296 In this example, any message that contains a MIME image type part at
297 the top-level is saved to the mailbox "INBOX.images".
298
299 Example:
300
301 require ["mime", "fileinto"];
302
303 if header :mime :anychild :contenttype
304 "Content-Type" "text/html"
305 {
306 fileinto "INBOX.html";
307 }
308
309 In this example, any message that contains any MIME part with a
310 content-type of "text/html" is saved to the mailbox "INBOX.html".
311
312 Example:
313
314 require ["mime", "foreverypart", "fileinto"];
315
316 foreverypart
317 {
318 if allof (
319 header :mime :param "filename" :contains
320 "Content-Disposition" "important",
321 header :mime :subtype "Content-Type" "pdf",
322 size :over "100K")
323 {
324 fileinto "INBOX.important";
325 break;
326 }
327 }
328
329 In this example, any message that contains a MIME part that has a
330 content-disposition with a filename parameter containing the text
331 "important", has a content-subtype of "pdf" and is bigger than 100 Kb
332 is saved to the mailbox "INBOX.important".
333
334
335
336
337
338Hansen & Daboo Standards Track [Page 6]
339
340RFC 5703 Sieve MIME Operations October 2009
341
342
3434.2. Test "address"
344
345 The "address" test is extended with the addition of new ":mime" and
346 ":anychild" tagged arguments and their associated options.
347
348 Usage: address [":mime"] [":anychild"] [COMPARATOR]
349 [ADDRESS-PART] [MATCH-TYPE]
350 <header-list: string-list> <key-list: string-list>
351
352 When the ":mime" tagged argument is present in the "address" test, it
353 will parse the MIME header lines as if they were standard address
354 header lines in a message so that tests can be performed on specific
355 elements.
356
357 The behavior of the ":anychild" tagged argument and the interaction
358 with the "foreverypart" iterator is the same as for the extended
359 "header" test in Section 4.1.
360
361 That is,
362
363 the use of "address" when both the ":mime" and ":anychild" tagged
364 arguments are omitted is the test defined in [RFC5228], i.e., it
365 will *only* operate on top-level header fields, whether or not it
366 is inside "foreverypart".
367
368 the use of "address" with ":mime" and no ":anychild" operates on
369 the current MIME part only (or on the top-level header fields, if
370 outside "foreverypart").
371
372 the use of "address" with ":mime" and ":anychild" operates on the
373 current MIME part and all of its descendants.
374
375 Example:
376
377 require ["mime", "fileinto"];
378
379 if address :mime :is :all "content-from" "tim@example.com"
380 {
381 fileinto "INBOX.part-from-tim";
382 }
383
384 In this example, any message that contains a MIME Content-From header
385 at the top-level matching the text "tim@example.com" is saved to the
386 mailbox "INBOX.part-from-tim".
387
388
389
390
391
392
393
394Hansen & Daboo Standards Track [Page 7]
395
396RFC 5703 Sieve MIME Operations October 2009
397
398
3994.3. Test "exists"
400
401 The "exists" test is extended with the addition of the new ":mime"
402 and ":anychild" tagged arguments and their associated options.
403
404 Usage: exists [":mime"] [":anychild"] <header-names: string-list>
405
406 When the ":mime" tagged argument is present in the "exists" test, the
407 test is extended to check for the existence of MIME headers in MIME
408 parts.
409
410 The behavior of the ":anychild" tagged argument and the interaction
411 with the "foreverypart" iterator is the same as for the extended
412 "header" test Section 4.1.
413
414 That is,
415
416 the use of "exists" when both the ":mime" and ":anychild" tagged
417 arguments are omitted is the test defined in [RFC5228], i.e., it
418 will *only* operate on top-level header fields, whether or not it
419 is inside "foreverypart".
420
421 the use of "exists" with ":mime" and no ":anychild" operates on
422 the current MIME part only (or on the top-level header fields, if
423 outside "foreverypart").
424
425 the use of "exists" with ":mime" and ":anychild" operates on the
426 current MIME part and all of its descendants.
427
428 Example:
429
430 require ["mime", "fileinto"];
431
432 if exists :mime :anychild "content-md5"
433 {
434 fileinto "INBOX.md5";
435 }
436
437 In this example, any message that contains a MIME Content-MD5 header
438 in any MIME part is saved to the mailbox "INBOX.md5".
439
4405. Action "replace"
441
442 Usage: replace [":mime"] [":subject" string] [":from" string]
443 <replacement: string>
444
445 The "replace" command is defined to allow a MIME part to be replaced
446 with the text supplied in the command.
447
448
449
450Hansen & Daboo Standards Track [Page 8]
451
452RFC 5703 Sieve MIME Operations October 2009
453
454
455 When used in the context of a "foreverypart" iterator, the MIME part
456 to be replaced is the "current" MIME part. If the current MIME
457 context is a multipart MIME part, the entire multipart MIME part is
458 replaced, which would alter the MIME structure of the message by
459 eliminating all of the children of the multipart part. (Replacing a
460 non-multipart MIME part within a "foreverypart" loop context does not
461 alter the overall message structure.) If the MIME structure is
462 altered, the change takes effect immediately: the "foreverypart"
463 iterator that is executing does not go into the no-longer existing
464 body parts, and subsequent "foreverypart" iterators would use the new
465 message structure.
466
467 When used outside the context of a "foreverypart" loop, the MIME part
468 to be replaced is the entire message.
469
470 If the ":mime" parameter is not specified, the replacement string is
471 a text/plain part in UTF-8 [RFC3629].
472
473 If the ":mime" parameter is specified, then the replacement string
474 is, in fact, a MIME entity as defined in [RFC2045], Section 2.4,
475 including both MIME headers and content.
476
477 If the entire message is being replaced, the optional ":subject"
478 parameter specifies a subject line to attach to the message that is
479 generated. UTF-8 characters can be used in the string argument;
480 implementations MUST convert the string to [RFC2047]-encoded words if
481 and only if non-ASCII characters are present. If the ":subject"
482 parameter is used, implementations MUST preserve any previous Subject
483 header as an Original-Subject header. Implementations MUST preserve
484 all other header fields from the original message with the exception
485 of those relating to the MIME structure that is being replaced.
486
487 If the entire message is being replaced, as an indication that the
488 message is no longer as created by the original author of the
489 message, the optional ":from" parameter may be used to specify an
490 alternate address to use in the From field of the message that is
491 generated. The string must specify a valid [RFC5322] mailbox-list.
492 Implementations SHOULD check the syntax and generate an error when a
493 syntactically invalid ":from" parameter is specified.
494 Implementations MAY also impose restrictions on what addresses can be
495 specified in a ":from" parameter; it is suggested that values that
496 fail such a validity check simply be ignored rather than causing the
497 "replace" action to fail. If the From header is changed,
498 implementations MUST preserve the previous From header as an
499 Original-From header.
500
501
502
503
504
505
506Hansen & Daboo Standards Track [Page 9]
507
508RFC 5703 Sieve MIME Operations October 2009
509
510
511 Implementations that support the "editheader" extension [RFC5293]
512 MUST ensure that any Original-Subject or Original-From headers added
513 by the system cannot be modified or removed. Implementations MAY
514 prevent the addition of Original-Subject and Orignal-From headers via
515 the "editheader" extension.
516
517 If ":mime" is specified and either ":subject" or ":from" is
518 specified, the ":subject:" or ":from" parameter MUST be ignored.
519 This SHOULD be flagged as a compilation error.
520
5216. Action "enclose"
522
523 Usage: enclose <:subject string> <:headers string-list> string
524
525 A new Sieve action command is defined to allow an entire message to
526 be enclosed as an attachment to a new message. After enclosure,
527 subsequent actions affecting the message header or content, as well
528 as tests operating on the MIME structure or accessing MIME header
529 fields, use the newly created message instead of the original
530 message; this means that any use of a "replace" action or other
531 similar actions should be executed before the "enclose" action.
532
533 If multiple "enclose" actions are executed by a script, the message
534 is enclosed multiple times. (If a Sieve script desires to choose
535 between different enclosures, or wants to delay the enclosure to the
536 end of the script, it can use variables with appropriate tests
537 [RFC5229].)
538
539 This action does not affect messages that are forwarded via a
540 "redirect" action.
541
542 Specifically, the original message becomes a multipart/mixed message
543 with two parts: a text/plain portion with the string argument as its
544 body, and a message/rfc822 portion with the original message
545 enclosed. The Content-Type: header field becomes multipart/mixed.
546 The optional Subject: header is specified by the ":subject" argument;
547 if not present, the subject will be taken from the enclosed message.
548 Any headers specified by ":headers" are copied from the old message
549 into the new message. If not specified by ":headers", Date: and
550 From: headers should be synthesized to reflect the current date and
551 the user running the Sieve action.
552
553
554
555
556
557
558
559
560
561
562Hansen & Daboo Standards Track [Page 10]
563
564RFC 5703 Sieve MIME Operations October 2009
565
566
5677. Action "extracttext"
568
569 Usage: extracttext [MODIFIER] [":first" number] <varname: string>
570
571 The "extracttext" action may be used within the context of a
572 "foreverypart" loop and is used to store text into a variable as
573 defined by [RFC5229]. Servers MUST support transcoding of any
574 textual body part into UTF-8 for use with this action. This requires
575 decoding any transfer encoding as well as transcoding from the
576 indicated character set into UTF-8. It stores at most ":first"
577 characters of the transcoded content of the current MIME body part in
578 the variable identified by varname. If the ":first" parameter is not
579 present, the whole content of the current MIME body part is stored.
580 In either case, the actually stored data MAY be truncated to conform
581 to implementation specific limit on variable length and/or on MIME
582 body part length. If the transfer encoding or character set is
583 unrecognized by the implementation or recognized but invalid, an
584 empty string will result.
585
586 If "extracttext" is used outside the context of a "foreverypart"
587 loop, the action will set the variable identified by varname to the
588 empty string. This SHOULD be flagged as a compilation error.
589
590 Modifiers are applied on the extracted text before it is stored in
591 the variable.
592
5938. Sieve Capability Strings
594
595 A Sieve implementation that defines the "foreverypart" and "break"
596 actions will advertise the capability string "foreverypart".
597
598 A Sieve implementation that defines the ":mime" and ":anychild"
599 tagged arguments to the "header", "address", and "exists" commands
600 will advertise the capability string "mime".
601
602 A Sieve implementation that defines the "replace" action will
603 advertise the capability string "replace".
604
605 A Sieve implementation that defines the "enclose" action will
606 advertise the capability string "enclose".
607
608 A Sieve implementation that defines the "extracttext" action will
609 advertise the capability string "extracttext". Note that to be
610 useful, the "extracttext" action also requires the "variables"
611 [RFC5229] and "foreverypart" capabilities.
612
613
614
615
616
617
618Hansen & Daboo Standards Track [Page 11]
619
620RFC 5703 Sieve MIME Operations October 2009
621
622
6239. Examples
624
6259.1. Example 1
626
627 Consider a Sieve script to replace some of the Windows executable
628 attachments in a message. (The actual list of executable types and
629 extensions is considerably longer and constantly changing. The tests
630 shown here are an example only.) Such a script might look like this:
631
632 require [ "foreverypart", "mime", "replace" ];
633 foreverypart
634 {
635 if anyof (
636 header :mime :contenttype :is
637 "Content-Type" "application/exe",
638 header :mime :param "filename"
639 :matches ["Content-Type", "Content-Disposition"] "*.com" )
640 {
641 replace "Executable attachment removed by user filter";
642 }
643 }
644
6459.2. Example 2
646
647 Consider a Sieve script to warn the user about some of the executable
648 attachment types. (The actual list of executable types and
649 extensions is considerably longer and constantly changing. The tests
650 shown here are an example only.) Such a script might look like this:
651
652 require [ "foreverypart", "mime", "enclose" ];
653
654 foreverypart
655 {
656 if header :mime :param "filename"
657 :matches ["Content-Type", "Content-Disposition"]
658 ["*.com", "*.exe", "*.vbs", "*.scr",
659 "*.pif", "*.hta", "*.bat", "*.zip" ]
660 {
661 # these attachment types are executable
662 enclose :subject "Warning" :text
663 WARNING! The enclosed message contains executable attachments.
664 These attachment types may contain a computer virus program
665 that can infect your computer and potentially damage your data.
666
667 Before clicking on these message attachments, you should verify
668 with the sender that this message was sent by them and not a
669 computer virus.
670
671
672
673
674Hansen & Daboo Standards Track [Page 12]
675
676RFC 5703 Sieve MIME Operations October 2009
677
678
679 .
680 ;
681 break;
682 }
683 }
684
6859.3. Example 3
686
687 A Sieve script to extract subject and text out of messages from the
688 boss might look like this:
689
690 require ["mime", "variables", "extracttext"];
691
692 if header :contains "from" "boss@example.org"
693 {
694 # :matches is used to get the value of the Subject header
695 if header :matches "Subject" "*"
696 {
697 set "subject" "${1}";
698 }
699
700 # extract the first 100 characters of the first text/* part
701 foreverypart
702 {
703 if header :mime :type :is "Content-Type" "text"
704 {
705 extracttext :first 100 "msgcontent";
706 break;
707 }
708 }
709
710 # if it's not a 'for your information' message
711 if not header :contains "subject" "FYI:"
712 {
713 # do something using ${subject} and ${msgcontent}
714 # such as sending a notification using a
715 # notification extension
716 }
717 }
718
71910. Acknowledgements
720
721 Comments from members of the MTA Filters Working Group, in particular
722 Ned Freed, Kjetil Torgrim Homme, Mark Mallett, Alexey Melnikov, Aaron
723 Stone, and Nigel Swinson are gratefully acknowledged.
724
725
726
727
728
729
730Hansen & Daboo Standards Track [Page 13]
731
732RFC 5703 Sieve MIME Operations October 2009
733
734
73511. Security Considerations
736
737 The "enclose" action creates an entirely new message, as compared to
738 just redirecting or forwarding the existing message. Therefore, any
739 site policies applicable to message submission should be enforced.
740
741 The looping specification specified here provides easier access to
742 information about the message contents, which may also be achieved
743 through other sieve tests. This is not believed to raise any
744 additional security issues beyond those for the Sieve "envelope" and
745 "body" [RFC5173] tests.
746
747 Any change in message content may interfere with digital signature
748 mechanisms that include that content in the signed material. In
749 particular, using "replace" makes direct changes to the body content
750 and will affect the body hash included in Domain Keys Identified Mail
751 (DKIM) signatures [RFC4871], or the message signature used for Secure
752 MIME (S/MIME) [RFC3851], Pretty Good Privacy (PGP) [RFC1991] or
753 OpenPGP [RFC4880].
754
755 It is not possible to examine the MIME structure of decrypted content
756 in a multipart/encrypted MIME part.
757
758 When "enclose" is used on a message containing a multipart/signed
759 MIME part, the Sieve implementation MUST ensure that the original
760 message is copied octet-for-octet to maintain the validity of the
761 digital signature.
762
763 The system MUST be sized and restricted in such a manner that even
764 malicious use of MIME part matching does not deny service to other
765 users of the host system.
766
767 All of the security considerations given in the base Sieve
768 specification also apply to these extensions.
769
77012. IANA Considerations
771
772 The Original-Subject and Original-From headers have been registered
773 in the Permanent Message Header Fields registry.
774
775 The following templates specify the IANA registrations of the Sieve
776 extensions specified in this document. This information has been
777 added to the IANA registry of Sieve Extensions (currently found at
778 http://www.iana.org).
779
780
781
782
783
784
785
786Hansen & Daboo Standards Track [Page 14]
787
788RFC 5703 Sieve MIME Operations October 2009
789
790
79112.1. foreverypart capability
792
793 To: iana@iana.org
794 Subject: Registration of new Sieve extension
795
796 Capability name: foreverypart
797 Description: adds the "foreverypart" and "break" actions for
798 iterating through MIME parts of a message.
799
800 RFC number: RFC 5703
801 Contact address: The Sieve discussion list
802 <ietf-mta-filters@imc.org>.
803
80412.2. mime capability
805
806 To: iana@iana.org
807 Subject: Registration of new Sieve extension
808
809 Capability name: mime
810 Description: adds the ":mime" and ":anychild" tagged arguments to the
811 "header", "address", and "exists" tests. Adds the ":type",
812 ":subtype", ":contenttype", and ":param" options when ":mime" is used
813 with the "header" test.
814
815 RFC number: RFC 5703
816 Contact address: The Sieve discussion list
817 <ietf-mta-filters@imc.org>.
818
81912.3. replace capability
820
821 To: iana@iana.org
822 Subject: Registration of new Sieve extension
823
824 Capability name: replace
825 Description: adds the "replace" action for replacing a MIME body part
826 of a message.
827
828 RFC number: RFC 5703
829 Contact address: The Sieve discussion list
830 <ietf-mta-filters@imc.org>.
831
832
833
834
835
836
837
838
839
840
841
842Hansen & Daboo Standards Track [Page 15]
843
844RFC 5703 Sieve MIME Operations October 2009
845
846
84712.4. enclose capability
848
849 To: iana@iana.org
850 Subject: Registration of new Sieve extension
851
852 Capability name: enclose
853 Description: adds the "enclose" action for enclosing a message with a
854 wrapper.
855
856 RFC number: RFC 5703
857 Contact address: The Sieve discussion list
858 <ietf-mta-filters@imc.org>.
859
86012.5. extracttext capability
861
862 To: iana@iana.org
863 Subject: Registration of new Sieve extension
864
865 Capability name: extracttext
866 Description: adds the "extracttext" action for extracting text from a
867
868 MIME body part.
869
870 RFC number: RFC 5703
871 Contact address: The Sieve discussion list
872 <ietf-mta-filters@imc.org>.
873
87413. References
875
87613.1. Normative References
877
878 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
879 Extensions (MIME) Part One: Format of Internet Message
880 Bodies", RFC 2045, November 1996.
881
882 [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions)
883 Part Three: Message Header Extensions for Non-ASCII Text",
884 RFC 2047, November 1996.
885
886 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
887 Requirement Levels", BCP 14, RFC 2119, March 1997.
888
889 [RFC2231] Freed, N. and K. Moore, "MIME Parameter Value and Encoded
890 Word Extensions:
891 Character Sets, Languages, and Continuations", RFC 2231,
892 November 1997.
893
894
895
896
897
898Hansen & Daboo Standards Track [Page 16]
899
900RFC 5703 Sieve MIME Operations October 2009
901
902
903 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
904 10646", STD 63, RFC 3629, November 2003.
905
906 [RFC5173] Degener, J. and P. Guenther, "Sieve Email Filtering: Body
907 Extension", RFC 5173, April 2008.
908
909 [RFC5228] Guenther, P. and T. Showalter, "Sieve: An Email Filtering
910 Language", RFC 5228, January 2008.
911
912 [RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension",
913 RFC 5229, January 2008.
914
915 [RFC5231] Segmuller, W. and B. Leiba, "Sieve Email Filtering:
916 Relational Extension", RFC 5231, January 2008.
917
918 [RFC5293] Degener, J. and P. Guenther, "Sieve Email Filtering:
919 Editheader Extension", RFC 5293, August 2008.
920
921 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322,
922 October 2008.
923
92413.2. Informative References
925
926 [RFC1991] Atkins, D., Stallings, W., and P. Zimmermann, "PGP Message
927 Exchange Formats", RFC 1991, August 1996.
928
929 [RFC3851] Ramsdell, B., "Secure/Multipurpose Internet Mail
930 Extensions (S/MIME) Version 3.1 Message Specification",
931 RFC 3851, July 2004.
932
933 [RFC4871] Allman, E., Callas, J., Delany, M., Libbey, M., Fenton,
934 J., and M. Thomas, "DomainKeys Identified Mail (DKIM)
935 Signatures", RFC 4871, May 2007.
936
937 [RFC4880] Callas, J., Donnerhacke, L., Finney, H., Shaw, D., and R.
938 Thayer, "OpenPGP Message Format", RFC 4880, November 2007.
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954Hansen & Daboo Standards Track [Page 17]
955
956RFC 5703 Sieve MIME Operations October 2009
957
958
959Authors' Addresses
960
961 Tony Hansen
962 AT&T Laboratories
963 200 Laurel Ave.
964 Middletown, NJ 07748
965 USA
966
967 EMail: tony+sieveloop@maillennium.att.com
968
969
970 Cyrus Daboo
971 Apple Inc.
972 1 Infinite Loop
973 Cupertino, CA 95014
974 USA
975
976 EMail: cyrus@daboo.name
977 URI: http://www.apple.com/
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010Hansen & Daboo Standards Track [Page 18]
1011
1012