Automated E-Mail Processing Rules |
||||||||||||||||||||||||||||||||||||||||||||||||
|
System administrators can specify Account Rules using links on the Account Settings page.
Account users can specify their Rules themselves, using the WebUser Interface. System or Domain administrators can limit the set of Rule actions a user is allowed to specify.
System and Domain Administrators can specify Domain-Wide Rules using the Rules links on the Domain Settings page.
See the Automated Rules section to learn how to set the Rules.
Each Rule can use universal conditions specified in the Generic Rules section.
This section describes the additional Rule conditions you can use in E-mail (Queue) Rules.
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
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
Source [is | is not | in | not in] string
Sample:
Security [is | is not | in | not in] string
SMIME:encrypted | if the message is encrypted using the S/MIME standard |
SMIME:signed | if the message is digitally signed using the binary S/MIME standard (PKCS7) |
signed | if the message is digitally signed |
(empty string) in all other cases |
Sample:
Submit Address [is | is not | in | not in] string
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 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
You can use all universal actions described in the Generic Rules section. This section descibes the additional Rule actions you can use in E-mail (Queue) Rules.
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).
Unless the specified header contains the From field, the From field is composed using the From Address from the Account WebUser Settings. If that address is not set the From Address is composed using the full Account Name and the Account Real Name setting.
If the full Account name is not stored as the From field, it is stored 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), otherwise it is converted into the charset used in the incoming message. If the incoming message did not have a charset specified, and the Rule is an Account-Level one, the Preferred Charset specified in the Account WebUser Preferences is used.
If the text starts with the '+' sign, the '+' sign must be specified after the [charsetName] string.
Unless the specified header contains the MIME-Version and Content-Type fields, these fields are added to the composed message.
The specified message header and the message body can contain macro symbols listed above.
The From, Sender,MIME-Version, and Content-Type fields are composed in the same way as for the Reply With operation.
The message text can start with the [charsetName] string (see 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.
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:
A command text can be prefixed with the [ORCPT] tag:
Note: the [RCPT] and [ORCPT] prefixes cannot be used together.
A command text in an Account-Level Rule can be prefixed with the [ACCNT] tag:
A command text in a Server-Wide Rule can be prefixed with the [ROUTE] tag:
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 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.