Automated Mail Processing (Rules) |
||||||||||||||||||||||||||||||||||||||||||||
|
The Server-Wide Rules are applied to all messages submitted to the server. These Rules are applied by the Enqueuer kernel component, before it enqueues a message into the transfer module queue(s).
When a message is directed to an account on the CommuniGate Pro Server, the Local Delivery module applies all Domain-Wide Rules to that message, and then it applies all the Rules specified for the target account.
Each Rule has a name, priority, a set of conditions, and a set of "actions". The higher priority Rules are checked first.
If a message meets all Rule conditions, the Rule actions are performed, and automated processing either stops, or proceeds checking other, lower-priority Rules.
The System or Domain administrator can specify Domain-Wide Rules using a link on the Domain Settings page.
The System administrator can specify Account Rules using a link on the Account Settings page.
Account users can specify their Account-Level Rules themselves, via the WebUser Interface. The System or Domain administrator can specify which Rule actions each user is allowed to use.
When the list of Rules appears in a browser window, the Rule names and priorities can be modified:
After you have modified the Rule names and/or priorities, click the Update button. The list is displayed re-sorted by priority.
Rules with the disabled priority are not applied to the messages, but they are not deleted from the Account Rules set, and they can be reenabled at any moment.
To create a new Rule, enter its name in the field on the top and click the Create New button.
To remove a Rule, select the checkbox in the Delete column and click the Update button.
To modify the Rule conditions and actions, click the Edit link.
The condition operations is and is not process their parameters as "pictures": the asterisk (*) symbols in parameters are processed as wildcards that match zero or more symbols in the tested string. To check that a string contains the @thatdomain substring, the is *@thatdomain* operation should be used, and to check that a string does not end with the somedomain.com substring, the is not *somedomain.com operation should be used.
The condition operations in and not in process their
parameters as sets of one or more "pictures" separated with the comma (,)
symbols. The tested string is compared to all picture strings. The in
condition is met if the tested string matches at least one picture string.
The not in condition is met if the tested string does not match any
picture string in the specified set.
Note: do not use excessive spaces around the comma signs: spaces before the
comma sign become trailing spaces of the previos picture, and spaces after the
comma sign become leading spaces of the next picture.
The following Rule conditions are implemented:
From [is | is not | in | not in] string
Sender [is | is not | in | not in] string
Reply-To [is | is not | in | not in] string
To [is | is not | in | not in] string
Cc [is | is not | in | not in] string
Reply-To [is | is not | in | not in] string
Any To or Cc [is | is not | in | not in] string
Each To or Cc [is | is not | in | not in] string
Return-Path [is | is not | in | not in] string
'From' Name [is | is not | in | not in] string
Subject [is | is not | in | not in] string
Message-ID [is | is not | in | not in] string
Message Size [is | is not | less than | greater than] number
Human Generated
Header Field [is | is not | in | not in] string
Any Recipient [is | is not | in | not in] string
The addresses are processed in the form they had before the Router Table and other routing methods have modified them. If an account has several aliases, this condition allows you to check if a message was sent to a specific account alias.
Messages can be submitted to the server using the ESMTP ORCPT parameter. This parameter specifies how the address was composed on the sending server, before the relaying/forwarding server has converted it to a different address. In this (rare) case, that server can use the ESMTP ORCPT parameter to specify the original address.
If the domain1.com server is an advanced server and informed the domain2.com CommuniGate Pro server that the original address was user1@domain1.com, the string <user1@domain1.com> is used when the Recipient condition is checked.
If the domain1.com server has not informed your server about the original address, the <user2@domain2.com> string is used when the Recipient condition is checked.
The condition is met if it is met for at least one envelope address.
Each Recipient [is | is not | in | not in] string
Time Of Day [is | is not | less than | greater than] time string
A time string should be specified as hh:mm or hh:mm:ss, where hh is the hour, mm - minutes, ss - seconds. Time strings can contain the am and pm suffices.
Sample:
Current Date [is | is not | less than | greater than] date string
A date string should be specified in one of the following formats:
Sample:
Current Day [is | is not | in | not in] day string
Days should be specified either as numbers (0 for Sunday, 6 for Saturday), or as RFC822 abbreviations (Sun, Mon, Tue, Wed, Thu, Fri, Sat).
Sample:
The following conditions can be used in Server-Wide Rules only:
Any Route [is | is not | in | not in] string
The condition is met if it is met for at least one envelope address.
Note: only the "local part" of the parsed and routed address is checked. If, for example, an envelope address <user@client.com> was processed with the Router record
If you plan to use this type of Rule condition, use the Test button on the WebAdmin Interface Router page to see how various addresses are routed.
Each Route [is | is not | in | not in] string
The following Rule actions are implemented:
Note: the following actions are not implicit "Discard" actions, and they do not prevent the original message from being stored in the INBOX. If you want, for example, to redirect a message without keeping a copy in your INBOX, specify the Redirect action followed with the Discard action.
The header fields Subject: Re: original message subject and In-Reply-To: original message-ID are added to the reply message.
The specified message text can contain macro symbols that are substituted with actual data when a reply message is composed:
Additional headers can contain additional To, Cc, and Bcc fields and the reply message will be sent to those addresses (the Bcc fields will be removed from the message headers).
The ^S and other macro symbols can be used in the additional headers, too.
An empty line should separate the message body from the additional header fields:
The specified message header and the message body can contain macro symbols listed above.
The message text (the header and the body) is sent to the task as that task
standard input (stdin).
Note: the task must read the entire stdin data stream, otherwise
the Execute command fails.
When the task completes, the task exit code is checked. If it was zero, the Rule action is considered to be executed successfully, and the next Rule action is executed.
If the task exit code is non-zero, the message is rejected with the error code "automated processing failed", and the data from the task standard error channel is recorded in the Log along with the task exit code.
The data from the task standard output, if any, should not exceed 4Kbytes in size. It is recorded in the Log and discarded.
The CommuniGate Pro Server monitors the task during its execution, and it interrupts the task if it does not complete in 2 minutes.
When a task is to be executed as a part of Account-level Rule processing, the OS User Name is composed using the OS User Name setting for the account domain, and the task is executed in that OS User Environment.
When a task is to be executed as a part of a Server-Wide Rule, it is launched in the CommuniGate Pro Server own environment (with the base directory being the current directory).
This action should be used with the NotifyMail® utility installed on client computers.
Users are allowed to specify this action only if they are allowed to specify execute-type actions.
Only the Server Administrator is allowed to specify this action.
This Rule condition is human generated, the Rule action is Reply. Only the text of the Reply message can be modified:
Even if the Administrator has not allowed the user to specify Automated Rules, the Auto-Reply Message can be enabled by the user herself, and the user can always modify the Auto-Reply Message text.
This Rule condition is either empty (the Rule action is applied to all messages) or, optionally, human generated, the Rule actions are Redirect To and, optionally, Discard.
Only the list of redirection addresses can be modified:
The account user can set this Rule only if the Account is granted a right to specify the redirecting Rule actions. Otherwise only the Administrator can set this Rule for the user account.
The Local Delivery module records Domain-Wide and Account-Level Rules activity in the Log. Set the Local Delivery module Log Level to Low-Level or All Info to see the Rules checked and the actions executed.