Filter_discard channel

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



By default, messages discarded via a Sieve filter are immediately discarded (deleted) from the system. However, when users are first setting up Sieve filters (and perhaps making mistakes), or for debugging purposes, it can be useful to have the deletion operation delayed for a period. (Certain flags in *_ACCESS mapping tables cause Sieve filter like discarding of messages; such messages also are eligible for delayed deletion.)

To have Sieve filter discarded messages temporarily retained on the MTA system for later deletion, first add a filter_discard channel in your MTA configuration, e.g.:


filter_discard notices 7 
FILTER-DISCARD 

or in Unified Configuration:


msconfig> set role.channel:filter_discard.official_host_name FILTER_DISCARD
msconfig# set role.channel:filter_discard.notices 7

As of 8.0, use of the new-in-8.0 receivedstate channel option is recommended, so:


msconfig> set role.channel:filter_discard.receivedstate "quarantine/sieve-discarded"

or in legacy configuration:


filter_discard receivedstate "quarantine/sieve-discarded" notices 7 
FILTER-DISCARD 

with the notices channel option specifying the length of time (normally number of days) to retain the messages before deleting them. Then set the MTA option filter_discard=2:


msconfig# set role.filter_discard 2

By default, messages discarded due to a Sieve "jettison" action get the same handling as those discarded due to a "discard" action, as controlled by the filter_discard MTA option, either being deleted from disk immediately or retained in the filter_discard channel queue area. However, the filter_jettison MTA option may be used to differentiate the handling; for instance, if one wishes to retain messages discarded by a (presumably user level) "discard" action in the filter_discard channel, while immediately deleting messages discarded due to a (system level) "jettison" action, one could set filter_discard=2 and filter_jettison=1:


msconfig> set role.filter_discard 2
msconfig# set role.filter_jettison 1

Setting the MTA option filter_jettison=2 explicitly (or the implicit effect if the MTA option filter_discard=2 is set) will cause messages discarded due to a Sieve "jettison" action to be retained in the filter_discard channel.

Messages in the filter_discard channel queue area should be considered to be in an extension of users' personal wastebasket folders. As such, note that warning messages are never sent for messages in the filter_discard channel queue area, nor are such messages returned to their senders when a bounce or return is requested. Rather, the only action taken for such messages is to eventually silently delete them, either when the final notices value expires, or if a manual bounce is requested using a utility such as imsimta return or the imsimta qm utility's return command.


See also: