Imexpire invoking spamfilter packages

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

New in Messaging Server 7.0.5, the imexpire utility has a new channel attribute to specify the name of an MTA channel. When this attribute is used, any source channel spam/virus filter package configured on that channel will be applied to each message that is scanned by imexpire, and any spamadjust, spamtest, virusset, virustest, or added headers will then be visible to the Sieve expression used to expire messages. (Of course, use of Sieve expressions to expire messages must also be enabled via the expiresieve Message Store option.)

The MTA options scan_channel, scan_originator, and scan_recipient may be used to establish context (Sieve values) for non-channel evaluations of Sieve filters, such as imexpire invocations of spam/virus filter packages, though note that scan_channel is not needed for imexpire's spamfilter package invocation case (since in such a case imexpire's channel attribute is used to set the MTA channel).

For example, suppose that MTA channel invokes SpamAssassin, which is then configured to perform a spamadjust to communicate its results. In this scenario, an expression of the form

require ["comparator-i;ascii-numeric", "relational", "spamtest"];
spamtest :value "ge" :comparator "i;ascii-numeric" "5";

should expire any message that received a spam score of 5 or more.

The new-in-7.0.5 rescanhours attribute is also especially relevant when using imexpire to perform post-delivery spam/virus filtering. rescanhours tells imexpire to rescan those messages that have not been scanned for the specified number of hours.

See the Scheduler's expire task for configuration of automatic scheduling of executions of imexpire.

See also: