rfc-6558

Sieve Extension for Converting Messages before Delivery

A. Melnikov, B. Leiba, K. Li
date2012-03 streamIETF areaapp wgsieve statusPROPOSED STANDARD pages8 canonicalhttps://www.rfc-editor.org/rfc/rfc6558 doi10.17487/RFC6558 errataview
This document describes how the "CONVERT" IMAP extension can be used within the Sieve mail filtering language to transform messages before final delivery. [STANDARDS-TRACK]

Extracted elements (14)

design-rationale §2.2

Defining 'convert' as a testable action does not imply that other Sieve actions can be used as tests; this is a unique property of the 'convert' action. Future extensions wishing to define testable actions must explicitly specify that capability.

email

design-rationale §2

Implementations may defer actual conversion until results are needed for script processing, to avoid doing conversions unnecessarily. For example, if a 'convert' action is processed but a 'discard' action results, the conversion need not actually be performed.

email

interoperability-note §2

The 'convert' action can be used with Sieve MIME Part Tests (RFC 5703) via the 'foreverypart' loop when only some body parts need conversion or different parts require different conversions.

email

interoperability-note §2

The Sieve 'convert' action reuses conversion parameters and framework established by the IMAP CONVERT extension (RFC 5259). Each transcoding parameter value has the syntax '<transcoding-param-name>=<transcoding-param-value>' as defined in RFC 5259.

email

normative-requirement §2 MUST

If a 'convert' action cannot be completed — because the conversion failed or is not available — it MUST terminate and leave the message unchanged, rolling back any other conversions done by that action. No partial conversions from a single 'convert' action are allowed.

email

normative-requirement §2 MAY

Servers MAY refuse conversions or perform them at lower priority to avoid negative effects on service to other processes, since computationally expensive conversions of many body parts can constitute an attack vector or create unacceptable server load.

email, security

normative-requirement §2.1 MUST

When a disposition-type action (e.g., 'fileinto' or 'redirect') is encountered, the implementation MUST perform the action on the message as it stood at that point in script processing, and MUST NOT include subsequent conversions encountered later in the script.

email

protocol-element §2

A single 'convert' action applies only once to any body part; it will not re-process the result of its own conversion as a new body part to transform again.

email

protocol-element §2.1

Convert actions are cumulative: each conversion operates on the message as it stands after all prior conversions. The implicit keep, if in effect, acts on the final state of the message after all conversions are performed.

email

protocol-element §2.2

The 'convert' action can also be used as a test ('testable action'): it attempts the requested conversion(s) and evaluates to 'false' if and only if at least one conversion failed, whether due to an unsupported conversion or corrupted/mislabeled data.

email

protocol-element §2

The 'convert' action takes three arguments: a quoted-from-media-type string, a quoted-to-media-type string, and a transcoding-params string-list. It converts all body parts matching the source media type to the target type using the specified parameters.

email

protocol-element §2

When the 'convert' action appears inside a 'foreverypart' loop, it applies only to the body part currently being processed. When it appears outside a loop, conversion applies equally to all matching body parts.

email

registry §5

IANA has added a 'convert' entry to the 'Sieve Extensions' registry (defined in RFC 5228), with capability name 'convert', contact address [email protected], and RFC number 6558.

email, registry

security-consideration §4

Security considerations from IMAP CONVERT (RFC 5259) and Sieve (RFC 5228) apply to this document. Computationally expensive conversions of many body parts can constitute an attack vector and servers may throttle or refuse such conversions.

email, security