Sieve fileinto action

From Messaging Server Technical Reference Wiki
Jump to: navigation, search


RFC 5228 (Sieve)defines the "fileinto" action as optional since though quite desirable, it may not be possible in some environments. In order to use "fileinto", a Sieve script must, per Sieve syntax, declare that it will use it via


require "fileinto";

Note that "fileinto" is not supported for domain Sieves. And the number of "fileinto" actions that may be performed by a Sieve script is limited (as of the 8.0 release, this limit only applies to user-level Sieves) by the max_fileintos MTA option (default value 10).

To implement a Sieve script's "fileinto" action, the MTA's behavior is controlled by the fileinto channel option: that channel option is normally configured to insert the folder-name specified by the Sieve script's "fileinto" argument into the recipient address in the form of a subaddress. Next, the MTA must pass along to the Message Store the decision of whether to "trust" the subaddress for folder delivery purposes; relevant channel options are deliveryflags and flagtransfer. Note that even if a Sieve script appears to perform a "fileinto" action, the actual delivery-into-a-folder requires that proper configuration have been performed to properly implement the transfer to the Message Store of the desired "fileinto" effect.

The copy extension adds a ":copy" tag to "fileinto" (so that the "fileinto" does not, as would be normal, cancel the Sieve "implicit keep"). The imap4flags extension adds, among other features, a ":flags" tagged argument (to specify IMAP flags to set on the message as it is delivered).

Note that users are permitted to "fileinto" their own folders; in contrast, delivery to another user (or to a desired folder belonging to another user) is not a "fileinto" effect but rather requires a "redirect" action. There is one exception to this, and that is the case (such as in cases of head of household Sieve filters) where the owner of a Sieve differs from the user on whose behalf the Sieve is being applied; the MTA's private ":owner" tag specifies that the folder named is that of the owner of the Sieve filter, rather than of the user for whom the Sieve is being applied.


See also: