draft-ietf-sieve-mime-loop-06.txt | draft-ietf-sieve-mime-loop-07.txt | |||
---|---|---|---|---|
Internet Engineering Task Force T. Hansen | Internet Engineering Task Force T. Hansen | |||
Internet-Draft AT&T Laboratories | Internet-Draft AT&T Laboratories | |||
Intended status: Standards Track C. Daboo | Intended status: Standards Track C. Daboo | |||
Expires: March 16, 2009 Apple Inc. | Expires: May 7, 2009 Apple Inc. | |||
September 12, 2008 | November 3, 2008 | |||
Sieve Email Filtering: MIME part Tests, Iteration, Extraction, | Sieve Email Filtering: MIME part Tests, Iteration, Extraction, | |||
Replacement and Enclosure | Replacement and Enclosure | |||
draft-ietf-sieve-mime-loop-06 | draft-ietf-sieve-mime-loop-07 | |||
Status of this Memo | Status of this Memo | |||
By submitting this Internet-Draft, each author represents that any | By submitting this Internet-Draft, each author represents that any | |||
applicable patent or other IPR claims of which he or she is aware | applicable patent or other IPR claims of which he or she is aware | |||
have been or will be disclosed, and any of which he or she becomes | have been or will be disclosed, and any of which he or she becomes | |||
aware will be disclosed, in accordance with Section 6 of BCP 79. | aware will be disclosed, in accordance with Section 6 of BCP 79. | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF), its areas, and its working groups. Note that | Task Force (IETF), its areas, and its working groups. Note that | |||
skipping to change at page 1, line 36 | skipping to change at page 1, line 36 | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
The list of current Internet-Drafts can be accessed at | The list of current Internet-Drafts can be accessed at | |||
http://www.ietf.org/ietf/1id-abstracts.txt. | http://www.ietf.org/ietf/1id-abstracts.txt. | |||
The list of Internet-Draft Shadow Directories can be accessed at | The list of Internet-Draft Shadow Directories can be accessed at | |||
http://www.ietf.org/shadow.html. | http://www.ietf.org/shadow.html. | |||
This Internet-Draft will expire on March 16, 2009. | This Internet-Draft will expire on May 7, 2009. | |||
Abstract | Abstract | |||
This document defines extensions to the Sieve email filtering | This document defines extensions to the Sieve email filtering | |||
language to permit analysis and manipulation of the MIME body parts | language to permit analysis and manipulation of the MIME body parts | |||
of an email message. | of an email message. | |||
Note | Note | |||
This document is being discussed on the MTA-FILTERS mailing list, | This document is being discussed on the MTA-FILTERS mailing list, | |||
skipping to change at page 2, line 14 | skipping to change at page 2, line 14 | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
2. Conventions Used in This Document . . . . . . . . . . . . . . 3 | 2. Conventions Used in This Document . . . . . . . . . . . . . . 3 | |||
3. Sieve Loops: Actions "foreverypart" and "break" . . . . . . . 3 | 3. Sieve Loops: Actions "foreverypart" and "break" . . . . . . . 3 | |||
4. Changes to Sieve Tests . . . . . . . . . . . . . . . . . . . . 4 | 4. Changes to Sieve Tests . . . . . . . . . . . . . . . . . . . . 4 | |||
4.1. Test "header" . . . . . . . . . . . . . . . . . . . . . . 4 | 4.1. Test "header" . . . . . . . . . . . . . . . . . . . . . . 4 | |||
4.2. Test "address" . . . . . . . . . . . . . . . . . . . . . 6 | 4.2. Test "address" . . . . . . . . . . . . . . . . . . . . . 6 | |||
4.3. Test "exists" . . . . . . . . . . . . . . . . . . . . . . 7 | 4.3. Test "exists" . . . . . . . . . . . . . . . . . . . . . . 7 | |||
5. Action "replace" . . . . . . . . . . . . . . . . . . . . . . . 7 | 5. Action "replace" . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
6. Action "enclose" . . . . . . . . . . . . . . . . . . . . . . . 8 | 6. Action "enclose" . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
7. Action "extracttext" . . . . . . . . . . . . . . . . . . . . . 9 | 7. Action "extracttext" . . . . . . . . . . . . . . . . . . . . . 10 | |||
8. Sieve Capability Strings . . . . . . . . . . . . . . . . . . . 9 | 8. Sieve Capability Strings . . . . . . . . . . . . . . . . . . . 10 | |||
9. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 9. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
9.1. Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 10 | 9.1. Example 1 . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
9.2. Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 10 | 9.2. Example 2 . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
9.3. Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 11 | 9.3. Example 3 . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12 | 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
11. Security Considerations . . . . . . . . . . . . . . . . . . . 12 | 11. Security Considerations . . . . . . . . . . . . . . . . . . . 13 | |||
12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 | 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 | |||
12.1. foreverypart capability . . . . . . . . . . . . . . . . . 13 | 12.1. foreverypart capability . . . . . . . . . . . . . . . . . 14 | |||
12.2. mime capability . . . . . . . . . . . . . . . . . . . . . 14 | 12.2. mime capability . . . . . . . . . . . . . . . . . . . . . 15 | |||
12.3. replace capability . . . . . . . . . . . . . . . . . . . 14 | 12.3. replace capability . . . . . . . . . . . . . . . . . . . 15 | |||
12.4. enclose capability . . . . . . . . . . . . . . . . . . . 14 | 12.4. enclose capability . . . . . . . . . . . . . . . . . . . 15 | |||
12.5. extracttext capability . . . . . . . . . . . . . . . . . 14 | 12.5. extracttext capability . . . . . . . . . . . . . . . . . 15 | |||
13. Change History . . . . . . . . . . . . . . . . . . . . . . . . 15 | 13. Change History . . . . . . . . . . . . . . . . . . . . . . . . 16 | |||
13.1. draft-ietf-sieve-mime-06 . . . . . . . . . . . . . . . . 15 | 13.1. draft-ietf-sieve-mime-07 . . . . . . . . . . . . . . . . 16 | |||
13.2. draft-ietf-sieve-mime-05 . . . . . . . . . . . . . . . . 15 | 13.2. draft-ietf-sieve-mime-06 . . . . . . . . . . . . . . . . 16 | |||
13.3. draft-ietf-sieve-mime-04 . . . . . . . . . . . . . . . . 15 | 13.3. draft-ietf-sieve-mime-05 . . . . . . . . . . . . . . . . 16 | |||
13.4. draft-ietf-sieve-mime-03 . . . . . . . . . . . . . . . . 15 | 13.4. draft-ietf-sieve-mime-04 . . . . . . . . . . . . . . . . 16 | |||
13.5. draft-ietf-sieve-mime-02 . . . . . . . . . . . . . . . . 16 | 13.5. draft-ietf-sieve-mime-03 . . . . . . . . . . . . . . . . 17 | |||
13.6. draft-ietf-sieve-mime-01 . . . . . . . . . . . . . . . . 16 | 13.6. draft-ietf-sieve-mime-02 . . . . . . . . . . . . . . . . 17 | |||
13.7. draft-ietf-sieve-mime-00 . . . . . . . . . . . . . . . . 16 | 13.7. draft-ietf-sieve-mime-01 . . . . . . . . . . . . . . . . 17 | |||
13.8. draft-sieve-mime-loop-04 . . . . . . . . . . . . . . . . 16 | 13.8. draft-ietf-sieve-mime-00 . . . . . . . . . . . . . . . . 17 | |||
13.9. draft-hansen-sieve-loop-03 . . . . . . . . . . . . . . . 17 | 13.9. draft-sieve-mime-loop-04 . . . . . . . . . . . . . . . . 18 | |||
13.10. draft-hansen-sieve-loop-02 . . . . . . . . . . . . . . . 17 | 13.10. draft-hansen-sieve-loop-03 . . . . . . . . . . . . . . . 18 | |||
13.11. draft-hansen-sieve-loop-01 . . . . . . . . . . . . . . . 17 | 13.11. draft-hansen-sieve-loop-02 . . . . . . . . . . . . . . . 18 | |||
14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 17 | 13.12. draft-hansen-sieve-loop-01 . . . . . . . . . . . . . . . 19 | |||
14.1. Normative References . . . . . . . . . . . . . . . . . . 17 | 14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19 | |||
14.2. Informative References . . . . . . . . . . . . . . . . . 18 | 14.1. Normative References . . . . . . . . . . . . . . . . . . 19 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 18 | 14.2. Informative References . . . . . . . . . . . . . . . . . 19 | |||
Intellectual Property and Copyright Statements . . . . . . . . . . 19 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 19 | |||
Intellectual Property and Copyright Statements . . . . . . . . . . 21 | ||||
1. Introduction | 1. Introduction | |||
MIME messages ([RFC2045]) are often complex objects, consisting of | MIME messages ([RFC2045]) are often complex objects, consisting of | |||
many parts and sub-parts. This extension defines mechanisms for | many parts and sub-parts. This extension defines mechanisms for | |||
performing tests on MIME body parts, looping through the MIME body | performing tests on MIME body parts, looping through the MIME body | |||
parts, extracting information from a MIME body part, changing the | parts, extracting information from a MIME body part, changing the | |||
contents of a MIME body part, and enclosing the entire message within | contents of a MIME body part, and enclosing the entire message within | |||
a wrapper. | a wrapper. | |||
skipping to change at page 4, line 23 | skipping to change at page 4, line 23 | |||
no enclosing loop with that name. | no enclosing loop with that name. | |||
4. Changes to Sieve Tests | 4. Changes to Sieve Tests | |||
This specification extends the base Sieve "header", "address" and | This specification extends the base Sieve "header", "address" and | |||
"exists" tests to support targeting those tests at a specific MIME | "exists" tests to support targeting those tests at a specific MIME | |||
part or at all MIME parts in the enclosing scope. | part or at all MIME parts in the enclosing scope. | |||
4.1. Test "header" | 4.1. Test "header" | |||
The "header" test is extended with the addition of a new ":mime" | The "header" test is extended with the addition of new ":mime" and | |||
tagged argument and its associated options. | ":anychild" tagged arguments and its associated options. | |||
Usage: header [":mime"] [":anychild"] [MIMEOPTS] | Usage: header [":mime"] [":anychild"] [MIMEOPTS] | |||
[COMPARATOR] [MATCH-TYPE] | [COMPARATOR] [MATCH-TYPE] | |||
<header-names: string-list> <key-list: string-list> | <header-names: string-list> <key-list: string-list> | |||
Usage: The definition of [MIMEOPTS] is: | Usage: The definition of [MIMEOPTS] is: | |||
Syntax: ":type" / ":subtype" / ":contenttype" / | Syntax: ":type" / ":subtype" / ":contenttype" / | |||
":param" <param-list: string-list> | ":param" <param-list: string-list> | |||
skipping to change at page 5, line 7 | skipping to change at page 5, line 7 | |||
without an ":anychild" tagged argument, the "header" test will | without an ":anychild" tagged argument, the "header" test will | |||
examine the headers associated with the current MIME part context | examine the headers associated with the current MIME part context | |||
from the loop. | from the loop. | |||
When used outside the context of a "foreverypart" iterator, and with | When used outside the context of a "foreverypart" iterator, and with | |||
an ":anychild" tagged argument, the "header" test will examine all | an ":anychild" tagged argument, the "header" test will examine all | |||
MIME body parts and return true if any of them satisfies the test. | MIME body parts and return true if any of them satisfies the test. | |||
When used inside the context of a "foreverypart" iterator, and with | When used inside the context of a "foreverypart" iterator, and with | |||
an ":anychild" tagged argument, the "header" test will examine the | an ":anychild" tagged argument, the "header" test will examine the | |||
current MIME part context and all it's nested MIME body parts, | current MIME part context and all its nested MIME body parts, | |||
returning true if any of them satisfies the test. | returning true if any of them satisfies the test. | |||
The "header" test with the ":mime" tagged argument can test various | The "header" test with the ":mime" tagged argument can test various | |||
aspects of certain structured MIME headers. These options are | aspects of certain structured MIME headers. These options are | |||
available: | available: | |||
:type parses the header assuming it has the format of a "Content- | :type parses the header assuming it has the format of a "Content- | |||
Type:" MIME header field, and tests the value of the MIME type | Type:" MIME header field, and tests the value of the MIME type | |||
specified in the header. | specified in the header. | |||
:subtype parses the header assuming it has the format of a "Content- | :subtype parses the header assuming it has the format of a "Content- | |||
Type:" MIME header field, and tests the value of the MIME subtype | Type:" MIME header field, and tests the value of the MIME subtype | |||
specified in the header. | specified in the header. | |||
:contenttype parses the header assuming it has the format of a | :contenttype parses the header assuming it has the format of a | |||
"Content-Type:" MIME header field, and tests the combined value of | "Content-Type:" MIME header field, and tests the combined value of | |||
the MIME type and subtype specified in the header. | the MIME type and subtype specified in the header. | |||
:param parses the header looking for MIME parameters in the header. | :param parses the header looking for MIME parameters in the header. | |||
The supplied string-list lists the names of any parameters to be | The supplied string-list lists the names of any parameters to be | |||
tested. If any one named parameter value matches the test string | tested. If any one named parameter value matches any of the test | |||
value, the test will return true. | string values, the test will return true. | |||
Example: | Example: | |||
require ["mime", "fileinto"]; | require ["mime", "fileinto"]; | |||
if header :mime :type "Content-Type" "image" | if header :mime :type "Content-Type" "image" | |||
{ | { | |||
fileinto "INBOX.images"; | fileinto "INBOX.images"; | |||
} | } | |||
skipping to change at page 6, line 31 | skipping to change at page 6, line 31 | |||
} | } | |||
} | } | |||
In this example, any message that contains a MIME part that has a | In this example, any message that contains a MIME part that has a | |||
content-disposition with a filename parameter containing the text | content-disposition with a filename parameter containing the text | |||
"important", has a content-subtype of "pdf" and is bigger than 100 Kb | "important", has a content-subtype of "pdf" and is bigger than 100 Kb | |||
is saved to the mailbox "INBOX.important". | is saved to the mailbox "INBOX.important". | |||
4.2. Test "address" | 4.2. Test "address" | |||
The "address" test is extended with the addition of a new ":mime" | The "address" test is extended with the addition of new ":mime" and | |||
tagged argument, which takes a number of other arguments. | ":anychild" tagged arguments and their associated options. | |||
Usage: address [":mime"] [":anychild"] [COMPARATOR] | Usage: address [":mime"] [":anychild"] [COMPARATOR] | |||
[ADDRESS-PART] [MATCH-TYPE] | [ADDRESS-PART] [MATCH-TYPE] | |||
<header-list: string-list> <key-list: string-list> | <header-list: string-list> <key-list: string-list> | |||
When the ":mime" tagged argument is present in the "address" test, it | When the ":mime" tagged argument is present in the "address" test, it | |||
will parse the MIME header lines as if they were standard address | will parse the MIME header lines as if they were standard address | |||
header lines in a message so that tests can be performed on specific | header lines in a message so that tests can be performed on specific | |||
elements. | elements. | |||
The behavior of the ":anychild" tagged argument and the interaction | The behavior of the ":anychild" tagged argument and the interaction | |||
with the "foreverypart" iterator is the same as for the extended | with the "foreverypart" iterator is the same as for the extended | |||
"header" test Section 4.1. | "header" test Section 4.1. | |||
That is, | ||||
the use of "address" with no ":mime" and ":anychild" tagged | ||||
argument is the test defined in [RFC5228], i.e. it will *only* | ||||
operate on top level header fields, whether it is inside | ||||
"foreverypart" or not. | ||||
the use of "address" with ":mime" and no ":anychild" operates on | ||||
the current MIME part only (or on the top level header fields, if | ||||
outside "foreverypart") | ||||
the use of "address" with ":mime" and ":anychild" operates on the | ||||
current MIME part and all of its descendants | ||||
Example: | Example: | |||
require ["mime", "fileinto"]; | require ["mime", "fileinto"]; | |||
if address :mime :is :all "content-from" "tim@example.com" | if address :mime :is :all "content-from" "tim@example.com" | |||
{ | { | |||
fileinto "INBOX.part-from-tim"; | fileinto "INBOX.part-from-tim"; | |||
} | } | |||
In this example, any message that contains a MIME Content-From header | In this example, any message that contains a MIME Content-From header | |||
at the top-level matching the text "tim@example.com" is saved to the | at the top-level matching the text "tim@example.com" is saved to the | |||
mailbox "INBOX.part-from-time". | mailbox "INBOX.part-from-time". | |||
4.3. Test "exists" | 4.3. Test "exists" | |||
The "exists" test is extended with the addition of a new ":mime" | The "exists" test is extended with the addition of the new ":mime" | |||
tagged argument, which takes one other argument. | and ":anychild" tagged arguments, which takes one other argument. | |||
Usage: exists [":mime"] [":anychild"] <header-names: string-list> | Usage: exists [":mime"] [":anychild"] <header-names: string-list> | |||
When the ":mime" tagged argument is present in the "exists" test, the | When the ":mime" tagged argument is present in the "exists" test, the | |||
test is extended to check for the existence of MIME headers in MIME | test is extended to check for the existence of MIME headers in MIME | |||
parts. | parts. | |||
The behavior of the ":anychild" tagged argument and the interaction | The behavior of the ":anychild" tagged argument and the interaction | |||
with the "foreverypart" iterator is the same as for the extended | with the "foreverypart" iterator is the same as for the extended | |||
"header" test Section 4.1. | "header" test Section 4.1. | |||
That is, | ||||
the use of "exists" with no ":mime" and ":anychild" tagged | ||||
argument is the test defined in [RFC5228], i.e. it will *only* | ||||
operate on top level header fields, whether it is inside | ||||
"foreverypart" or not. | ||||
the use of "exists" with ":mime" and no ":anychild" operates on | ||||
the current MIME part only (or on the top level header fields, if | ||||
outside "foreverypart") | ||||
the use of "exists" with ":mime" and ":anychild" operates on the | ||||
current MIME part and all of its descendants | ||||
Example: | Example: | |||
require ["mime", "fileinto"]; | require ["mime", "fileinto"]; | |||
if exists :mime :anychild "content-md5" | if exists :mime :anychild "content-md5" | |||
{ | { | |||
fileinto "INBOX.md5"; | fileinto "INBOX.md5"; | |||
} | } | |||
In this example, any message that contains a MIME Content-MD5 header | In this example, any message that contains a MIME Content-MD5 header | |||
skipping to change at page 8, line 25 | skipping to change at page 8, line 49 | |||
When used outside the context of a "foreverypart" loop, the MIME part | When used outside the context of a "foreverypart" loop, the MIME part | |||
to be replaced is the entire message. | to be replaced is the entire message. | |||
If the :mime parameter is not specified, the replacement string is a | If the :mime parameter is not specified, the replacement string is a | |||
text/plain part in UTF-8. | text/plain part in UTF-8. | |||
If the :mime parameter is specified, then the replacement string is, | If the :mime parameter is specified, then the replacement string is, | |||
in fact, a MIME entity as defined in [RFC2045] section 2.4, including | in fact, a MIME entity as defined in [RFC2045] section 2.4, including | |||
both MIME headers and content. | both MIME headers and content. | |||
If the entire message is being replaced, a ":subject" parameter | If the entire message is being replaced, the optional ":subject" | |||
specifies a subject line to attach to the message that is generated. | parameter specifies a subject line to attach to the message that is | |||
UTF-8 characters can be used in the string argument; implementations | generated. UTF-8 characters can be used in the string argument; | |||
MUST convert the string to [RFC2047] encoded words if and only if | implementations MUST convert the string to [RFC2047] encoded words if | |||
non-ASCII characters are present. Implementations MUST preserve the | and only if non-ASCII characters are present. Implementations MUST | |||
previous Subject header as an Original-Subject header. | preserve the previous Subject header as an Original-Subject header. | |||
Implementations MUST preserve all other header fields from the | ||||
original message with the exception of those relating to the MIME | ||||
structure that is being replaced. | ||||
If the entire message is being replaced, a ":from" parameter may be | If the entire message is being replaced, the optional ":from" | |||
used to specify an alternate address to use in the From field of the | parameter may be used to specify an alternate address to use in the | |||
message that is generated. The string must specify a valid [RFC2822] | From field of the message that is generated. The string must specify | |||
mailbox-list. Implementations SHOULD check the syntax and generate | a valid [RFC2822] mailbox-list. Implementations SHOULD check the | |||
an error when a syntactically invalid ":from" parameter is specified. | syntax and generate an error when a syntactically invalid ":from" | |||
Implementations MAY also impose restrictions on what addresses can be | parameter is specified. Implementations MAY also impose restrictions | |||
specified in a ":from" parameter; it is suggested that values that | on what addresses can be specified in a ":from" parameter; it is | |||
fail such a validity check simply be ignored rather than causing the | suggested that values that fail such a validity check simply be | |||
replace action to fail. Implementations MUST preserve the previous | ignored rather than causing the replace action to fail. | |||
From header as an Original-From header. | Implementations MUST preserve the previous From header as an | |||
Original-From header. | ||||
If ":mime" is specified and either ":subject" or ":from" is | ||||
specified, the ":subject:" or ":from" parameter MUST be ignored. | ||||
This SHOULD be flagged as a compilation error. | ||||
6. Action "enclose" | 6. Action "enclose" | |||
Usage: enclose <:subject string> <:headers string-list> string | Usage: enclose <:subject string> <:headers string-list> string | |||
A new Sieve action command is defined to allow an entire message to | A new Sieve action command is defined to allow an entire message to | |||
be enclosed as an attachment to a new message. After enclosure, | be enclosed as an attachment to a new message. After enclosure, | |||
subsequent actions affecting the message header or content use the | subsequent actions affecting the message header or content use the | |||
newly created message instead of the original message; this means | newly created message instead of the original message; this means | |||
that any use of a "replace" action or other similar actions should be | that any use of a "replace" action or other similar actions should be | |||
executed before the "enclose" action. | executed before the "enclose" action. | |||
If multiple "enclose" actions are executed by a script, only the text | If multiple "enclose" actions are executed by a script, only the text | |||
specified on the last one is used when creating the enclosed message. | specified on the last one is used when creating the enclosed message; | |||
the message in this case would not be enclosed multiple times. | ||||
This action does not affect messages that are forwarded via a | This action does not affect messages that are forwarded via a | |||
"redirect" action. | "redirect" action. | |||
Specifically, the original message becomes a multipart/mixed message | Specifically, the original message becomes a multipart/mixed message | |||
with two parts: a text/plain portion with the string argument as its | with two parts: a text/plain portion with the string argument as its | |||
body, and a message/rfc822 portion with the original message | body, and a message/rfc822 portion with the original message | |||
enclosed. The Content-Type: header field becomes multipart/mixed. | enclosed. The Content-Type: header field becomes multipart/mixed. | |||
The Subject: header is specified by the :subject argument. Any | The optional Subject: header is specified by the :subject argument; | |||
headers specified by :headers are copied from the old message into | if not present the subject will be taken from the enclosed message. | |||
the new message. If not specified by :headers, Date: and From: | Any headers specified by :headers are copied from the old message | |||
into the new message. If not specified by :headers, Date: and From: | ||||
headers should be synthesized to reflect the current date and the | headers should be synthesized to reflect the current date and the | |||
user running the Sieve action. | user running the Sieve action. | |||
7. Action "extracttext" | 7. Action "extracttext" | |||
Usage: extracttext [MODIFIER] [":first" number] <varname: string> | Usage: extracttext [MODIFIER] [":first" number] <varname: string> | |||
The extracttext action may be used within the context of a | The "extracttext" action may be used within the context of a | |||
"foreverypart" loop. Servers MUST support transcoding of any textual | "foreverypart" loop. Servers MUST support transcoding of any textual | |||
body part into UTF-8 for use with this action. This requires | body part into UTF-8 for use with this action. This requires | |||
decoding any transfer encoding as well as transcoding from the | decoding any transfer encoding as well as transcoding from the | |||
indicated character set into UTF-8. It stores at most :first | indicated character set into UTF-8. It stores at most :first | |||
characters of the transcoded content of the current MIME body part in | characters of the transcoded content of the current MIME body part in | |||
the variable identified by varname. If the :first parameter is not | the variable identified by varname. If the :first parameter is not | |||
present, the whole content of the current MIME body part is stored. | present, the whole content of the current MIME body part is stored. | |||
In either case the actually stored data MAY be truncated to conform | In either case the actually stored data MAY be truncated to conform | |||
to implementation specific limit on variable length and/or on MIME | to implementation specific limit on variable length and/or on MIME | |||
body part length. If the transfer encoding or character set is | body part length. If the transfer encoding or character set is | |||
unrecognized by the implementation or recognized but invalid, an | unrecognized by the implementation or recognized but invalid, an | |||
empty string will result. | empty string will result. | |||
If extracttext is used outside the context of a "foreverypart" loop, | If "extracttext" is used outside the context of a "foreverypart" | |||
the action will set the variable identified by varname to the empty | loop, the action will set the variable identified by varname to the | |||
string. | empty string. This SHOULD be flagged as a compilation error. | |||
Modifiers are applied on the extracted text before it is stored in | Modifiers are applied on the extracted text before it is stored in | |||
the variable. See [RFC5229] for details. | the variable. See [RFC5229] for details. | |||
8. Sieve Capability Strings | 8. Sieve Capability Strings | |||
A Sieve implementation that defines the "foreverypart" and "break" | A Sieve implementation that defines the "foreverypart" and "break" | |||
actions will advertise the capability string "foreverypart". | actions will advertise the capability string "foreverypart". | |||
A Sieve implementation that defines the ":mime" and ":anychild" | A Sieve implementation that defines the ":mime" and ":anychild" | |||
skipping to change at page 11, line 24 | skipping to change at page 12, line 24 | |||
# these attachment types are executable | # these attachment types are executable | |||
enclose :subject "Warning" :text | enclose :subject "Warning" :text | |||
WARNING! The enclosed message contains executable attachments. | WARNING! The enclosed message contains executable attachments. | |||
These attachments types may contain a computer virus program | These attachments types may contain a computer virus program | |||
that can infect your computer and potentially damage your data. | that can infect your computer and potentially damage your data. | |||
Before clicking on these message attachments, you should verify | Before clicking on these message attachments, you should verify | |||
with the sender that this message was sent by them and not a | with the sender that this message was sent by them and not a | |||
computer virus. | computer virus. | |||
. | . | |||
; | ||||
break; | break; | |||
} | } | |||
} | } | |||
9.3. Example 3 | 9.3. Example 3 | |||
A Sieve script to extract subject and text out of messages from the | A Sieve script to extract subject and text out of messages from the | |||
boss: | boss: | |||
require ["mime", "variables", "extracttext"]; | require ["mime", "variables", "extracttext"]; | |||
skipping to change at page 15, line 11 | skipping to change at page 16, line 11 | |||
RFC number: RFC XXXX | RFC number: RFC XXXX | |||
Contact address: The Sieve discussion list | Contact address: The Sieve discussion list | |||
<ietf-mta-filters@imc.org>. | <ietf-mta-filters@imc.org>. | |||
13. Change History | 13. Change History | |||
[[ RFC Editor NOTE: This section is to be removed prior to | [[ RFC Editor NOTE: This section is to be removed prior to | |||
publication as an RFC. ]] | publication as an RFC. ]] | |||
13.1. draft-ietf-sieve-mime-06 | 13.1. draft-ietf-sieve-mime-07 | |||
List :anychild parameter next to :mime, where it was added. | ||||
Expand description of "address" and "exists". | ||||
In replace, discuss interaction of :mime with :subject/:from. | ||||
In enclose, expand discussion o fmultiple enclosures. | ||||
Mention compilation error if extracttext is used outside of a | ||||
foreverypart loop. | ||||
13.2. draft-ietf-sieve-mime-06 | ||||
Added note to foreverypart about nested identical names hiding outer | Added note to foreverypart about nested identical names hiding outer | |||
names. | names. | |||
Added notes to Security Considerations section about it not working | Added notes to Security Considerations section about it not working | |||
on multipart/signed sections, and how replace/enclose may affect | on multipart/signed sections, and how replace/enclose may affect | |||
signatures. | signatures. | |||
13.2. draft-ietf-sieve-mime-05 | 13.3. draft-ietf-sieve-mime-05 | |||
Changed for_every_part to foreverypart, and extract_text to | Changed for_every_part to foreverypart, and extract_text to | |||
extracttext. | extracttext. | |||
Add option :name parameter to foreverypart and break. break :name | Add option :name parameter to foreverypart and break. break :name | |||
"string" will break out of closest enclosing foreverypart loop | "string" will break out of closest enclosing foreverypart loop | |||
with that name. | with that name. | |||
Clarify nesting a bit more. | Clarify nesting a bit more. | |||
Minor consistency nit picking. | Minor consistency nit picking. | |||
13.3. draft-ietf-sieve-mime-04 | 13.4. draft-ietf-sieve-mime-04 | |||
loops are depth first | loops are depth first | |||
:anychild clarifications | :anychild clarifications | |||
update examples | update examples | |||
grammar nits | grammar nits | |||
transcoding for extract_text | transcoding for extract_text | |||
13.4. draft-ietf-sieve-mime-03 | 13.5. draft-ietf-sieve-mime-03 | |||
add extraction | add extraction | |||
add security considerations | add security considerations | |||
fill in iana considerations | fill in iana considerations | |||
13.5. draft-ietf-sieve-mime-02 | 13.6. draft-ietf-sieve-mime-02 | |||
minor syntax glitches in examples | minor syntax glitches in examples | |||
Add clarification on "replace" affecting subsequent for_every_part | Add clarification on "replace" affecting subsequent for_every_part | |||
loops? | loops? | |||
Add IANA considerations for Original-Subject: and Original-From:. | Add IANA considerations for Original-Subject: and Original-From:. | |||
Add note on "enclose" creating From: and Date: headers. | Add note on "enclose" creating From: and Date: headers. | |||
13.6. draft-ietf-sieve-mime-01 | 13.7. draft-ietf-sieve-mime-01 | |||
what happens when nested for_every_part loop's | what happens when nested for_every_part loop's | |||
a "mime" shorthand for testing the type/subtype, without requiring | a "mime" shorthand for testing the type/subtype, without requiring | |||
interactions with variables | interactions with variables | |||
notifications | notifications | |||
notifications to calendar service | notifications to calendar service | |||
address tests, exists tests | address tests, exists tests | |||
mimeheader, mimeparameter tests | mimeheader, mimeparameter tests | |||
13.7. draft-ietf-sieve-mime-00 | 13.8. draft-ietf-sieve-mime-00 | |||
Changed title and text to emphasize MIME Tests. | Changed title and text to emphasize MIME Tests. | |||
Changed for.every.part to for_every_part. | Changed for.every.part to for_every_part. | |||
Added :anychild to mime test. Default is to use the current | Added :anychild to mime test. Default is to use the current | |||
context or outer envelope; specifying :anychild will look at all | context or outer envelope; specifying :anychild will look at all | |||
children. | children. | |||
Added clarifications to replacing parts affecting the structure. | Added clarifications to replacing parts affecting the structure. | |||
Added :mime option to replace, ala draft-ietf-sieve-vacation-06. | Added :mime option to replace, ala draft-ietf-sieve-vacation-06. | |||
Various other minor nit fixes. | Various other minor nit fixes. | |||
13.8. draft-sieve-mime-loop-04 | 13.9. draft-sieve-mime-loop-04 | |||
update reference for recent published rfcs | update reference for recent published rfcs | |||
extract-text now required to do decode transfer encoding and | extract-text now required to do decode transfer encoding and | |||
transcode to UTF-8 | transcode to UTF-8 | |||
removed editheader reference since its not actually used | removed editheader reference since its not actually used | |||
several text changes as suggested by Nigel Swinson, including re- | several text changes as suggested by Nigel Swinson, including re- | |||
writes to abstract and introduction | writes to abstract and introduction | |||
13.9. draft-hansen-sieve-loop-03 | 13.10. draft-hansen-sieve-loop-03 | |||
after enclosure, subsequent actions affect newly created message | after enclosure, subsequent actions affect newly created message | |||
synthesis of Date/From headers by the enclose action is no longer | synthesis of Date/From headers by the enclose action is no longer | |||
controversial | controversial | |||
Filled in Security Considerations | Filled in Security Considerations | |||
Picked up extract_text action from draft-ietf-sieve-notify | Picked up extract_text action from draft-ietf-sieve-notify | |||
Expanded the IANA considerations section | Expanded the IANA considerations section | |||
13.10. draft-hansen-sieve-loop-02 | 13.11. draft-hansen-sieve-loop-02 | |||
Update to 3028bis reference. | Update to 3028bis reference. | |||
Added 2119 conventions section. | Added 2119 conventions section. | |||
Terminology/title tweaks. | Terminology/title tweaks. | |||
Added informative references to body and editheader extensions. | Added informative references to body and editheader extensions. | |||
Added description of nested loops. | Added description of nested loops. | |||
Replaced mime test by extensions to header, address and exists | Replaced mime test by extensions to header, address and exists | |||
tests. | tests. | |||
13.11. draft-hansen-sieve-loop-01 | 13.12. draft-hansen-sieve-loop-01 | |||
Merged with draft-daboo-sieve-mime-00.txt. | Merged with draft-daboo-sieve-mime-00.txt. | |||
14. References | 14. References | |||
14.1. Normative References | 14.1. Normative References | |||
[RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail | [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail | |||
Extensions (MIME) Part One: Format of Internet Message | Extensions (MIME) Part One: Format of Internet Message | |||
Bodies", RFC 2045, November 1996. | Bodies", RFC 2045, November 1996. | |||
End of changes. 32 change blocks. | ||||
82 lines changed or deleted | 136 lines changed or added | |||
This html diff was produced by rfcdiff 1.35. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |