rfc-8579

Sieve Email Filtering: Delivering to Special-Use Mailboxes

S. Bosch
date2019-05 streamIETF areaart wgextra statusPROPOSED STANDARD pages12 canonicalhttps://www.rfc-editor.org/rfc/rfc8579 doi10.17487/RFC8579 errataview
The SPECIAL-USE capability of the IMAP protocol (RFC 6154) allows clients to identify special-use mailboxes, e.g., where draft or sent messages should be put. This simplifies client configuration. In contrast, the Sieve mail filtering language (RFC 5228) currently has no such capability. This memo defines a Sieve extension that fills this gap: it adds a test for checking whether a special-use attribute is assigned for a particular mailbox or any mailbox, and it adds the ability to file messages into a mailbox identified solely by a special-use attribute.

Extracted elements (16)

design-rationale §7

The extension restricts special-use mailbox lookup to the user's personal namespace to avoid searching the entire mail storage (preventing undue system load) and to prevent security issues where messages could be unexpectedly or maliciously filed into shared mailboxes with special-use attributes.

email, security

design-rationale §4

The ':specialuse' fallback does not attempt delivery to the default mailbox when the special-use mailbox delivery fails for non-existence reasons. This prevents messages from being unexpectedly spread across two mailboxes in case of transient or intermittent delivery failures.

email

design-rationale §1

This extension was created because the existing workaround using 'mboxmetadata' and IMAP METADATA was deemed too complex for implementers who only need access to special-use attributes in Sieve, not the full METADATA capability.

email

interoperability-note §4

The ':specialuse' argument's string parameter is not a constant string; variable substitutions are allowed when the 'variables' extension (RFC 5229) is active, in which case the special-use attribute syntax is only verified at runtime.

email

interoperability-note §3

The 'specialuse_exists' test's delivery check is defined by reference to the 'mailboxexists' test in RFC 5490 Section 3.1, which specifies when delivery into a mailbox is deemed possible.

email

normative-requirement §4 MUST NOT

If delivery to the special-use mailbox fails for reasons unrelated to its existence, the Sieve interpreter MUST NOT attempt delivery to the default mailbox as a fallback; it MUST proceed as if ':specialuse' were absent and delivery to the named mailbox had failed.

email

normative-requirement §4 MUST

If more than one personal mailbox has the specified special-use attribute and one of them is the default mailbox named by the positional argument, that mailbox MUST be used for delivery.

email

normative-requirement §4 MUST

If neither the special-use mailbox nor the default mailbox exists, the 'fileinto' action MUST proceed exactly as it does when the ':specialuse' argument is absent and the named mailbox does not exist.

email

normative-requirement §4.1 SHOULD

If the server supports the CREATE-SPECIAL-USE IMAP capability, it SHOULD assign the special-use attribute specified with ':specialuse' to any newly created mailbox that results from implicit creation by 'fileinto'.

email

normative-requirement §4 SHOULD

Implementations SHOULD handle an invalid special-use attribute in the same way as an invalid mailbox name is handled.

email

normative-requirement §4 SHOULD

When multiple mailboxes share the relevant special-use attribute and none is the default, implementations SHOULD ensure that the mailbox choice is made consistently so that the same mailbox is used every time while assignments remain unchanged.

email

protocol-element §5

The capability string 'special-use' is advertised by Sieve implementations that support the 'specialuse_exists' test and the ':specialuse' argument for 'fileinto'.

email

protocol-element §4

The ':specialuse' argument extends the 'fileinto' command to deliver messages to a mailbox identified by a special-use attribute rather than by name. If no matching special-use mailbox exists or the attribute is unknown, 'fileinto' falls back to the positional mailbox name argument.

email

protocol-element §3

The 'specialuse_exists' test checks whether a special-use attribute is assigned to a particular mailbox or any mailbox in the user's personal namespace that allows message delivery. Without a mailbox argument, it tests any personal namespace mailbox; with a mailbox argument, it tests that specific mailbox for the listed attributes.

email

registry §8

IANA has registered the 'special-use' capability name in the 'Sieve Extensions' registry, describing it as adding the 'specialuse_exists' test and ':specialuse' argument for 'fileinto', with contact at the Sieve discussion list.

email, registry

security-consideration §7

Restricting special-use mailbox lookup to the user's personal namespace prevents malicious or accidental filing of messages into shared mailboxes that have special-use attributes assigned. This restriction may be lifted for future special-use attributes only after careful security review.

email, security