Page 48 - Mercury Manual.book
P. 48

43     Mail Filtering Rules
                Actions that rules can perform



               Attachment filtering  This button creates a special type of rule that checks the filename and/  Attachment filtering is an
               or extension of attachments to messages. The rule is special because it will always trigger if   especially valuable tool
                                                                                                 when dealing with virus-
               the attachment matches the conditions you specify. There are two specialized actions that are   generated messages.
               only available in attachment filtering rules – one that deletes the attachment from the mes-  You can use it to remove
                                                                                                 any “dangerous” attach-
               sage, and another that saves the attachment to a file.                            ment type from incoming
                                                                                                 mail.
               The Comment Button simply adds a textual comment to the rule set. Use this to remind your-
               self of why you’ve taken a particular action. Comments have no action component and are
               ignored when rules are processed.

               The Label Button creates a named point within the rule set. Labels have no actions, and can
               be used by Goto and Call actions to transfer control within a rule set. See Flow control, later
               in this section, for more details.

               The Not Button inverts the meaning of a rule: so, if you have a rule that checks the subject
               line for “Free” and you click the Not button, the rule will now trigger if the subject line does
               not contain “Free”.

               Actions that rules can perform


               The Action to take field in each rule defines what Mercury should do when the rule is trig-
               gered by a message that matches the condition you have defined.. Most of the available ac-
               tions are obvious both in intention and in use, but some require a little clarification:

               Copy to another user, Move to another user  These actions duplicate the current message in   The user must be a local
               the mailbox of a local Mercury user. Unlike forwarding, the message is not altered in any way   user - you cannot use this
               by these actions – the copy of the message that appears in the mailbox is identical to the mes-  rule to forward a message-
                                                                                                 to a non-local address.
               sage as delivered. You will typically use these actions to create audit trails of mail passing
               through your system. If you would prefer to have the copies of the messages placed in an ar-
               bitrary directory somewhere on your system instead of in a user's mailbox, then you can enter
               a path to a directory preceded by the special character '@'. Mercury will place the duplicate
               message in the directory, dealing with any possible filename clashes automatically. Note that
               Move and Copy actions bypass autoforwarding and autoreply functions.

               Running programs  The Run Program rule action will start the specified program, passing a
               temporary copy of the message on the commandline. Mercury will continue running after it
               has run the program - it will not wait for the program to terminate. If you want to suspend
               rule processing until the program has completed, you should create a second rule with the rule
               action Wait until a file exists: when it encounters this rule, Mercury will wait a maximum of
               two minutes for the filename you specify to appear on the system. When the file appears,
               Mercury will delete it and continue. The intention here is that your program or batch file will
               create a 0-length file as a semaphore to indicate that it has completed. Remember! Mercury
               will delete the file before continuing – do not store any information you wish to keep in this
               file.

               Sending messages  Mercury provides three different rule actions that can send a mail mes-
               sage. The first two, Send text file to originator and Send binary file to originator will return
               the file you specify to whomever sent the message. The third, Send a mail message, allows
               you to send a text file to a specific address, rather than to the sender of the original message.

               Printing messages  Mercury's Print message rule action is fairly simplistic: it allows you to
               choose the printer to which the message should be sent, but does not allow you to control
               printer settings such as number of pages or paper source. Also, you should exercise caution
   43   44   45   46   47   48   49   50   51   52   53