Useful Scripted Filter Examples


SUMMARY

Scripted filters are useful to process messages in a particular way that is not available in other settings. They can be configured at the global level, or if you have an Enterprise version license, you can also create these at the postoffice level. Postoffice level filters only act on inbound messages, whereas global filters act on all messages passing through the server.

DETAIL

The following scripted filters will process the actions when the criteria is matched, so you would still need to create actions to perform. You may wish to alter headers, redirect or delete the messages. It is recommended to initially just create an action to alter the subject line or redirect the message so you are able to test before implementing an action such as a delete.

Example 1: Limit mailbox sending and receiving

To help only allowing a mailbox to send and receive only to addresses in their own domain, this criteria script will run the actions if the sender or recipient is not in the example.com domain:

If CriteriaMet([ME_TOorCC],"*user1@example.com*") and not CriteriaMet([ME_FROM],"*@example.com*") then
    FilterResult=1
else
    if CriteriaMet([ME_FROM],"*user1@example.com*") and not CriteriaMet([ME_TOorCC],"*@example.com*") then
        FilterResult=1
    end if
end if



Product:MailEnable
Article:ME020645
Module:General
Keywords:filter,script
Class:HOWTO: Product Instructions
Revised:Tuesday, October 11, 2016
Author:
Publisher:MailEnable