Sieve filters: types of scripts

Messaging Server supports Sieve scripts of various types  specified at multiple levels,  whose specified effects will then be "combined" to yield an overall Sieve result for each user. The various types of Sieve scripts, in order from the most general to the most specific, are:



 Spam filter Sieve scripts. Results produced by spam/virus filter package plugins are interpolated into Sieve scripts. Up to eight such spam/virus filter package plugins can be defined, hence up to eight such Sieve scripts can be produced. Among such spam/virus filter package Sieve scripts, package 1 is the most general proceeding through package 8 as the most specific. (&#x2a;) 

 Source channel Sieve filters. The   channel option is used  to specify the location (via a URL) for a Sieve script applying for messages received via that source channel. (&#x2a;) 

 System Sieve filter. A single system-wide (per MTA host) Sieve filter can be specified that applies to all recipients of all messages passing through this MTA. In Unified Configuration, the system Sieve filter is specified via the   MTA option; in legacy configuration,  the normal location for this script is the file  . (&#x2a;) 

 Destination channel script. The   channel option  specifies the location (via a URL) for a Sieve script applying to messages enqueued to this destination channel. (&#x2a;) 

 , ,  , and    mapping table Sieve scripts (in the listed order; that is, the most general being   through the  most specific being  ). The  sequence, when specified in any of these  mapping tables, causes a Sieve URL to be read from the mapping result string. 

 Mailing list domain scripts. The domain entry associated with mailing lists defined in LDAP can use the   LDAP attribute  (more technically, whatever LDAP attribute is named by the   MTA option) to specify a Sieve script. (&#x2a;) 

 Mailing list scripts. Mailing lists defined in LDAP can use the  LDAP attribute (more technically, whatever LDAP attribute is named by the   MTA option) to specify a Sieve script. Lists defined via Unified Configuration alias options can use the  alias option to specify a Sieve script, just as in legacy configuration lists defined in the   file or database can use a   nonpositional parameter to specify a Sieve URL. Also (and note that this is different from the user script case), any "head of household" script applied to a mailing list (specified by having on the group/list LDAP entry  the LDAP attributes named by the   and   MTA options) is also considered to be at this same level of generality as other mailing list scripts. The mailing list scripts are considered in the order in which they are encountered. 

 User domain scripts. The domain entry associated with users defined in LDAP can use the  attribute (more technically, whatever LDAP attribute is named by the   MTA option) to specify a Sieve script. (&#x2a;) </li>

 User scripts. Users defined in LDAP can use the  LDAP attribute (more technically, whatever LDAP attribute is named by the   MTA option) to specify a Sieve script. In Unified Configuration, users defined via alias options can use the  alias option to specify a Sieve script, just as in legacy configuration users defined in the   file or database can use a   nonpositional parameter to specify a Sieve URL. </li>

 Head of household scripts. LDAP user entries can contain an attribute (specified by the   MTA  option) that provides the distinguished name of the so-called "head of household", another LDAP user entry. This entry is read and any Sieve stored in the attribute specified by the  MTA option (which defaults to  ) will be processed. </li>

 Finally, the  channel option can applied to the  destination channel; if used, it specifies a  Sieve URL for a user Sieve  (that is, it typically specifies a template including user-specific substitutions for how to locate user Sieve scripts). </li>

</ol>

The types marked with (&#x2a;) are considered to be "system-level" scripts. Certain capabilities, most notably the " " action,  are only available to system-level scripts. In the other direction, the  action is only available to user-level (non-system-level) scripts.

Many types of Sieve scripts may be specified or located via a URL; in particular, ,  ,  , and   URLs are supported, and a   URL type is normally assumed so bare filenames (the name of a file containing a Sieve script) will also work as an argument in most places.

See also:
 * Spamfilter MTA options
 * sourcefilter Option
 * systemfilter MTA Option
 * destinationfilter Option
 * filter Option
 * Recipient access mapping tables
 * Mailing lists
 * ldap_domain_attr_filter MTA Option
 * ldap_filter MTA Option
 * alias_filter Option
 * Head of household Sieve filters
 * ldap_filter_reference MTA Option
 * ldap_hoh_filter MTA Option
 * Sieve capture extension
 * Sieve vacation extension
 * MTA URL types
 * Sieve hierarchy