When a message is delivered to a local user of Kerio Connect, it is stored in the INBOX folder. In Kerio WebMail, each user can define a set of actions to be performed on all new incoming messages, as well as their conditions. These actions are called filters and are specified through filtering rules. Filtering does not mean merely refusing email messages or sorting them to folders, but it includes other actions such as notifications to cellular telephones, automatic replies, forwarding the message to a different email address, etc.
Define filtering rules in the Mail filters section. To open this section, click the button in the toolbar.
A list of defined filtering rules is displayed. Each message is checked against this list of rules (from top to bottom). If the message complies with any of the rules, a corresponding action defined for this rule is performed. If the message complies with more than one rule, all previously defined corresponding actions are performed (unless provided otherwise).
Instead in the Filters dialog box, the Spam and Out of office rules can be set in (see chapter 1.13.1 User Settings). In the list, the rules can be viewed, not edited.
A check box next to each rule determines if the rule is active or not. The rule can be disabled temporarily without the need to delete it and create again.
Use the list buttons to perform the following:
This option creates a new rule.
Use this option to change (edit) the selected rule.
This option removes the selected rule.
This option is used for editing the script (the filter source code). Filtering rules are created in the Sieve standard language. This means that the dialog window displayed after clicking on the Kerio Connect. Therefore, it is recommend that only users who are familiar with the Sieve language and do not wish to use the graphic interface use the function.
or button is a graphic interface for the rules. The graphic dialog window enables setting of all conditions and functions offered byMove the rules up or down. All rules are processed from top to bottom and should be sorted from the most specific to the most general ones. A rule can also stop processing of other rules (i.e. no more rules are processed, even though the message would comply with some of them). In such cases, consider carefully where the rule should be inserted.
The Spam rule is special and cannot be moved by the and buttons. The highest priority is set for the rule.
This button saves all changes to the rule. This must be done every time you make changes to the rules (including their activation or deactivation using the checkbox) or all changes will be lost. If changes have not been saved, a warning message will be displayed under the rules list (Your changes are not saved).
After the rules are set, save the action with the
button.Click the or buttons to open a dialog window where you can define a rule. This window is divided into four parts:
Condition (that the message must meet)
Action (that will be performed)
Rule description (a text description that allows modification of some details)
Name of the rule (a name that will be displayed in the rule list)
The rule will be used if the selected conditions are met. The logical relationships and (i.e. all conditions must be met) / or (at least one of the conditions must be met) can be used in conditions. Selected conditions are displayed in the third section of the dialog window where you can specify the requested values and change the type of logical conjunction.
Example: Create the following condition: “If the sender's address is admin@ourcompany.com
or the message subject contains the word Warning
”.
Select the Where the From address is condition.
In the third section, click the Contains link — this will open another dialog window where you can specify the address. Enter admin@ourcompany.com
.
Select the Where the subject contains the words condition.
Upon clicking, the and conjunction will be changed to or
Click on the contains link to specify Warning
(the entry is not case-sensitive).
When specifying required content for a certain entry, several different strings can be defined — the condition will only be met if the entry contains at least one of them (or relation).
The condition for the occurrence of a certain string in a given entry can be more general. Click the
button to specify its occurrence in the entry:The entry must exactly match with the specification.
The entry must not match with the specification.
The entry must contain the (sub)string.
The entry must not contain the specified (sub)string.
The entry must match the expression (the expression can contain the ?
and *
wildcards that can represent one or more characters).
Examples:
?atch
— matches batch, match, patch, catch, latch, hatch, ratch, natch and watch.
*each
— matches each, beach, preach, peach, reach, leach, teach, bleach and other words.
[bmp]atch
— matches batch, match and patch, but notcatch, latch, hatch, ratch, natch or watch.
If you need to find a string which includes square brackets, use ?
or*
wildcard in the matches entry instead of them
The entry must not match the expression.
The default value is contains.
The following conditions are possible:
The specified string must be included in the To
or Cc
line.
The specified string must be included in the From
entry.
The specified string must be included in the To
address.
The specified string must be included in the Cc
address.
The specified string must be included in the Sender
address. This item can be usually found in automatically generated messages (email conferences etc.) where it replaces the To
field.
The specified string must be included in the Subject
entry.
Kerio Connect spam filter can be set so that the Subject entry will include results of antispam tests (the value is represented by asterisks). Using this feature spam may be filtered easily. Simply insert the number of asterisks that will specify the rule. Messages that match this rule will accept this specification.
At least one attachment must be appended to the message.
The message size exceeds the specified value. To specify the size you can select from the following units: bytes (B), kilobytes (KB) and megabytes (MB).
Spam are undesirable messages sent to users. You can use the Kerio Connect antispam filter to protect your users from such messages. This filter uses special header items which include message evaluation and information about applied antispam testing.
This rule is valid for all incoming messages.
In the second section of the dialog window, you can choose one or more actions that will be performed if the condition in section 1 is met:
Move the message to the selected folder (you can choose a folder from a list).
Forward to a specified address. In this case no other actions are performed.
The message will not be stored in a local mailbox and the user will never be informed about it.
This action must be combined with another (i.e. with Move, Forward, Reject, etc.). It cannot be combined with the Discard the message action.
The message will not be stored in any local folder. This action cannot be combined with the Keep in INBOX action.
Sends notification (i.e. a short text message) to a specified address, typically to a cellular phone. For a cellular phone you must enter the whole email address, not just the telephone number (e.g. <john.wayne@t-email.com>
. For details, see the following sections).
The following macros can be used in the message text:
$from$
— the notification contains the message sender (the address in the From field).
$from-name$
— the notification will show the name of the message sender.
$subject$
— the notification will show the message subject.
$text$
— the notification will show the message text. Only the first 128 characters will be displayed. To change the count of characters, the macro can be written as follows:
$text[50]$
The number in parentheses represents the maximum number of characters displayed in the text box.
The automatic reply with a specified text. The automatic reply will be sent to each sender's address only once a week (so that the automatic reply does not create a loop in case there is an automatic reply set at the other end).
If the message complies with this rule, no more rules will be processed. This function allows users to create more complex rule sequences for different condition types. Always be careful about the order of the conditions (the rules are processed from top to bottom).
Notifications and autoreplies are protected from loops. This means that the system does not send a notification in reply to received notification or automatic replies. The detection of notification or automatic replies is performed using special items in the message header. Only notifications and automatic replies generated by Kerio Connect are detected.
In the third section of the dialog box, the user can review a summary of the created rule. Optional values are formatted as links and can be changed repeatedly. The conditions and actions can be easily removed or added by activation or deactivation.
When setting up the notification , a format of the message can be specified. In the notification text, special character sequences can be used which will be replaced by the corresponding parts of the original message.
Subject of the message
Sender address (From
field)
SMTP envelope From
address
First 128 characters of the text (message body)
First N
characters of a message body (N
is an integer). The part of the message that will be sent to a cellular phone is determined by the SMS gateway (usually up to one SMS message).
The notification text can have the following form:
Message from $from$, subject: $subject$. Message body: $text$