draft-ietf-sieve-convert-05.txt   draft-ietf-sieve-convert-06.txt 
Sieve Working Group A. Melnikov Sieve Working Group A. Melnikov
Internet-Draft Isode Limited Internet-Draft Isode Limited
Intended status: Standards Track Q. Sun Intended status: Standards Track Q. Sun
Expires: April 20, 2012 B. Leiba Expires: June 3, 2012 B. Leiba
K. Li K. Li
Huawei Technologies Huawei Technologies
October 18, 2011 December 1, 2011
Sieve Extension for Converting Messages Before Delivery Sieve Extension for Converting Messages Before Delivery
draft-ietf-sieve-convert-05 draft-ietf-sieve-convert-06
Abstract Abstract
This document describes how IMAP CONVERT can be used within Sieve to This document describes how the "CONVERT" IMAP extension can be used
transform messages before final delivery. within the Sieve mail filtering language to transform messages before
final delivery.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
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."
This Internet-Draft will expire on April 20, 2012. This Internet-Draft will expire on June 3, 2012.
Copyright Notice Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 12 skipping to change at page 2, line 13
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Conventions Used in this Document . . . . . . . . . . . . . . 3 1.1. Conventions Used in this Document . . . . . . . . . . . . . . 3
2. "convert" action . . . . . . . . . . . . . . . . . . . . . . 3 2. "convert" action . . . . . . . . . . . . . . . . . . . . . . 3
2.1. Interaction with other tests and actions . . . . . . . . . . 4 2.1. Interaction with other tests and actions . . . . . . . . . . 4
2.2. "convert" as a test . . . . . . . . . . . . . . . . . . . . . 4 2.2. "convert" as a test . . . . . . . . . . . . . . . . . . . . . 5
3. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1. Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.1. Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2. Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.2. Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3. Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.3. Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.4. Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.4. Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4. Security Considerations . . . . . . . . . . . . . . . . . . . 7 4. Security Considerations . . . . . . . . . . . . . . . . . . . 8
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8
7. Normative References . . . . . . . . . . . . . . . . . . . . 8 7. Normative References . . . . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 9
1. Introduction 1. Introduction
The IMAP CONVERT extension [RFC5259] adds an IMAP command for The IMAP "CONVERT" extension [RFC5259] adds an IMAP command for
performing client-controlled conversions on whole messages or their performing client-controlled conversions on whole messages or their
body parts. This document defines a similar extension to the Sieve body parts. This document defines a similar extension to the Sieve
mail filtering language [RFC5228], which reuses the conversion mail filtering language [RFC5228], which reuses the conversion
parameters and framework established by IMAP CONVERT. parameters and framework established by IMAP CONVERT.
1.1. Conventions Used in this Document 1.1. Conventions Used in this Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
skipping to change at page 3, line 50 skipping to change at page 3, line 50
different conversions. When the "convert" action appears in a different conversions. When the "convert" action appears in a
"foreverypart" loop, it applies only to the body part being "foreverypart" loop, it applies only to the body part being
processed, and not to any other body parts (see Section 3.2 for an processed, and not to any other body parts (see Section 3.2 for an
example). example).
When the "convert" action appears outside a "foreverypart" loop, the When the "convert" action appears outside a "foreverypart" loop, the
conversion applies equally to all body parts -- that is, all body conversion applies equally to all body parts -- that is, all body
parts that have the "quoted-from-mime-type" are converted, using the parts that have the "quoted-from-mime-type" are converted, using the
same transcoding parameters. same transcoding parameters.
A single "convert" action will only apply once to any body part. If,
for example, << convert "image/jpeg" "image/jpeg" ["pix-x=100","pix-
y=120"] >> converts a larger JPEG image to the smaller 100 x 120
size, that will be the end of that "convert" action on that body
part. The action will not see a "new" JPEG body part to process,
resulting from the conversion.
If a "convert" action cannot be completed -- perhaps because the If a "convert" action cannot be completed -- perhaps because the
conversion failed, or because the requested conversion is not conversion failed, or because the requested conversion is not
available -- the message MUST remain unchanged, and the script available -- that "convert" action MUST terminate and leave the
processing continues. In particular, no error condition is raised, message unchanged, rolling back any other conversions done by that
and no partial conversions are allowed. action. The script processing continues, and prior or subsequent
"convert" actions are not affected. No error condition is raised,
and no partial conversions from a single "convert" action are
allowed.
Implementations might defer any actual conversion until the the Implementations might defer any actual conversion until the the
results of the conversion are needed for script processing, to avoid results of the conversion are needed for script processing, to avoid
doing conversions unnecessarily. Consider the case wherein a doing conversions unnecessarily. Consider the case wherein a
"convert" action is processed, but a "discard" action results without "convert" action is processed, but a "discard" action results without
the need to actually perform the conversion. the need to actually perform the conversion.
When conversions actually need to be done, they can put a significant
load on the server. Computationally expensive conversions of a lot
of body parts can constitute an attack vector, and even if done
legitimately they can create an unacceptable load. Servers MAY
refuse conversions, or do them at lower priority, effectively slowing
the requesting process in order to avoid negative effects on service
to other processes.
2.1. Interaction with other tests and actions 2.1. Interaction with other tests and actions
Whether the actual conversion has been done yet or not, a successful Whether the actual conversion has been done yet or not, a successful
"convert" action effectively changes the message, and all subsequent "convert" action effectively changes the message, and all subsequent
actions, including any other "convert" actions, apply to the changed actions, including any other "convert" actions, apply to the changed
message. The "convert" action does not affect the applicability of message. The "convert" action does not affect the applicability of
other actions; any action that was applicable before the "convert" is other actions; any action that was applicable before the "convert" is
equally applicable to the changed message afterward. equally applicable to the changed message afterward.
When a disposition-type action, such as "fileinto" or "redirect", is When a disposition-type action, such as "fileinto" or "redirect", is
skipping to change at page 4, line 43 skipping to change at page 5, line 13
be used. be used.
In addition, any tests done on the message and its parts will test In addition, any tests done on the message and its parts will test
the message after prior conversions have been done. The fourth block the message after prior conversions have been done. The fourth block
of Section 3.4 shows an example of this situation. of Section 3.4 shows an example of this situation.
Convert actions are cumulative, and each conversion operates on the Convert actions are cumulative, and each conversion operates on the
message as it stands after all prior conversions. See the fourth message as it stands after all prior conversions. See the fourth
block of Section 3.4 for an example of how this might be tricky. block of Section 3.4 for an example of how this might be tricky.
Because the implicit keep, if it is in effect, acts on the final Because the implicit keep (see Section 2.10.2 of [RFC5228]), if it is
state of the message, all conversions are performed before any in effect, acts on the final state of the message, all conversions
implicit keep. are performed before any implicit keep.
2.2. "convert" as a test 2.2. "convert" as a test
To simplify testing for supported and successful conversions, the To simplify testing for supported and successful conversions, the
"convert" action can also be used as a test. As such, it will "convert" action can also be used as a test. As such, it will
attempt to perform the requested conversion(s), and will evaluate to attempt to perform the requested conversion(s), and will evaluate to
"false" if and only if at least one conversion failed. The failure "false" if and only if at least one conversion failed. The failure
can be because a conversion was unsupported, or because the data can be because a conversion was unsupported, or because the data
could not be converted (perhaps it had been corrupted in transit, or could not be converted (perhaps it had been corrupted in transit, or
mislabeled at its origin). mislabeled at its origin).
 End of changes. 16 change blocks. 
19 lines changed or deleted 38 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/