Automated Mail Processing (Rules)
The System administrator can specify Account Rules using a link on the Account Settings page.
Account users can specify their Rules themselves, using the WebUser Interface. The System or Domain administrator can limit the set of Rule actions a user is allowed to specify.
The System and Domain Administrators can specify Domain-Wide Rules using the Rules link on the Domain Settings page.
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 re-enabled at any moment.
To create a new Rule, enter its name in the field on the top and click the Add Rule 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 previous 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
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
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 firstname.lastname@example.org, the string <email@example.com> is used when the Recipient condition is checked.
If the domain1.com server has not informed your server about the original address, the <firstname.lastname@example.org> 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 or pm suffix.
Current Date [is | is not | less than | greater than] date string
A date string should be specified in one of the following formats:
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).
Source [is | is not | in | not in] string
Submit Address [is | is not | in | not in] string
Existing Mailbox [is | is not] string
This condition is useful in Domain-Wide Rules: a Rule can check if the current Account has a special mailbox, and copy certain messages to that mailbox only if it exists.
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 recipient address.
The message address routing information is presented in the following format:
|SMTP(domain)user@domain||if domain is a remote domain|
|LOCAL(user)||if domain is the Main Domain|
|LOCAL(user@domain)||if domain is a secondary CommuniGate Pro Domain|
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
For example, the Condition operation
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:
If the specified text starts with the '+' sign, the lines following this sign are added to the message header. The text should specify the Subject field, since the system will not automatically add the Subject: Re: original subject and In-Reply-To: original message-ID fields into the reply message.
The specified header portion 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 header).
If the specified header does not contain the From field, the account address is added as the From field. If the From field is specified, the account address is added as the Sender field.
The ^S and other macro symbols can be used in the additional header fields, too.
An empty line should separate the message body from the additional header fields:
If the specified text starts with the [charsetName] string, the text is converted to the specified charset (all non-ASCII texts are stored in the UTF-8 charset).
If the text does not start with the '+' sign, the header fields
If the text starts with the '+' sign, the '+' sign must be specified after the [charsetName] string, and you should specify the MIME-Version and Content-type fields yourself.
If the specified header already contains the From field, the account address is added as the Sender field.
The specified message header and the message body can contain macro symbols listed above.
The message text can start with the [charsetName] string (see above), in this case you need to specify the MIME-Version and the Content-Type header fields:
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.
A command text can be prefixed with the [FILE] tag:
Note: usually access to the base directory is not granted to regular users, so the [FILE] prefix can be used in the Server-Wide Rules only.
A command text can be prefixed with the [RETPATH] tag:
A command text can be prefixed with the [RCPT] tag:
In an Account-Level Rule, a command text can be prefixed with the [ACCNT] tag:
A command text can be prefixed with the [ORCPT] tag:
Note: the [RCPT] and [ORCPT] prefices cannot be used together.
A command text can be prefixed with the [STDERR] tag (see below).
A command text can have several prefix strings, and they can be specified in any order. If several of [FILE], [RETPATH], and [RCPT] prefix strings are specified, the -f flag and its parameter are added first, followed with the -p flag and its parameter, followed with the -r flag and its parameters.
When the task completes, the task exit code is checked. If the code is zero, the Rule action is considered as 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.
If the [STDERR] prefix was specified on the command line, the data written to the standard error channel (if any) is used to compose the error report text.
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 within 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 Account OS User Name setting, 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.
You can configure the Notifier settings using the Obscure page in the Settings WebAdmin realm.
Only the Server Administrator is allowed to specify this action.
If the list already has 500 or more elements, the new element is not added.
This Rule conditions are:
The Rule actions are:
Only the text of the Reply message can be modified:
Even if the Administrator has not allowed the user to specify Automated Rules, the Vacation Message can be enabled by the user herself, and the user can always modify the Vacation Message text.
If "Clear 'Replied Addresses' List" button is clicked, the RepliedAddresses string list is removed from the Account dataset. Alternatively, the Enable Vacation Message button can be present. It enables the Vacation Rule and clears the Replied Addresses list at the same time.
This Rule condition is either empty (the Rule action is applied to all messages) or, optionally, human generated, the Rule actions are Redirect To or Mirror 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.
This method guarantees that all Domain-Wide Rules with priorities higher than 5 are applied before any Account Rule. If such a Domain-Wide Rule uses the Stop Processing action, no Account Rules are applied.
Note: Domain-Wide Rules are "mixed" with the Account Rules and are applied in the same environment as the Account Rules, "on behalf" of the Account user.
When you modify the Cluster-wide Rules set on any Cluster Member, the set is automatically updated on all Cluster members.
The effective set of "server-wide" rules for each Cluster member is a union of the Server-Wide Rules explicitly set on that Cluster member and the Cluster-wide Rules.
Rules from both sets are applied together, in the order specified with the Rule priority attribute. For example, messages can be processed with a high-priority Cluster-wide Rule, then with a medium-priority Server-wide Rule, then with a low-priority Cluster-wide Rule.