Capturing messages via Sieve scripts

The MTA has a private Sieve extension action, " ",  that takes an argument specifying a  destination address to which to send an encapsulated copy of the  original message. " " is supported only in system Sieves: that is, channel Sieves or the MTA    (in legacy configuration, the    file). By default, this causes generation of a new message to the capturer in almost exactly the same  DSN format (see  Format of captured message copies)  as results from use of the    attribute  (discussed in Capture triggered via LDAP attribute).

New in MS 6.3 are the optional, nonpositional parameters   and. The default is , which corresponds to the only behavior previously  available, that of captured copies being in encapsulated format as with    attribute use. However, if the new-in-6.3 " " parameter is specified, then the  "capture" message copy may instead be generated without MIME  encapsulation (though the envelope From address of the new message copy  will be set to that of the  "owner" of the Sieve filter).

New in MS 7.0 update 2 is the optional parameter ,  which is an alternative to   or. This new  parameter causes the Sieve  " " action to produce Microsoft Exchange&#x27;s  "envelope journaling" format. This format consists of a multipart MIME message where the first part contains envelope  information in a semi-structured format and the second part is the  actual message.

Because the " " action can, like any other Sieve action, be coded into use in a Sieve script doing complicated  filtering of messages, it is especially well-suited to cases where it  is desired to "capture" only particular sorts of messages  (e.g., those containing particular header lines, particular  combinations of senders and recipients, particular sorts of message  contents, etc.). For some examples, see Example Sieve external lists with properties.

However, Sieve filter based "capture", especially with the new-in-6.3   argument or the new-in-7.0u2    argument, may also be a useful part of an  archiving approach. See Format of captured message  copies for a discussion of the possible  formats for captured message copies.

See also:
 * Sieve capture extension
 * Sieve hierarchy
 * systemfilter MTA Option
 * Format of captured message copies
 * ldap_capture MTA Option
 * Capture triggered via LDAP attributes
 * Example Sieve external lists with properties
 * Message capture